postfix without port 25
I want to setup postfix comepletly avoiding port 25 has my ISP have that port blocked (I need a local server for testing purpose)
In my master.cf file I have the current line to make it listen on port 10025:
Which should work, and I can connect to the server using that port.
10025 inet n - n - - smtpd
However when I try to send mails it doesn't work. Looking at the logs I can see it still uses port 25 to connect to the mail servers:
What I can conclude here is that it's still using port 25 to deliver the emails. Is there someway I can avoid that?
May 21 13:45:42 azarat postfix/error: 43BB71F012B6: to=<myemail(at)mail-com>,
relay=none, delay=0.01, delays=0/0/0/0, dsn=4.4.1, status=deferred
(delivery temporarily suspended: connect to mail-com[IP]:25: Operation timed out)
You need to configure the delivery agent(s) to use the non-standard port as well. Unfortunately, I'm a sendmail guy, don't know specifically how to do it in postfix. In sendmail, you can set it up in sendmail.mc with something like:
define(RELAY_MAILER_ARGS, `TCP $h 2525')
define(ESMTP_MAILER_ARGS,`TCP $h 2525')
That's from my setup, which uses port 2525 to get mail in and out from the mail relay services I use to dodge the ISP. The defines result in mailer definitions in sendmail.cf when you generate that from the mc file.
The *receiving* mail server is going to have an SMTP daemon listening on port 25. That is the standard.
Your mail server listening on a non-standard port will not be receiving mail from the outside world (without an intermediary relay, as mentioned.)
If you do control the receiving mail server or know that it's listening on a different port:
Google: how to configure postfix to deliver mail to different port than 25
Postfix Manual - Transport Table
In the typical setup for bypassing an ISP block of port 25 in/out, _by arrangement_ there is an external "smart host" listening on a non-standard port for SMTP transactions. That host then normally relays over the standard TCP 25 to the next hop in the MX chain, which may or may not be the "receiving" mail server. In the case where you are mailing "To:" someone with a similar setup, the ultimate "receiving" server may also be using something other than port 25, so it's possible for delivery to occur without port 25 being used if you're both on the same service. You can purchase this service from several different sources, including DynDNS.
Originally Posted by HROAdmin26
Your links appear to provide the techical guidance for OP to accomplish the outbound relay by non-standard port, which is what he needed.
Will a smart host send the actual email through the smart host?
I need to use this for sending a massive amount of emails for testing purposes (i'm developing a newsletter script), so need to avoid my host because I'm only allowed to send a limited amount of emails per day.
You'd have to contract for an outbound smart host to do that, and the low tiers of service limit the messages per month/day. But it doesn't sound like you want that for testing. It sounds like you need to have the local relay set to contact postfix on your nonstandard port, but don't actually want the mails delivered.
Originally Posted by AzaraT