Nowadays some Internet Service Provider block port 25 which is used by SMTP. We can change this in Postfix to point to another port, for example port 587.
- Edit /etc/postfix/master.cf
$ sudo nano /etc/postfix/master.cf
- Add # in front of this line:
smtp inet n - - - - smtpd
and add new line:
587 inet n - - - - smtpd
- Restart Postfix
$ sudo /etc/init.d/postfix restart
- Check using telnet
$ telnet localhost 587
- Done
Worked great!! Thank you!!
Doesn’t seem to work. Postfix still trying to send on port 25 even after restarting.