Hi, I recently switched from courier imap to dovecot. With courier I had a working IDLE setup that informed me immediately when new mail arrived. With Dovecot it is different, sometimes i get an immediate result but most of the time it takes a rather long time for the notification to return to the client. For testing purposes I set mailbox_idle_check_interval = 1 and i now get the same behaviour as with couier (a new mail immediately causes a notification) but i am not sure that this is the right solution. Reading the comments in the config files I was under the impression that this is not needed if dovecot uses inotify. Setup: Kernel 2.6.22.1 with inotify dovecot 1.0.3 from debian unstable Build options: ioloop=epoll notify=inotify ipv6 openssl So my question is can I check that dovecot is actually using inotify? Kind regards, Michael
On Aug 12, 2007, at 11:20 AM, Michael Guntsche wrote:> So my question is can I check that dovecot is actually using inotify?Which brings me to another question for Timo.. Running Dovecot 1.0.3 on OS X 10.4.10 here. Which --with-notify compile time option would you suggest? dnotify, inotify, kqueue, or none. P.S. The version of 1.0.3 that we're currently running was compiled without a "with-notify" instruction. It still appears to implement some form of idle / notify. We've tested with Thunderbird and Apple's Mail.app (with imap-idle-plugin installed). Even though both clients have been set NOT to check mail on an interval we are still notified when mail arrives. B. Bodger
On Aug 12, 2007, at 18:33, Bruce Bodger wrote:> > On Aug 12, 2007, at 11:20 AM, Michael Guntsche wrote: > >> So my question is can I check that dovecot is actually using inotify? > > Which brings me to another question for Timo.. > > Running Dovecot 1.0.3 on OS X 10.4.10 here. Which --with-notify > compile time option would you suggest? dnotify, inotify, kqueue, > or none.You should use kqueue under macosx since dnotify and inotify are linux only. Kind regards, Michael
On Aug 12, 2007, at 1:00 PM, Michael Guntsche wrote:>> Running Dovecot 1.0.3 on OS X 10.4.10 here. Which --with-notify >> compile time option would you suggest? dnotify, inotify, kqueue, >> or none. > > You should use kqueue under macosx since dnotify and inotify are > linux only.Thanks for that, Mike! Adding --with-notify=kqueue made a world of difference here! Really appreciate the advice. B. Bodger
On Sun, 2007-08-12 at 17:20 +0200, Michael Guntsche wrote:> So my question is can I check that dovecot is actually using inotify?You can strace it or put a few print statements into the code. johannes -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070813/08f9c6b1/attachment-0002.bin>
On Sun, 2007-08-12 at 17:20 +0200, Michael Guntsche wrote:> Hi, > > I recently switched from courier imap to dovecot. With courier I had > a working IDLE setup that informed me immediately when new mail > arrived. With Dovecot it is different, sometimes i get an immediate > result but most of the time it takes a rather long time for the > notification to return to the client. > For testing purposes I set mailbox_idle_check_interval = 1 and i now > get the same behaviour as with couier (a new mail immediately causes > a notification) but i am not sure that this is the right solution. > Reading the comments in the config files I was under the impression > that this is not needed if dovecot uses inotify.What IMAP client do you use? Currently Dovecot works like: - IDLE starts - if maildir changes, the new changes are reported immediately - if client doesn't break from IDLE, continue.. - if maildir changes before maildir_idle_check_interval seconds, wait This works nicely if client breaks from IDLE, but it looks like nowadays some clients just use multiple connections where one is always in IDLE. So maybe I'll have to change that. -------------- 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/20070813/394efcc1/attachment-0002.bin>
On Aug 13, 2007, at 13:49, Timo Sirainen wrote:> > What IMAP client do you use? Currently Dovecot works like: > > - IDLE starts > - if maildir changes, the new changes are reported immediately > - if client doesn't break from IDLE, continue.. > - if maildir changes before maildir_idle_check_interval seconds, wait > > This works nicely if client breaks from IDLE, but it looks like > nowadays > some clients just use multiple connections where one is always in > IDLE. > So maybe I'll have to change that.I am using the inotify plugin bundle for mail.app most of the time and I tested it via a telnet connection too. As far as i know the imap-idle-plugin opens a seconds connection and keeps it in idle state. This might explain why i see the current behaviour with it and my telnet tests. First notification happens immediately and if the client does not break from IDLE it just waits for maildir_idle_check_interval seconds. Maybe this can be changed that it does not take the interval into account of it uses inotify, dnotify or kqueue. My workaround for now is to set the timeout to 1. Kind regards, Michael
On Aug 13, 2007, at 13:49, Timo Sirainen wrote:> What IMAP client do you use? Currently Dovecot works like: > > - IDLE starts > - if maildir changes, the new changes are reported immediately > - if client doesn't break from IDLE, continue.. > - if maildir changes before maildir_idle_check_interval seconds, wait > > This works nicely if client breaks from IDLE, but it looks like > nowadays > some clients just use multiple connections where one is always in > IDLE. > So maybe I'll have to change that. >Hello Timo, Just for my information, are you planning to do something about this special issue in 1.1 or will this happen in a later version? Kind regards, Michael