How to Change Postfix SMTP Port on Ubuntu

Share

postfix

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.

  1. Edit /etc/postfix/master.cf

    $ sudo nano /etc/postfix/master.cf

  2. Add # in front of this line:

    smtp inet n - - - - smtpd

    and add new line:

    587 inet n - - - - smtpd

  3. Restart Postfix

    $ sudo /etc/init.d/postfix restart

  4. Check using telnet

    $ telnet localhost 587

  5. Done

2 Comments

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.