View Single Post
Old 2nd June 2009, 16:56
airstrip airstrip is offline
Junior Member
Join Date: May 2007
Posts: 4
Thanks: 0
Thanked 2 Times in 2 Posts
Default Solution for IMAP unexpected shutdown

This solution may help someone out there with a similar server setup:

I have an isp config installation on my debian sarge machine, running with courier-ssl and postfix, following instructions from:

I also had imapd-ssl: Unexpected SSL connection shutdown messages appearing in /var/log/mail.log

The problem I found was with smtpd.pem file in /etc/postfix/ssl
If you check the file with this command.

openssl x509 -noout -text -in smtpd.pem
It will report an error about expecting a TRUSTED certificate.

The solution is to create a .pem file from your .key and .crt files:
cat smtpd.key smtpd.key > smtpd.pem
openssl gendh >> smtpd.pem
Then check the file with:
openssl x509 -noout -text -in smtpd.pem
This will replace the .pem file that was generated in the perfect setup, and create one that is properly formed and worked on my setup. Hopefully it helps yours.

Thanks to this ssl cheat sheet, by David Mcnugget:

I've also posted on this issue when installing a RapidSSL cert.

Have fun!
Reply With Quote