Hello, I'm willing to swear that with the 0.99.10.4 Debian package in my rather extensive tests with mailbox format dovecot created not only any missing parental directories but also the INBOX file, but the later I can't prove/test now as I upgraded all respective boxes. However 0.99.10.5 will still create (if needed and possible) missing directories for mbox storage, just not an empty INBOX. But with maildir, it will not even do that, from a test with pop3 and imap login attempts to a freshly created account that had not received any mails yet: --- Jun 10 12:58:03 mb01 pop3-login: Login: test [203.216.5.92] Jun 10 12:58:03 mb01 pop3: I/O leak: 0x8050ce0 (0) Jun 10 12:58:03 mb01 pop3: I/O leak: 0x8084aa0 (1) Jun 10 12:58:49 mb01 imap-login: Login: ttest [203.216.5.92] Jun 10 12:58:50 mb01 last message repeated 3 times Jun 10 12:58:50 mb01 dovecot: child 9193 (imap) killed with signal 11 --- It died not very graceful in either case, esp. the later. Unless there are very RFC'ish and imperative reasons, I'd suggest that dovecot creates all missing bits if possible no matter what the storage method or pretends to have encountered an empty mbox file or maildir cur/new respectively. The rationale should be obvious, no frantic user calls about "My mail is not working" when the answer is "Duh, that's because you never ever received one yet". ;) Regards, Christian Balzer -- Christian Balzer Network/Systems Engineer NOC chibi at gol.com Global OnLine Japan/Fusion Network Services http://www.gol.com/
On Thu, 10 Jun 2004, Christian Balzer wrote:> Subject: [Dovecot] "virgin" mail accounts[ ... ]> It died not very graceful in either case, esp. the later. > > Unless there are very RFC'ish and imperative reasons, I'd suggest > that dovecot creates all missing bits if possible no matter what the > storage method or pretends to have encountered an empty mbox file or > maildir cur/new respectively. > > The rationale should be obvious, no frantic user calls about "My mail is > not working" when the answer is "Duh, that's because you never ever > received one yet". ;)Whilst I agree with you, I try, in such circumstances, to arrange for the account creation system to send a "welcome" email so that there is already a message waiting for the user when they first log in :) I can then rely on Exim to do all the hard work of creating the INBOX properly AND the user gets a nice warm fuzzy feeling of having something there when they first log in to play... :) DHS -- David Sheryn -- david at ballooning dot org dot uk
On Thu, 2004-06-10 at 16:34, Christian Balzer wrote:> I'm willing to swear that with the 0.99.10.4 Debian package in my > rather extensive tests with mailbox format dovecot created not only > any missing parental directories but also the INBOX file, but the > later I can't prove/test now as I upgraded all respective boxes. > > However 0.99.10.5 will still create (if needed and possible) missing > directories for mbox storage, just not an empty INBOX.Have you set default_mail_env, so that Dovecot actually know where the INBOX is supposed to be in? If Dovecot has to do guessing it doesn't guess you want to use /var/mail/user if it doesn't exist.> But with maildir, it will not even do that, from a test with pop3 > and imap login attempts to a freshly created account that had not > received any mails yet:http://dovecot.org/patches/maildir-autocreate.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20040610/c40eb3fe/attachment-0001.bin>
Timo wrote:> >Have you set default_mail_env, so that Dovecot actually know where the >INBOX is supposed to be in? If Dovecot has to do guessing it doesn't >guess you want to use /var/mail/user if it doesn't exist. >Yes, the snippet for the test machine looks like this: --- default_mail_env = mbox:%h/mail:INBOX=%h/mail/INBOX --- This is the result of a test where /home/chibi/mail (and consequently /home/chibi/mail/INBOX did not exist: --- Jun 11 10:27:25 nexgen02 pop3-login: Login: chibi [127.0.0.1] Jun 11 10:27:25 nexgen02 pop3(chibi): stat() failed with mbox file /home/chibi/ mail/INBOX: No such file or directory Jun 11 10:27:25 nexgen02 pop3(chibi): stat() failed with mbox file /home/chibi/ mail/INBOX: No such file or directory Jun 11 10:27:25 nexgen02 pop3: I/O leak: 0x8050ce0 (0) Jun 11 10:27:25 nexgen02 pop3: I/O leak: 0x8084aa0 (1) Jun 11 10:27:25 nexgen02 pop3: Timeout leak: 0x8065d30 --- However it _did_ create the directory and .imap sub-dir: --- ls -la /home/chibi/mail/ total 12 drwx--S--- 3 chibi chibi 4096 Jun 11 10:27 . drwxr-sr-x 6 chibi chibi 4096 Jun 11 10:27 .. drwx--S--- 3 chibi chibi 4096 Jun 11 10:27 .imap --- Maybe a wrong sequence of check/creation or just not attempting to create the INBOX at all...>> But with maildir, it will not even do that, from a test with pop3 >> and imap login attempts to a freshly created account that had not=20 >> received any mails yet: > >http://dovecot.org/patches/maildir-autocreate.patch >That was quick and painless, thanks a lot. Looking forward to see that in the main code of an upcoming stable version, maybe as a config option for people who prefer crash and burn. ^_^ Regards, Christian Balzer -- Christian Balzer Network/Systems Engineer NOC chibi at gol.com Global OnLine Japan/Fusion Network Services http://www.gol.com/