Home / Security / How to change the Postfix port number

How to change the Postfix port number

Postfix logoBy default, Postfix, Sendmail, and other SMTP mail servers rely on port 25 to send email. Normally, this is fine and works for most situations. Some Internet Service Providers, however, disagree. They see port 25 as a prime port for spammer exploitation, and many have started to block it.

If this is the case for you and you have root access on your VPS or dedicated server, you might consider changing your SMTP port to something you know you will be able to access. To change the port in Postfix, edit your /etc/postfix/master.cf file as root, commenting out the following line:

smtp innet n - n - - smtpd

Then, add the this line:

2900 inet n - n - - smtpd

Replace “2900” with whatever port you prefer for your mail server. Next, restart Postfix:

service postfix restart

Finally, assuming you have a firewall installed, which any security-minded server administrator should, you will need to tell it to allow traffic through the new mail server port.

Check Also

physical servers security

Colocation sever security

Collocation is the movement of the servers from an in house location usually to a …

Powered by Namesco
© Copyright InternetBlog.Org.Uk 2022, All Rights Reserved