[Dovecot] default_mail_env auto-detect woes for maildir users
Hello--
I am a fairly new dovecot user and have run into a problem. I am running dovecot 1.0alpha5 (built from source) on a Fedora Core 1 machine. The system has about 400 users with over 80 IMAP users, and we have just transitioned from UW-IMAP. Thus all users are currently still mbox users.
I would like to transition them to maildir users (this was the main point for me switching servers), and I chose dovecot because it could simultaneously support both formats.
My dovecot.conf uses auto_detect (no default_mail_env defined, by choice).
Auto-detect is working fine for mbox users, as shown by this (edited) log snippet:
dovecot: imap(janeuser): maildir: couldn't find root dir dovecot: imap(janeuser): mbox: root exists (/Home/janeuser/mail) dovecot: imap(janeuser): mbox: INBOX exists (/var/mail/janeuser) dovecot: imap(janeuser): mbox: root=/Home/janeuser/mail, index=/Home/janeuser/mail, inbox=/var/mail/janeuser
However, for another user who already has ~/Maildir and a proper maildir-format spool location ( /var/mail/joeuser/{cur|new|tmp} ) the log shows:
dovecot: imap(joeuser): maildir: root exists (/Home/joeuser/Maildir) dovecot: imap(joeuser): maildir: root=/Home/joeuser/Maildir, index=/Home/joeuser/Maildir, control=, inbox=
(Mail clients show no messages, but one can see them from the UNIX shell and with mutt on the server.)
If I set default_mail_env = maildir:~/Maildir:INBOX=/var/spool/mail/%u then everything works fine for 'joeuser'. However, I need auto-detect during this transition phase.
My questions, please:
- How do I get INBOX ("inbox=") to be properly defined/detected?
- Must I do this with namespaces, and how does that affect the fact that there will be a transition period where some users use mbox and others use maildir?
- Other advice?
I have been unable to track this down so far, between reading the Dovecot documentation and Googling the dovecot mailing list archives.
Thanks in advance,
David
I wanted to follow-up on my own message, because I have devised a usable work-around for the situation I described yesterday.
======= dovecont.conf snippet ========= userdb passwd-file { # Path for passwd-file args = /usr/local/etc/userdb.dovecot }
userdb passwd { }
where the userdb.dovecot file has entries of the form: joeuser:x:61375:20:Joe User:/home/joeuser:/bin/false::maildir:/home/joeuser/Maildir:INBOX=/var/spool/mail/joeuser/
Comments:
This works, in terms of having "inbox=" properly defined for maildir users.
I will be placing entries for each maildir user in this userdb.dovecot file (letting mbox users get handled properly by auto-detect of default_mail_env).
I had to move the "userdb passwd" block _below_ the "userdb passwd-file" block in dovecot.conf to force it find my special entries first.
I am pleased that I was able to get away with a literal 'x' (a la shadow password files) in this file, due to "passdb" and "userdb" being handled separately. Nice design of dovecot's!
This arrangement gives me the granularity to mix mbox and maildir users, as I desired.
My question: Although this is a functioning work-around, is there something I am not understanding or why is auto-detect not working?
Thanks in advance,
David
On Wed, 2006-02-01 at 17:22 -0500, David Friedlander wrote:
joeuser:x:61375:20:Joe User:/home/joeuser:/bin/false::maildir:/home/joeuser/Maildir:INBOX=/var/spool/mail/joeuser/ .. My question: Although this is a functioning work-around, is there something I am not understanding or why is auto-detect not working?
The reason is simply that /var/spool/mail isn't used for maildirs by almost anyone, so Dovecot's autodetection code doesn't even try to detect it. Standard INBOX location for Maildir is ~/Maildir.
participants (2)
-
David Friedlander
-
Timo Sirainen