Questions about Dovecot push notifications
I read the docu available under: https://doc.dovecot.org/configuration_manual/push_notification/
I'm using Dovecot 2.2.36.4 with directors and a replicating pair of backends using a custom dict with proxy protocol for user- and passdb plus a userdb using sqlite for backup.
I understand 2.2 only allows to notify about new arriving mails, not eg. flag-changes which would require 2.3 with LUA.
I want to use the ox notification driver with a http url (https seems to be 2.3 only).
I read to enable push notifications on a mailbox I need:
a) IMAP metadata enabled incl. a backend/driver to store the metadata b) enable push for the individual mailbox using a doveadm command (maybe also via IMAP, which would be easier in my case)
My questions are:
can I set some static metadata via userdb to enable push for all mailboxes?
if no, does setting the metadata on one replicating backend replicates it to the other one too?
what purpose does the user=<something@else> argument in the doveadm command to enable push server:
doveadm mailbox metadata set -u user@example.com -s "" /private/vendor/vendor.dovecot/http-notify user=11@3
Does it replace "user@example.com" in the push payload with <something@else>?
- can I set the required metadata via IMAP command preferable with a (already configured) master user?
Thanks in advance :)
Ralf
-- Ralf Becker EGroupware GmbH [www.egroupware.org] Handelsregister HRB Kaiserslautern 3587 Geschäftsführer Birgit und Ralf Becker Leibnizstr. 17, 67663 Kaiserslautern, Germany Telefon +49 631 31657-0
I managed to figure out some of my questions and answer them here I case someone else runs into them:
Am 16.07.20 um 09:39 schrieb Ralf Becker:
I read the docu available under: https://doc.dovecot.org/configuration_manual/push_notification/
I'm using Dovecot 2.2.36.4 with directors and a replicating pair of backends using a custom dict with proxy protocol for user- and passdb plus a userdb using sqlite for backup.
I understand 2.2 only allows to notify about new arriving mails, not eg. flag-changes which would require 2.3 with LUA.
I want to use the ox notification driver with a http url (https seems to be 2.3 only).
I read to enable push notifications on a mailbox I need:
a) IMAP metadata enabled incl. a backend/driver to store the metadata b) enable push for the individual mailbox using a doveadm command (maybe also via IMAP, which would be easier in my case)
My questions are:
can I set some static metadata via userdb to enable push for all mailboxes?
if no, does setting the metadata on one replicating backend replicates it to the other one too?
Yes, metadata get's replicated, you even have to create the metadata configuration on both replication nodes, otherwise the replication stops!
- what purpose does the user=<something@else> argument in the doveadm command to enable push server:
doveadm mailbox metadata set -u user@example.com -s "" /private/vendor/vendor.dovecot/http-notify user=11@3
Does it replace "user@example.com" in the push payload with <something@else>?
That allows to store eg. your push token in the user attribute Dovecot sends out.
You have to specify user_from_metadata in push_notification_driver.
- can I set the required metadata via IMAP command preferable with a (already configured) master user?
As get and set metadata is a regular IMAP command that should work, thought I don't use it currently.
Ralf
-- Ralf Becker EGroupware GmbH [www.egroupware.org] Handelsregister HRB Kaiserslautern 3587 Geschäftsführer Birgit und Ralf Becker Leibnizstr. 17, 67663 Kaiserslautern, Germany Telefon +49 631 31657-0
participants (1)
-
Ralf Becker