How to Change the Port Number in Postfix

How to Change the Port Number in Postfix
The default network SMTP port for Postfix, Sendmail and most other mail servers is 25. This is the port used to send email, and most email clients will use it by default. Unfortunately, some Internet service providers have started to block port 25 because of the high volume of spam sent through it. For SMTP, they require their users to use the ISP’s SMTP.
This is a the primary reason why server administrators might change their SMTP port, but there are others. Some server administrators use proxy servers to redirect mail traffic through SPAM and DNS filters before eventually resolving to another port. Others change it, for security purposes, to a port that is more difficult for spammers and hackers to guess.
To change your Postfix port, you will need to have root access to your server. Edit the Postfix configuration file: /etc/postfix/ and comment out the following line:
# smtp innet n – n – – smtpd
(Code can be commented out by placing the “#” sign in front of a line)
Next, add this line: