Reuben Farrelly
2005-Aug-18 10:47 UTC
Dovecot IDLE problem (was Re: [Dovecot] inotify support in dovecot)
Hi, I've come across some possibly buggy behaviour with regards to Dovecot and the use of the IDLE keyword. Found this while testing out inotify support for Johannes - although after asking him and him reproducing it, he is of the opinion that it's not a inotify specific problem. The behaviour is that when the client is idling, Dovecot seems to only alert to the first new message received, and if a subsequent new message comes in before the client finishes idling, that second new message is not notified to the connected client. To reproduce: $ maildirmake /tmp/imap-test $ cat >/tmp/1 <<EOF From: test To: test Subject: test test! <Ctrl-D> $ MAIL=Maildir:/tmp/imap-test /usr/libexec/dovecot/imap ... A SELECT INBOX B IDLE [now, in a different terminal, copy /tmp/1 to /tmp/imap-test/new, you should instantly be notified of it in your imap session] ** Dovecot correctly responds with: * 1 EXISTS * 1 RECENT [if a second message is delivered, eg by copying /tmp/1 to /tmp/imap-test/new/2 then you should be notified as well, but this never occurs] DONE C LOGOUT $ Timo - what do you think? Reuben
Kenneth Porter
2005-Aug-18 13:02 UTC
Dovecot IDLE problem (was Re: [Dovecot] inotify support in dovecot)
--On Thursday, August 18, 2005 10:47 PM +1200 Reuben Farrelly <reuben-dovecot at reub.net> wrote:> [if a second message is delivered, eg by copying /tmp/1 to > /tmp/imap-test/new/2 then you should be notified as well, but this never > occurs]Is that true? I would think you only want notification one time after each new command (eg. IDLE), to indicate that the client is out-of-date wrt the server. It's essentially a "cache dirty" notification. It's then the client's job to bring itself up to date with the server state, at which point a new notification is appropriate. BTW, does IMAP provide any notification ability for folders other than INBOX? I deliver via procmail to other folders and I believe Mulberry has to poll them periodically to check for new mail. (Different mailing lists and different friends each get their own folder.) Doing my filtering server-side means I don't need to maintain parallel filters on all my clients, on all the systems I use. (I gotta get around to doing the same for my address book, setting up an LDAP server.)
Timo Sirainen
2005-Aug-18 16:00 UTC
Dovecot IDLE problem (was Re: [Dovecot] inotify support in dovecot)
On Thu, 2005-08-18 at 22:47 +1200, Reuben Farrelly wrote:> The behaviour is that when the client is idling, Dovecot seems to only alert > to the first new message received, and if a subsequent new message comes in > before the client finishes idling, that second new message is not notified to > the connected client.It is notified, just not immediately. And it's intended to work like that. If Dovecot tells the client about a new message and it doesn't care enough about it enough to break IDLE, it doesn't need to know about the second message immediately either. Although I suppose with clients that use a second connection to read the new mails this kind of behavior isn't exactly wanted.. Well, I'd like to know if such clients exist before changing this.> * 1 EXISTS > * 1 RECENT > > [if a second message is delivered, eg by copying /tmp/1 to > /tmp/imap-test/new/2 then you should be notified as well, but this never occurs]It should occur in 30-60sec or so. -------------- 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/20050818/323ef72a/attachment.bin>
Seemingly Similar Threads
- Re: Dovecot inotify problem
- Dovecot User Listing Error - getpwent() failed: Invalid Argument
- Dovecot User Listing Error - getpwent() failed: Invalid Argument
- Dovecot User Listing Error - getpwent() failed: Invalid Argument
- Dovecot User Listing Error - getpwent() failed: Invalid Argument