More and more internet access providers are closing port 25 to reduce spam except for connections to their own mailservers. If you run your own mailserver and have problems to connect to it on port 25, you can enable port 465 (smtps) in postfix as a workaround. Edit the /etc/postfix/master.cf file:

vi /etc/postfix/master.cf

and remove the # in front of the smtps line. Example for Debain 5, change the line:

#smtps     inet  n       -       -       -       -       smtpd

to:

smtps     inet  n       -       -       -       -       smtpd

and restart postfix:

/etc/init.d/postfix restart

Facebooktwittergoogle_plusredditlinkedinmail
Tagged on:     

8 thoughts on “How to enable port 465 (smtps) in postfix mailserver

  • December 16, 2009 at 3:37 am
    Permalink

    Postfix documentation directs use of ‘postfix reload’ to re-read configuration files including master.cf.

    The following is an excerpt from the description of the stop command in the postfix man page.

    “Note: in order to refresh the Postfix mail system after a configuration change, do not use the start and stop commands in succession. Use the reload command instead.”

    Reply
    • February 17, 2010 at 6:05 pm
      Permalink

      for SUSE 11.1 does not fix it, and SMTP stops

      Reply
  • February 17, 2010 at 6:04 pm
    Permalink

    Sorry, but after the release line “SMTPS …….” started soon and will SMTP or SMTPS not starts

    Reply
  • April 15, 2010 at 6:59 am
    Permalink

    @monkey

    For openSUSE you need to change the smtps become 465, it will look like

    465 inet n – n – – smtpd

    I use it and it runs flawlessly

    Reply
  • July 8, 2011 at 11:34 am
    Permalink

    Regarding medwinz comment on OpenSuSE. This could also be corrected by adding smtps as a proper service in /etc/services.

    The reason for this discrepancy is that formally the smtps does not have an officially recognized port by IANA. Port 465 is (surprisingly) only officially a port for IGMPv3 which is a daemon used in conjunction with multicast services. Since it is very rare to run multicast on the same server as a mail server it is usually safe to allocate 465 for smtps.

    Reply
  • January 10, 2012 at 5:07 pm
    Permalink

    Bei der Anleitung fehlt etwas:

    die Zeilen unter

    smtps inet n – – – – smtpd

    also

    -o smtpd_tls_wrappermode=yes
    -o smtpd_sasl_auth_enable=yes
    -o smtpd_client_restrictions=permit_sasl_authenticated,reject

    müssen ebenfalls vom * befreit werden.

    Reply
  • April 3, 2013 at 9:08 pm
    Permalink

    thanks Till, you have most helpful with this little tutorial… We just had to open port 465 in ISPConfig and it worked fine.

    Reply
  • March 13, 2014 at 1:26 pm
    Permalink

    work perfectly either on BSD and Centos OS, anyway is possible to also open port 587 ?

    Reply

Leave a Reply

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