Author Topic: Adding alternate SMTP port with Postfix  (Read 4787 times)

Offline admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 296
    • View Profile
Adding alternate SMTP port with Postfix
« on: January 26, 2011, 10:12:42 PM »
Seeing as how many of the big ISPs block attempts to connect to port 25 on any servers but their own, those of you running Postfix for remote users will probably want to accept connections on an alternate port. All that’s needed is to add the following line to /etc/postfix/master.cf:

Code: [Select]
587 inet n - n - - smtpd
Of course, you can choose any available port on your system that you would like to accept connections on.

Then you must restart the mail server:
Code: [Select]
/etc/init.d/postfix restart
After that you can check the new port by telnet:

$ telnet mail.example.com 587
Trying 192.168.100.11...
Connected to 192.168.100.11.
Escape character is '^]'.
220 scallop.seaglass.com ESMTP Postfix
EHLO localhost
250-scallop.seaglass.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-XVERP
250 8BITMIME
quit
You type the emphasized lines. Use your own mail server hostname instead of mail.example.com, of course.