How to Change Postfix SMTP Port on Ubuntu

postfix

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

Keywords:

  • change postfix port
  • change postfix port to 587

One thought on “How to Change Postfix SMTP Port on Ubuntu”

Leave a Reply

Your email address will not be published. Required fields are marked *

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