Howto enable SMPTS (465) postfix CentOS

Solution 1:

You have to declare the smtps service in master.cf. Add a line like this one :

smtps inet n - n - - smtpd
 -o smtpd_tls_wrappermode=yes

Then you'll have to configure it in main.cf and create the SSL certificate, here is an example :

smtpd_use_tls=yes
smtpd_tls_security_level = may
smtpd_tls_cert_file=/usr/local/etc/ssl/smtp.domain.com.crt
smtpd_tls_key_file=/usr/local/etc/ssl/smtp.domain.com.key  
smtpd_tls_CAfile = /usr/local/etc/ssl/ROOTCA.crt
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s

Then, restart Postfix.