On Tue, 2007-08-07 at 12:21 +0200, Bernd Kuhls wrote:
Now I create a new message in Thunderbird and save it as draft. A zero byte file "Drafts" is created in /home/$user/.imap_mail/ but the message I wanted to save got _lost_, /home/$user/.imap_mail/Drafts stays at zero bytes. The next message I try to save as draft finds its way to the Drafts mbox however.
Did you check what commands Thunderbird sends? Use e.g. rawlog (http://dovecot.org/bugreport.html). I don't think snarf plugin should cause this, and in general I can't think of a bug in Dovecot that would cause this.
I'm guessing what happens is:
C: 1 APPEND Drafts {...} S: 1 NO [TRYCREATE] Mailbox doesn't exist. C: 2 CREATE Drafts S: 2 OK
Maybe at that point Thunderbird doesn't bother to try again anymore.
Please note that no /home/$user/.imap_mail/inbox has been created although a inbox is shown in Thunderbird. When I move the saved message from Drafts to the inbox folder shown in Thunderbird, it gets saved in /var/mail/$user instead of /home/$user/.imap_mail/inbox, I guess this is due to the use of the mbox_snarf plugin, right?
Right. If you want .imap_mail/inbox to be used always, either change the mbox snarf code (remove stat(mstorage->snarf_inbox_path, &st) check) or make sure to create the file when creating new users.
If I manually create /home/$user/.imap_mail/inbox, then moving a message from Drafts to the Thunderbird-displayed inbox works.
Doesn't Dovecot use /var/mail/$user then as the INBOX if the .imap_mail/inbox doesn't exist?