Postfix – problem connecting to smtpd through port 465 (smtps)

emailpostfix

I have a SSL certificate setup for postfix and Dovecot. I am able to read mail from Dovecot using a TLS connection but I cannot send any mail using smtps. I can only do it through smtp (port 25). When I attempt to send it through smtps it connects to postfix but then it just hangs until it times out. What could be causing this?

These are my smtpd settings for postfix in the main.cf file:

smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = yes
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_cert_file=/opt/ssl.crt
smtpd_tls_key_file=/opt/ssl.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache 

Best Answer

You need to uncomment the smtps line in your /etc/postfix/master.cf

What you've current got looks like the following. Try uncommenting the first two lines and restarting Postfix. You should see that Postfix is now listening on port 465. You may also need to open that port on your firewall.

#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING