[Dovecot] mail_location and storage type
Hi,
I was setting up a new system for testing Dovecot 1.0. My old one is using 0.99 and was set up quite a time ago, so I had to consult the documentation.
I needed several attempts until it worked and that was because the designated maildir directory /server/mail/jrg/Maildir was completely empty. Upon login the server exited and wrote the following to the log: POP3(jrg): Ambiguous mail location setting, don't know what to do with it: /server/mail/jrg/Maildir (try prefixing it with mbox: or maildir:) POP3(jrg): Failed to create storage with data: /server/mail/jrg/Maildir
That thing was the main cause of my confusion since the config wasn't ambiguous at all at already contained a prefix: mail_location = maildir:/server/mail/%u/Maildir
The wiki article MailLocation doesn't contain any hint maildirs have to contain at least a cur subdirectory. That information I eventually got from mail-storages.txt - that file must be one for which the wiki isn't an alternative.
So what is this mail about?
- The log message is wrong or at least missleading. Would be fine if it could get improved.
- Is there any reason at all to have a storage prefix but still require some special format for the directory in order to recognize it?
- At least if the behaviour will stay, shouldn't the text from mail-storages.txt converted to a wiki article or incorporated into MailLocation?
Regards, Juergen
On Wed, 2007-02-07 at 18:11 +0100, Jürgen Herz wrote:
POP3(jrg): Ambiguous mail location setting, don't know what to do with it: /server/mail/jrg/Maildir (try prefixing it with mbox: or maildir:) POP3(jrg): Failed to create storage with data: /server/mail/jrg/Maildir .. mail_location = maildir:/server/mail/%u/Maildir
Maybe it got it elsewhere? From userdb maybe? Or do you also have default_mail_env? Or if you change that setting, does the path in the error message change?
You could also verity with mail_debug=yes what the imap process sees as the mail location. I'm pretty sure it doesn't see the "maildir:" prefix.
The wiki article MailLocation doesn't contain any hint maildirs have to contain at least a cur subdirectory. That information I eventually got from mail-storages.txt - that file must be one for which the wiki isn't an alternative.
That's not a requirement. Dovecot creates the new, cur and tmp directories itself if they're not found.
Creating the cur directory probably fixed it because then it allowed the mailbox format autodetection code to work.
- At least if the behaviour will stay, shouldn't the text from mail-storages.txt converted to a wiki article or incorporated into MailLocation?
I should delete doc/*.txt :) I'll go do that now..
Timo Sirainen wrote:
On Wed, 2007-02-07 at 18:11 +0100, Jürgen Herz wrote:
POP3(jrg): Ambiguous mail location setting, don't know what to do with it: /server/mail/jrg/Maildir (try prefixing it with mbox: or maildir:) POP3(jrg): Failed to create storage with data: /server/mail/jrg/Maildir .. mail_location = maildir:/server/mail/%u/Maildir
Maybe it got it elsewhere? From userdb maybe? Or do you also have default_mail_env? Or if you change that setting, does the path in the error message change?
I guess that's it. The MAIL environment is also fetched from LDAP via user_attrs. I'm sorry for bothering you. Must have overlooked that mail_location only provides the default--from this point of view default_mail_env was a better name.
Since the LDAP is read by various applications I can't store the mail location including maildir: there. Is it possible to prepend "mailbox:" the MAIL environment while fetching it in user_attrs?
Creating the cur directory probably fixed it because then it allowed the mailbox format autodetection code to work.
Seems so.
Regards, Juergen
On Mon, 2007-02-12 at 21:21 +0100, Jürgen Herz wrote:
Since the LDAP is read by various applications I can't store the mail location including maildir: there. Is it possible to prepend "mailbox:" the MAIL environment while fetching it in user_attrs?
It's a frequently requested feature, but nope. Not yet.
participants (2)
-
Jürgen Herz
-
Timo Sirainen