1

Using IMAP IDLE it is possible to listen for new mail and delete mail events. I used node-imap module in node.js to do that. But is it possible to listen for the flag change events like mark as read, unread and also folder creation/deletion/rename events?

I read about IMAP NOTIFY extension here they specified imap client but it seems gmail is not supporting it and also in node.js I can't find anymodules that implemented this "IMAP NOTIFY". Please give any suggestion to achieve this.

Dhivya
  • 689
  • 8
  • 14
  • 1
    A server may send flag change events while IDLE as an unsolicited FETCH response. It is not possible to get folder change events in baseline IMAP. – Max Feb 24 '14 at 13:42
  • @Max With Imap NOTIFY extension we can get folder change events but it is rarely supported among imap servers. – Dhivya Feb 25 '14 at 06:59

1 Answers1

2

As for the flag and keyword changes, yes, the IDLE extension was designed just for this purpose. Please note that Gmail does not report flag changes when in IDLE. The linked thread contains a workaround. Gmail's behaivor is completely breaindead, of course.

As for other changes, the NOTIFY extension is what you are looking for, but its support among servers is rather scarce -- only Dovecot, AFAIK. If your favorite IMAP client library doesn't offer it already, you should ask their authors.

Mark Amery
  • 143,130
  • 81
  • 406
  • 459
Jan Kundrát
  • 3,700
  • 1
  • 18
  • 29
  • Thank you for your response.. Yes NOTIFY extension is rarely supported among imap servers.. And I found another useful command CONDSTORE that would solve my problem in imap syncing.. – Dhivya Feb 25 '14 at 06:58