When I create a user and then try to login to mail i.e. via roundcube I get this error on /var/log/mail.err :
Apr 9 15:16:52 base1 dovecot: IMAP(xpto): mail_location not set and autodetection failed: Mail storage autodetection failed with home=/home/xpto Apr 9 15:16:52 base1 dovecot: IMAP(xpto): Fatal: Namespace initialization failed
I figured out it was due to the fact that there wasn't a "mail" directory inside the home directory for this domain. If I manually create it, it starts working fine. But for each new user I have to create, although the system creates a directory ~/homes/username I have again to manually create a "mail" folder inside that user's directory.
On this server I'm running Debian 6 and Webmin 1.580 and Virtualmin Version 3.89.gpl, master admin mode . But I have an older server which currently runs Debian 5 and Webmin 1.570 and Virtualmin Version 3.82.gpl, master admin mode, and everything works fine with similar configurations.
Any thoughts on this ?
Best regards, Telmo Dias
Comments
Submitted by andreychek on Mon, 04/09/2012 - 13:06 Comment #1
Howdy -- what output do you get if you run this command:
find /etc/dovecot | xargs grep '^mail_location'
Submitted by telmodias on Mon, 04/09/2012 - 13:43 Comment #2
Hi,
I run it on both my servers, and it doesn't output anything on both cases.
Submitted by andreychek on Mon, 04/09/2012 - 13:50 Comment #3
Hmm, well, both Debian 5 and 6 should set a mail_location by default in the dovecot.conf file.
Are you by chance using a Debian image generated by someone else, perhaps a VPS image?
Either way, you could try setting it in that file... so if you edit /etc/dovecot/dovecot.conf, try setting this:
mail_location = maildir:~/Maildir
And then restart Dovecot:
/etc/init.d/dovecot restart
Do things work for you after that?
Submitted by telmodias on Mon, 04/09/2012 - 17:34 Comment #4
Well, yes it solved the issue.
I defined it in dovecot.conf as:
mail_location = mbox:~/mail:INBOX=/var/mail/%u
and it worked as expected even regarding other users.
What bugs me, is why does it work good on the old server, even though it doesn't have this variable defined.
Anyway, thanks a million!
All best, Telmo Dias