Dovecot: mbox: Can't create root IMAP folder

In some situations with dovecot running on your server, you may receive a message from your e-mail client stating that the "connection was interrupted with your mail server" or the "login process failed". This may happen even if you've created the e-mail account, created the mail spool, and set a password for the user.

If you check your /var/log/maillog, you will generally find errors like these:

Oct 7 09:37:45 mailserver pop3-login: Login: newuser [111.222.333.444]
Oct 7 09:37:45 mailserver pop3(newuser): mbox: Can't create root IMAP folder /home/newuser/mail: Permission denied
Oct 7 09:37:45 mailserver pop3(newuser): Failed to create storage with data: mbox:/var/spool/mail/newuser

Dovecot is telling you that it wants to store some mail-related data in the user's home directory, but it can't get access to the user's home directory. If the home directory doesn't exist, create it and set the permissions properly:

# mkdir /home/newuser
# chown newuser:newuser /home/newuser
# chmod 755 /home/newuser

If the directory is already there, double check the ownership and permissions on the directory. If filesystem acl's or filesystem quotas might be in play, be sure to check those as well.

Printed from: http://rackerhacker.com/2007/10/09/dovecot-mbox-cant-create-root-imap-folder/ .
© Major Hayden 2012.

Leave a Reply

 

  • Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you find the information useful. If you spot something that's incorrect or confusing, please write a comment and let me know. Drop me a line if there's something you want to know more about and I'll do my best to write a post on the topic.
    -- Major Hayden

    Flattr this