I have installed postfix+dovecot+squirrelmail+sasl in Debian Squeeze. I can send email through squirrelmail, but can't receive mails there. I can view received mails only through cat /var/mail/user. Also it created /var/mail/u/user dirs where ls list inbox INBOX INBOX.Drafts INBOX.Sent (where the sent messages are stored in squirrelmail) INBOX.Trash, so I think that I should redirect the inbox from /var/mail/user to /var/mail/u/user/inbox. The section in dovecot is:

mail_location = mbox:/var/mail
mail_location = Maildir:/var/mail/%n
mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n

I am not sure is it correct and where really is the problem.


Edit the file main.cf of Postfix and look for the setting home_mailbox and modify it to


If you cannot find that line add it to the config. Then modify dovecot's config to use


Comment out the other three. Postfix is then configured to drop one file for each email in /var/mail/username/Maildir/new. Restart postfix and dovecot afterwards. That should fix the issue with squirrelmail.

This setup is only suited for receiving and storing email for one domain. If you want to be able to effectively use and configure a the server as a mail-server for different domains, I'd recommend reading up on what you need, to set that up, how to set it up and how the different parts (dovecot for IMAP/POP3, postfix, squirrelmail) are configured.

| improve this answer | |
  • I updated my previous answer. – lsmooth Feb 11 '12 at 9:58
  • 1
    dovecot.conf now contains only mail_location=maildir:/var/mail/%u/Maildir, but the logs show Error: opendir(/var/mail/georgi/Maildir) failed: Not a directory – Georgi Feb 11 '12 at 12:00
  • I have not installed UW, should I? Pors 25 and 143 are installed, but I think that postfix or dovecot are imap? – Georgi Feb 11 '12 at 19:41

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.