Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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've successfully installed sendmail, but when I connect to the Courier IMAP server via Outlook, the Inbox is listed as empty. When I check the inbox with Alpine locally on the server, it has content though. Why? I do see files with content in /var/mail . Is that not where Courier-imap checks for mail?

The setup is pretty clean - I run Ubuntu 12.04 on AWS, have installed sendmail and courier-imap. sendmail was configured with sendmailconfigure and it works well to both send and receive mail. The problem is with courier.

share|improve this question

Courier prefers qmail-style Maildirs1, sendmail doesn't get involved much in the local delivery, it hands it over to an external program as defined by the local mailer, e.g.:

$ grep ^Mlocal /etc/mail/sendmail.cf
Mlocal,         P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,

The default LDA (local delivery agent) for this system is procmail, so:

$ procmail -v
Default rcfile:         $HOME/.procmailrc
    It may be writable by your primary group
Your system mailbox:    /var/mail/root

Courier will fallback to mbox support if you point it at an mbox file, procmail will default to mbox files, but should support maildirs, but (AFAIK) won't honour maildir++ quota.

Alpine is probably using the default $MAIL mbox file in /var/mail, or similar, i.e. where sendmail is delivering to (via procmail), but not where Courier is looking.

To solve your problem:

  • identify your local mailer
  • if it's not Courier's maildrop, throw it away and use maildrop
  • make sure your maildrop is delivering to the same place Courier IMAP is looking (this depends on your userdb or LDAP or SQL configuration)

To configure sendmail to use maildrop, place this (probably) at the end of your sendmail.mc and rebuild sendmail.cf:

FEATURE(`local_procmail', `/usr/local/bin/maildrop', `maildrop -d $u')

1 more accurately Maildir++ style, an extended Maildir format

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.