Published November 7th, 2005 by Jim O'Halloran
CentOS: Courier-IMAP hangs
Courier-IMAP was one of the third party RPM’s installed on the the Fedora machine I recently upgraded to CentOS Initially Courier just worked, no problems. After 3-4 weeks it stopped accepting connections (very light load, 5 mailboxes only). Restarting the service didn’t help, but rebooting the server did.
Log file messages indicated issues with FAM, and a bit of digging indicated that FAM was no longer installed on the system. Further digging indicated that this was most likely the cause of the problem. FAM seems to have been replaced by Gamin, however Courier seemed to have issues with Gamin.
I tried compiling the FC2 FAM source RPM, but had issues with the build. I also tried upgrading to the latest (at the time) Courier-IMAP 4.0.6. This had the same issue, after 3-4 weeks it stopped accepting connections.
I originally went with Courier because I was setting up a system to automatically sort email into multiple folders. I was expecting a large number of folders to be created over time, so maildir support was a logical requirement. Given that 18 months down the track I now have a large number (25K+) of email messages sorted into these folders, maildir support in any replacement was pretty much essential.
I know Redhat/Fedora has moved away from their old IMAP server (UW-IMAPd?) and was replacing it with Dovecot. Given the similarities between Redhat and CentOS, it was to be expected that CentOS would also use Dovecot as its preferred IMAP server. Even better, it appears that Dovecot supports maildir! Easy decision then, lets replace the troublesome Courier-IMAP with Dovecot. This was so easy I couldn’t believe it:
service courier-imap stop service courier-authlib stop rpm -e courier-imap rpm -e courier-authlib yum install dovecot chkconfig dovecot on service dovecot start
That’s it, just shut down and uninstall Courier-IMAP, then install and start Dovecot. Dovecot also seems to perform better, handling the extremely large number of folders in my maildir without any dramas (performing better than Courier).
Only issue struck is that Dovecot doesn’t act as a POP server by default. This is an easy fix, add the following line to /etc/dovecot.conf:
protocols = imap imaps pop3 pop3s
Then restart the service and you’re away. Dovecot has been running on my machine for a couple of weeks now without any dramas, so all is looking good.
moose Says
Thanks for posting this. I just switched to CentOS 4.2 as part of a server upgrade, and this saved me a whole bunch of time trying to deal with the drama of getting courier-imap going.
Feb 13th, 2006 at 4:40 pm
Charles Says
Hi there,
i’ve played with Courier-imap and dovecot and i found that dovecot does a great job for a simple imapd server.
By any chance, have you tested out cyrus with virtual domains?
Apr 8th, 2006 at 4:41 am