Main Page - Log in -

Courier IMAP and FAM

From Noah.org

Jump to: navigation, search

Courier IMAP and FAM problems

If you installed Courier-IMAP and find that it seems to lock up and timeout client connections after it has been running for a long period of time (depending on load) then you might be having a problem with FAM. The following examples are from a Qmail Rocks installation, but the basic idea should apply to any installation of Courier.

The problem is that Courier tries to use FAM even if the service is not running. For example, RedHat Enterprise Server 64-bit does not start FAM by default, but imapd will still try to open connections -- these connections never close and the socket descriptors never time-out or get recycled. You run out of resources and imapd will stop responding. Your email client will give an error of timeout while connecting. You will see that "netstat -n" will show hundreds of lines something like these:

   Active UNIX domain sockets (w/o servers)
   Proto RefCnt Flags       Type       State         I-Node Path
   unix  2      [ ]         STREAM     CONNECTED     11420  @/tmp/fam-vpopmail-
   unix  2      [ ]         STREAM     CONNECTED     11423  @/tmp/fam-vpopmail-
   unix  2      [ ]         STREAM     CONNECTED     11427  @/tmp/fam-vpopmail-

Reinstall Courier-IMAP. Run ./configure as normal, but before you run make edit

   /downloads/qmailrocks/courier-imap-4.0.2/maildir/config.h

comment out "#define HAVE_FAM 1". Now start the make process and continue the rest of the installation as usual. Unfortunately, the configure script does not have an option to build without FAM and it does not detect that the system is not running FAM.

Courier seems to work fine without FAM on a medium load system (in my case, about 40 users).