Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to set up an email server on Ubuntu Natty based on postfix and using Courier's imap interface. Emails are received into virtual mailboxes without problem and can then be retrieved and read using an imap client, but I am unable to send emails from the client. Mail.log includes numerous entries like <time> <hostname> imapd: Failed to connect to socket /tmp/fam--.

Apparently /tmp/fam-- is part of the interface to fam (or in the case of a Ubuntu server) gamin, which monitors the mailbox files allowing Courier to learn of new emails immediately. From what I am able to determine, this is related to Courier's File Alteration Monitor, which allows multiple clients to open the same folder concurrently and to receive updates to folder contents in realtime. I had hoped that setting IMAP_ENHANCEDIDLE to 0 in /etc/courier/imapd would eliminate the dependency, eliminate further /tmp/fam-- errors and allow emails to start being sent. No such luck.

Gamin is installed in the system and ps -A|grep gam finds gam_server running. Maybe there is a configuration problem, but I don't see any relevant config options, either for Courier or for Gamin.

Searching for advise on this problem, I've found several references that suggest that gamin tends to grow over time (memory leak) and needs to be killed periodically. It sounds like it introduces more trouble than it's worth and is not essential to imapd.

At this point, I am inclined to compile courier-imap without FAM dependency and replace what was installed by apt-get, but I hesitate to do so, fearing that I will open up an even larger can of worms by doing so.

Any suggestions on how to get imapd talking to gamin? Am I right to want to just drop use of gamin by imapd? Any tips, advice or cautions on recompiling courier-imapd without FAM dependency?

share|improve this question
Does not answer your question. But when you are still in the process of building a mail server I would highly recommend to switch to Dovecot. It is way easier to set up, more flexible, faster on IMAP and also replaces Cyrus SASL. So you need only two applications instead of three when using SMTP-AUTH. – mailq Oct 6 '11 at 16:30
The advise to use Dovecot instead was the best solution for me. Although at this time (two weeks later) no answers have been proposed to the /tmp/fam-- problem, any answers that might be proposed in the future are now moot to me. I'd still welcome answers in case they are useful to someone else. – Randy McLaughlin Oct 21 '11 at 15:49

If anybody else comes across this problem. Here's the solution:

groupadd -g 2000 vmail

useradd -u 2000 -g vmail vmail

Did the trick for me. Seems gam_server doesn't start if the user don't exists. I wasn't able to switch to dovecot because I'm loving exim4 as MTA and dovecot needs postfix.

share|improve this answer

I was receiving the same error, but the problem was caused by bad permissions on /etc/passwd file. Someone changed it to 600 which prevented other programs like(postfix or courier) from reading the users and groups they needed .

My fix was:

-bash-3.2# chmod 644 /etc/passwd
-bash-3.2# chmod 644 /etc/group
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.