John O'Brien
2010-Aug-27 08:05 UTC
[Dovecot] Is there a way to catch mailbox and message flag changes?
Guys, We have been trying to establish if there is a way to get some type of notification from Dovecot when a message is appended to a mailbox or when a message has its flags updated. These are the 2 use cases: A message is appended to the mailbox "/Watch", we want to trigger "processing" of the message immediately it arrives. A message in the "Inbox" has its status changed from Unseen to Seen, we want to trigger some code to indicate the message has been "processed". Regards, John
Timo Sirainen
2010-Aug-31 18:28 UTC
[Dovecot] Is there a way to catch mailbox and message flag changes?
On Fri, 2010-08-27 at 18:05 +1000, John O'Brien wrote:> We have been trying to establish if there is a way to get some type of > notification from Dovecot when a message is appended to a mailbox or > when a message has its flags updated. > > These are the 2 use cases: > A message is appended to the mailbox "/Watch", we want to trigger > "processing" of the message immediately it arrives. > A message in the "Inbox" has its status changed from Unseen to Seen, > we want to trigger some code to indicate the message has been > "processed".http://wiki.dovecot.org/Plugins/MailLog can log these events, although you'll get a lot of other notifications logged too then. There's not much filtering support in it. You can of course modify the plugin yourself to add such filters, shouldn't need too many lines of code.