[Dovecot] Problem with dovecot + imap idle + qmail-localdelivery
Timo Sirainen
tss at iki.fi
Tue Mar 24 09:12:07 EET 2009
On Mar 24, 2009, at 3:02 AM, Wouter van der Schagt wrote:
>> Is the problem that mail doesn't actually get deleted when IDLE is
>> used, or that a client being in IDLE is somehow causing qmail-local
>> to give the quota errors incorrectly? I can't see how the latter
>> would be possible, IDLE really has nothing to do with quota..
>
> Just a thought...could it be that IDLE prevents a neccessary file
> handle
> from being released?
There is only one difference between what IDLE does and what a non-
IDLEing connection does: If inotify/dnotify/kqueue is enabled, Dovecot
notices immediately when a new mail pops up in new/ or cur/ directory
and does a resync. Hmm. Actually now I see one possibility if qmail-
local was written in a stupid/buggy way:
1. qmail-local does rename tmp/file -> new/file
2. Dovecot notices new/file and renames it to cur/file:2, immediately
3. qmail-local stats new/file to see if rename() succeeded (not
necessary), notices it's no longer there and fails with quota failure
(..but why quota failure?..)
That's the only explanation I can think of. This could be tested by
compiling Dovecot with --with-notify=none configure option, which
would cause IDLE to check for new mails only once in a while and make
it much less likely to hit the race condition.
More information about the dovecot
mailing list