By default, Postfix listens on the SMTP port number 25. Some ISPs block this port number so you may wish to provide an alternate port number to listen to or change it altogether.
1. Edit the file /etc/postfix/master.cf
and find the line below. You can comment the line below by adding # in front of the line to disable SMTP port 25.
smtp inet n - n - - smtpd
Next, add this line
25000 inet n - n - - smtpd
Replace 25000 with your preferred alternate port number.
2. Restart the Postfix service or the MailScanner service if you have integrated MailScanner into Postfix.
3. If you have enabled the firewall, you need to configure the firewall
to allow traffic on the new port number.
4. Test Postfix
by connecting on the new port number. Use the terminal command telnet localhost [port]
instead of telnet localhost smtp
to test your new port number.
Visit the forum to ask for help or to give a comment.
Posted on 12/30/2007 and last updated on 11/7/2009
Filed under Postfix