I've just recently installed CentOS 5.5 and Postfix for the first time ever.
I've followed 2 different tutorials which are supposed to enable TLS on the SMTP server. Both of which told me to create a key & cert, edit the config, test the server by connecting via telnet.
Everything looks like it should be working. When I connect with telnet, the server advertises that I can connect with STARTTLS. I have opened the firewall for both ports 25 & 465. SELinux is disabled (not sure if that would have interfered or not).
When I attempt to send an email with STARTTLS enabled in Thunderbird, I am given the following error:
An error occurred sending mail: The mail server sent an incorrect greeting: Cannot connect to SMTP server 192.168.0.9 (192.168.0.9:465), connect error 10061.
After pressing OK, I am greeted with another, less helpful message:
Sending of message failed. The message could not be sent because the connection to SMTP server cinc.centos was lost in the middle of the transaction. Try again or contact your network administrator.
I've Googled and fiddled with the configuration hour the best part of a day now. And I've got absolutely no closer to fixing it. I've tried Googling the error message, or just the error code, and it hasn't found anything helpful.
However.. the SMTP server works perfectly fine without any TLS encryption! So the error definitely is just with encryption, hence why the error message mentions port 465.
In case it helps, I've posted the TLS part of my main.cf:
smtp_tls_note_starttls_offer = yes
smtpd_tls_received_header = yes
smtpd_sasl_local_domain = cinc.centos
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_security_level = may
smtpd_tls_key_file = /etc/pki/tls/private/cinc.centos.key
smtpd_tls_cert_file = /etc/pki/tls/certs/cinc.centos.cert
smtpd_tls_loglevel = 1
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_cache
tls_random_source = dev:/dev/urandom
I am so confused by this whole thing! I'm getting no closer to fixing it on my own... can anybody point me in the right direction?
Thanks a million!!