SMTP Port 465 – Postfix

Home » CentOS » SMTP Port 465 – Postfix
CentOS 8 Comments

Greetings Dear Friends !

I have Postfix Running On CentOS 6.2 x86_64, TLS/SASL is already configured and working. Can anyone please assist me how to configure Postfix to listen and accept TLS connections on smtp:465?

Thanks / Regards
Prabhpal S. Mavi

 

8 thoughts on - SMTP Port 465 – Postfix

  • In /etc/postfix/master.cf uncomment the line that starts #smtps.

    One thing I also do is to listen on an alternate socket way up high,
    like 22225, to bypass ISP’s that restrict port 25 and 465 to their own
    servers. This way I can send mail through my server when I am on a
    restricted network like AT&T wireless with my smart phone. Just make a
    copy of the standard smtp line, call it smtp-alt, then define smtp-alt
    to the port you want in /etc/services.

    Mike

  • port 465 is default for smtps…not smtp
    smtps inet n – n – – smtpd
    -o smtpd_tls_wrappermode=yes

    open it on your iptables too

  • Hello BoB,

    Thanks for you kind assistance, your solution opened the SMTP:465 on the
    postfix server.

    But when i telnet 587, i can see 220 in response.
    [root@jet postfix]# telnet localhost 587
    Trying ::1…
    Connected to localhost.
    Escape character is ‘^]’.
    220 mail.digital-infotech.com ESMTP Postfix (2.6.6)

    But when i telnet to 465, i do not see 220 in response. is it normal?
    [root@jet postfix]# telnet localhost 465
    Trying ::1…
    Connected to localhost.
    Escape character is ‘^]’.

    Thanks / Regards

    Thanks / Regards
    Prabhpal S. Mavi

  • Tilman,

    Thanks for the correction. I wanted the mailing list to be aware that
    smtps (465) is deprecated and replaced with (as you said) SMARTTLS.
    Anyone creating a brand new mail server should use this method.

  • Hi Dear All,

    I thanks everyone for their input & explanation on this request. So much
    valuable info you guys exchange through emails.
    Well done
    Thanks / Regards

    Thanks / Regards
    Prabhpal S. Mavi

  • You can run an smtp server on any port you want. The advantage to not
    using one of the standard ports is that you won’t have as many attacks
    from spammers and password guessing attacks.

    The smtp parameters that are specified in main.cf are the default for
    all of your smtp servers however any of the parameters can be overridden
    in master.cf. So to define an smtp server on port 1234 which requires
    TLS (issued via a STARTTLS) and must have SASL authentication you would
    add the following entry to master.cf:

    1234 inet n – n – – smtpd
    -o smtpd_enforce_tls=yes
    -o smtpd_sasl_auth_enable=yes
    -o smtpd_client_restrictions=permit_sasl_authenticated,reject

    The port number can also be any named port in /etc/services.

    For any public SMTP server on the internet, I believe the relevant RFC
    specifies that you must accept unauthenticated, unencrypted (NON-TLS)
    connections on port 25 (sort of obvious if you want to receive incoming
    mail from the Internet). What I do on my servers is to disallow
    relaying and authentication from my port 25 smtp server and require all
    of my mail clients to connect on the port that I designate, requiring
    TLS+SASL auth.

    Nataraj

  • Dear Natraj,

    Very Much senses able comment and good example to configure smtp on
    desisted port. I was actually looking for something like this for a while,
    how to configure smtp on non standard ports.

    I love the community who put their affords and energy and deliver the
    solutions in mailboxes directly.

    Well Done Natraj, Thanks Dear All. —-

    Thanks / Regards
    Prabhpal S. Mavi

LEAVE A COMMENT