[Dovecot] Numpty question about EXISTS...
I'm fiddling with Ruby and its IMAP class. I'm trying to write something which (at this stage) can be thought of as a variant on xbiff which doesn't need poll the server to establish the presence of new mail... I'd like to establish a notification when the contents of a folder changes... which is likely to be when a different IMAP client moves a message into a new folder.
I've been lead to believe that I can use the "EXISTS" response to trigger the 'new message present in IMAP folder" event in my program... but I don't seem to receive them when I would expect to when connected to my Dovecot server. I get one "EXISTS" message when I call "select" - but that's it - it doesn't seem to notice when another client moves messages in/out of the folder. Are my assumptions about IMAP incorrect
- i.e. must I still poll? Can Dovecot be configured to send EXIST responses (or any other form of notification) when messages are moved into a folder?
Any hints appreciated.
Steve
On Tue, 2005-10-11 at 18:29 +0100, Steve [Dovecot] wrote:
I've been lead to believe that I can use the "EXISTS" response to trigger the 'new message present in IMAP folder" event in my program... but I don't seem to receive them when I would expect to when connected to my Dovecot server. I get one "EXISTS" message when I call "select" - but that's it - it doesn't seem to notice when another client moves messages in/out of the folder. Are my assumptions about IMAP incorrect
- i.e. must I still poll? Can Dovecot be configured to send EXIST responses (or any other form of notification) when messages are moved into a folder?
Run "IDLE" command. Also note that you'll have to break out of it every 29 minutes and start it again or Dovecot disconnects you because of idling too long. Maybe see RFC 2177 also about how IDLE is supposed to be used.
Timo Sirainen wrote:
On Tue, 2005-10-11 at 18:29 +0100, Steve [Dovecot] wrote:
I've been lead to believe that I can use the "EXISTS" response to trigger the 'new message present in IMAP folder" event in my program... but I don't seem to receive them when I would expect to when connected to my Dovecot server. I get one "EXISTS" message when I call "select" - but that's it - it doesn't seem to notice when another client moves messages in/out of the folder. Are my assumptions about IMAP incorrect
- i.e. must I still poll? Can Dovecot be configured to send EXIST responses (or any other form of notification) when messages are moved into a folder?
Run "IDLE" command. Also note that you'll have to break out of it every 29 minutes and start it again or Dovecot disconnects you because of idling too long. Maybe see RFC 2177 also about how IDLE is supposed to be used. Thanks! That now makes perfect sense. I wasn't aware of IDLE - and didn't find anything about this in RFC 2060 (the main IMAP4 one) or my IMAP access library documentation. I've no problem with polling every (say) 10 minutes - as long as my program doesn't only detect new mails in the folder when I poll. My challenge now is to work out how to cajole my IMAP client access library to do IDLE - as it doesn't seem to be supported as standard.
(Again) - many thanks,
Steve
Steve [Dovecot] wrote:
Thanks! That now makes perfect sense. I wasn't aware of IDLE - and didn't find anything about this in RFC 2060 (the main IMAP4 one) or my
I'm not sure how different it is, but you probably ought to be reading from RFC 3501 - IMAP 4 rev 1, since it's the one I believe Timo is working from.
Curtis Maloney cmaloney@cardgate.net
participants (3)
-
Curtis Maloney
-
Steve [Dovecot]
-
Timo Sirainen