Celeb Glow
general | March 17, 2026

How to set up TLS for Postfix on Ubuntu

How do you set up TLS for Postfix on Ubuntu? I've recently switched from sendmail to postfix and the emails sent by our website no longer have TLS from what I can tell on gmail, it's showing the broken pad lock:

enter image description here

I've checked our /etc/postfix/main.cf and these are the settings I have:

# TLS parameters
smtpd_tls_cert_file=/etc/nginx/certificates/goDaddy-10-15/example.chain.crt
smtpd_tls_key_file=/etc/nginx/certificates/goDaddy-10-15/example.key;
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

Do I need to generate a different certificate for postfix? At the moment I've set it up to use the same on our website uses.

1 Answer

Remove smtpd_use_tls=yes , and put the following lines instead:

smtp_tls_security_level = may
smtpd_tls_security_level = may
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy