tallence / push-notification-kafka-plugin

A driver for Dovecot's Push Notification Framework for publishing push notification events to a Kafka broker.
Other
6 stars 4 forks source link

Keyword change events are not processed #10

Closed jrse closed 5 years ago

jrse commented 5 years ago

Currently the keyword change events are not processed.

jrse commented 5 years ago

See: https://github.com/dovecot/core/blob/master/src/plugins/push-notification/push-notification-driver-lua.c#L156

jrse commented 5 years ago

Set keyword json: {"user":"t1","mailbox":"INBOX.Drafts","event":"FlagsSet","uidv alidity":1540992474,"uid":49,"keywords":["$label3"]}

remove keyword json: {"user":"t1","mailbox":"INBOX.Drafts","event":"FlagsClear","ui dvalidity":1540992474,"uid":49,"keywords":["$label1"]}

jrse commented 5 years ago

The problem was not the registration of the events, the problem was the plugin misconfiguration. This was the test 90-plugin.conf

push_notification_driver=kafka:topic=SMF.NEWKEYWORD events=FlagsClear,FlagsSet send_flags=off push_notification_driver=kafka:topic=SMF.DELETEMAIL events=MessageExpunge

With this configuration, the second push_notification_driver will override the first settings, and FlagsClear and FlagsSet (responsible for keyword changes) are not initialized.

To specify more than one push_notification_driver the following schema should be used:

push_notification_driver= push_notification_driver2= push_notification_driver3= ...