[Dovecot] Jul 06 13:00:50 dovecot: Warning: I/O leak: 806ef10 (36)

William Blunn bill+dovecot at blunn.org
Tue Jul 6 16:58:39 EEST 2010


William Blunn wrote:
> Dennis Clarke wrote:
>> Jul 06 12:58:50 IMAP(dclarke): Error: mbox root directory can't be a 
>> file:
>> /var/mail/dclarke/ (http://wiki.dovecot.org/MailLocation/Mbox)
>>
>> So I figure I better go read that page again and see what I did wrong 
>> this
>> time. I guess this is wrong :
>>
>> mail_location: mbox:/var/mail/%u
>>
>> Even though that is where the mail actually is :
>>
>> # ls -lap /var/mail
>> total 34
>> drwxrwxrwt 3 root mail 6 Jul 6 02:19 ./
>> drwxr-xr-x 47 root sys 47 May 30 02:52 ../
>> drwxrwxr-x 2 root mail 2 May 29 23:47 :saved/
>> -rw-rw---- 1 dclarke mail 0 Jul 5 16:01 dclarke
>> -rw-rw---- 1 lucone mail 657 Jul 2 17:55 lucone
>> -rw-rw---- 1 root mail 8705 Jul 2 05:40 root
>
> The first bit after "mbox:" says where the user's mail *directory* is.
>
> So what you have said puts the *directory* at /var/mail/dclarke, which 
> is obviously not what you meant.
>
> Maybe you could try something like this:
>
> mail_location = mbox:~/mail:INBOX=/var/mail/%u
>
> This exact parameter may not be exactly what you want finally, but it 
> may be sufficient to get things working, then from there you can tune 
> things to make it work how you want.
>
> (Also I note you have a colon after "mail_location" rather than an 
> equals. I don't know if this would be a problem but AFAIK the docs say 
> to use an equals.)
>
> There needs to be a per-user directory for (AFAIK):
>
> 1. Dovecot to store its indexes (needed for fast IMAP access)
>
> 2. Dovecot to store (IMAP) folders (in the case of "mbox", further 
> mbox files) other than INBOX

AND / THOUGH

You may also want to read the proviso from 
http://wiki.dovecot.org/MailLocation/Mbox about lockfiles:

> It's in no way a requirement to have the INBOX in /var/mail/ 
> directory. In fact this often just brings problems because Dovecot 
> might not be able to write dotlock files to the directory (see below). 
> You can avoid this completely by just keeping everything in ~/mail/: # 
> INBOX exists in ~/mail/inbox
> mail_location = mbox:~/mail

And further, if you are using mbox at all, you might want to check that 
all softwares which will be accessing the mbox will be using compatible 
locking strategies:

> == Locking ==
>
> Make sure that all software accessing the mboxes are using the same 
> locking methods in the same order. The order is important to prevent 
> deadlocking. From Dovecot's side you can change these from 
> mbox_read_locks and mbox_write_locks settings. See MboxLocking 
> (http://wiki.dovecot.org/MboxLocking) for more information.

One idea would be to configure your MTA to use the Dovecot LDA to handle 
deliveries. This in essence then delegates all local mailbox handling to 
Dovecot which should then ensure that delivery to mailboxes and 
subsequent collection through Dovecot (be that POP3 or IMAP) will 
cooperate on locking. Alternatively you could use Maildir which should 
make locking issues go away.

Bill


More information about the dovecot mailing list