Questions about Dovecot push notifications

Ralf Becker rb at egroupware.org
Tue Jul 21 13:26:33 EEST 2020


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:
>
> 1. can I set some static metadata via userdb to enable push for all
> mailboxes?
>
> 2. 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!


> 3. what purpose does the user=<something at else> argument in the doveadm
> command to enable push server:
>
>     doveadm mailbox metadata set -u user at example.com -s ""
> /private/vendor/vendor.dovecot/http-notify user=11 at 3
>
> Does it replace "user at example.com" in the push payload with
> <something at 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.


> 4. 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://dovecot.org/pipermail/dovecot/attachments/20200721/6f8ae502/attachment.sig>


More information about the dovecot mailing list