I'm installing a new mail server (Postfix/Dovecot+Maildir) in a fresh OS.

Using Thunderbird (or Squirrelmail) I can send mails but my inbox is empty even when I can see them in /home/<mailuser>/Maildir/new.

What could be the problem? I'll attach any conf file if necessary.

Edit: The dovecot config is mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/ Like Damiano said, Postfix and Dovecot mail folder didn't match.

  • What is the output of doveconf -a | grep mail_location ? – Kondybas Dec 26 '14 at 9:44

You're probably not sharing the same mailbox location/folder and/or mailbox delivery style (MBOX vs. MDIR) in both Postfix and Dovecot. As a result, Postfix is (correctly) writing under "/home/mailuser/Maildir" (where you see your mail arriving, under the "new" subfolder), but as dovecot is searching somewhere else... it doesn't find such mails (so you get a "no-mail" from it).

As a first check, you should:

  • Postfix: check the home_mailbox parameter in /etc/postfix/main.cf:

# The home_mailbox parameter specifies the optional pathname of a
# mailbox file relative to a user's home directory. [...]  Specify
# "Maildir/" for qmail-style delivery (the / is required).
home_mailbox = Maildir/

  • Dovecot: as suggested by @Kondybas check the mail_location parameter (in CentOS 6.5, at /etc/dovecot/conf.d/10-mail.conf):

# See doc/wiki/Variables.txt for full list. Some examples:
#   mail_location = maildir:~/Maildir
#   mail_location = mbox:~/mail:INBOX=/var/mail/%u
#   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
# <doc/wiki/MailLocation.txt>
mail_location = maildir:~/Maildir

The two directives above tell Postfix and Dovecot to store incoming mail for "userN", whose home-directory is /home/userN, under the Maildir structure at /home/userN/Maildir

Things are slightly more complex in case of "virtual" users (users not having a proper unix account defined on the machine), in which case both Postfix and Dovecot need to share also the way to get/calculate the home-dir of userN

  • Thank you!! Turns out Dovecot mail_location wasn't set correctly. I ended up installing iRedMail anyway. – Heine Frade Dec 29 '14 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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