If you have issues occasionally connecting with Mac OS X Mail to a Courier-IMAP server, particularly over SSL, edit /etc/courier-imap/imapd-ssl and /etc/courier-imap/imapd, find the MAXPERIP setting and try increasing it to:
MAXPERIP=10
Once saved, you’ll need to restart the Courier-IMAP server.
Note: the MAXPERIP setting is not even in the imapd-ssl file so I just added it to the end.
No tags