Listening to folder create, delete, renamed and mail flagged events in imap server?

StackOverflow https://stackoverflow.com/questions/21981316

  •  15-10-2022
  •  | 
  •  

質問

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.

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top