The default network SMTP port for Postfix, Sendmail and most other mail servers is 25 that is used to send email, and most email clients use port 25 as default port for sending emails. Unfortunately internet service providers (ISP’s) have started to block port 25 to control high volume of spam sent through post 25 and they require their users to use the ISP’s SMTP server.
This is a the major reason why mail server administrators consider to change their default SMTP port from port 25 to someone else. While some server administrators use proxy servers to redirect mail traffic through SPAM and DNS filters before eventually resolving to another port.
To change Postfix SMTP port, you need to have root access to your server. Edit the Postfix configuration file: /etc/postfix/master.cf and comment out the following line:
# smtp innet n - n - - smtpd
Next, add this line:
2525 inet n - n - - smtpd
You can replace “2525″ with port number of your choice to use for your SMTP server.
Finally, restart Postfix:
/etc/init.d/postfix restart OR service postfix restart
You may need to configure your firewall (if you use any) to allow the new port and deny port 25.
Tags: configuration file, default network, default port, email clients, Firewall, high volume, inet, innet, internet service providers, mail server, mail servers, mail traffic, postfix configuration, proxy servers, sending emails, server administrators, smtp port number, smtp server, spam