How to change SMTP port in postfix

The default SMTP port is 25. In Postfix we can change it to some other port (say 6000) using the following steps.

Open the file master.cf.

$ vi /etc/postfix/master.cf

Add the following line to the file.

6000 inet n - n - - smtpd

Restart postfix.

$ /etc/init.d/postfix restart

You can check the connection to the new port using telnet. Also make sure that the new port is not blocked in the server firewall.

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.