On Tue, 24 Mar 2009 08:12:07 +0100, Timo Sirainen <t...@iki.fi> wrote:

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?..)

The quota failure comes from a patch. An unpatched qmail-local thinks the mail 
was not delivered properly, gives a temporary error and tries the delivery 
again... and again... and again.

I'm no C expert, therefore I can't tell how qmail-local handles the delivery 
exactly.


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.

I tried that already, but that was at the very beginning of my troubleshooting. The only other reference to the problem I'm experiencing was from a guy using Debian, who got around it by installing the inotify packages.
Will --with-notify=none disable kevent and inotify/dnotify? I'll give it 
another shot then and report back.

Jochen




Reply via email to