Postfix/Courier-SSL and Mail.App

Aus Weis nix
Wechseln zu: Navigation, Suche

The Problem

OSX's does not seem to like different certificates for SMTP (from postfix) and IMAP or POP3 (from courier). The connection is dropped with this sequence in the log:

postfix/smtpd[20959]: connect from ...
postfix/smtpd[20959]: SSL_accept error from ...
postfix/smtpd[20959]: lost connection after CONNECT from ...
postfix/smtpd[20959]: disconnect from ...

The Solution

The solution is simply to make sure Courier is set up with the same certificate as Postfix.

For a debian system, the following steps will ensure the postfix SMTP cert is the same as the courier IMAP/POP3 cert:

cd /etc/courier
cat ../postfix/smtpd.key ../postfix/smtpd.cert >courier.pem
chmod 400 courier.pem
mv imapd.pem imapd.pem-orig 
mv pop3d.pem pop3d.pem-orig 
ln -s courier.pem imapd.pem
ln -s courier.pem pop3d.pem
/etc/init.d/courier-pop-ssl restart
/etc/init.d/courier-imap-ssl restart

Connected clients may popup warnings when the certificate changes.