Saturday, January 23, 2010

Postfix Change Port

SkyHi @ Saturday, January 23, 2010

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.

Edit master.cf
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.

Service Configuration
2. Restart the Postfix service or the MailScanner service if you have integrated MailScanner into Postfix.
Security Level Configuration
3. If you have enabled the firewall, you need to configure the firewall to allow traffic on the new port number.
Terminal
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.

REFERENCE
http://www.linuxmail.info/postfix-change-port/