Enable push notifications for all users
Hello all,
Is there a way to enable push notifications for all users, rather than having to enable them one by one?
My thinking was to set mail_attribute_dict to a static file but I can’t work out what I would need to put in it.
(I’ve now realised that that will not allow me to have other attributes to be different per user, but that’s not a real issue with my use case)
If a flat file isn’t the answer, then is a SQL dict my best bet?
Thanks in advance,
Felix
On 5 Jan 2022, at 23:34, Felix Ingram f.ingram@gmail.com wrote:
Hello all,
Is there a way to enable push notifications for all users, rather than having to enable them one by one?
My thinking was to set mail_attribute_dict to a static file but I can’t work out what I would need to put in it.
(I’ve now realised that that will not allow me to have other attributes to be different per user, but that’s not a real issue with my use case)
If a flat file isn’t the answer, then is a SQL dict my best bet?
I’ve switched to using a SQL dictionary for the mail attributes (via a proxy dictionary, as that seems required) but dovecot isn’t performing any lookups. The logs are saying that the key isn’t mapped, and it looks like it needs a user-specific part of the key to be included.
My current map:
map { pattern = private/vendor/vendor.dovecot/http-notify table = mailbox username_field = username value_field = username }
Is there a way to work around this? My issue is that I’m creating users on the fly and therefore they won’t exist until their first mail arrives. I’m thinking that I’m going to need to call out to the doveadm API in order to set the attribute. Does that sound doable?
Thanks in advance,
Felix
P.S. Apologies if replying to myself is messing up the thread.
On 06/01/2022 01:34 Felix Ingram f.ingram@gmail.com wrote:
Hello all,
Is there a way to enable push notifications for all users, rather than having to enable them one by one?
My thinking was to set mail_attribute_dict to a static file but I can’t work out what I would need to put in it.
(I’ve now realised that that will not allow me to have other attributes to be different per user, but that’s not a real issue with my use case)
If a flat file isn’t the answer, then is a SQL dict my best bet?
Thanks in advance,
Felix
This is pretty driver dependant thing. Which driver are you using? Push notifications are always enabled when push notification plugin is loaded with a driver, it is up to the driver to send those.
Aki
On 6 Jan 2022, at 17:27, Aki Tuomi aki.tuomi@open-xchange.com wrote:
On 06/01/2022 01:34 Felix Ingram f.ingram@gmail.com wrote:
Hello all,
Is there a way to enable push notifications for all users, rather than having to enable them one by one?
My thinking was to set mail_attribute_dict to a static file but I can’t work out what I would need to put in it.
(I’ve now realised that that will not allow me to have other attributes to be different per user, but that’s not a real issue with my use case)
If a flat file isn’t the answer, then is a SQL dict my best bet?
Thanks in advance,
Felix
This is pretty driver dependant thing. Which driver are you using? Push notifications are always enabled when push notification plugin is loaded with a driver, it is up to the driver to send those.
Thanks Aki,
I was using the Ox driver as then I can talk directly to my web API but it was complaining that the mailbox needed to have IMAP Attributes enabled. I thought this was the case for all drivers but it appears that I can use the Lua driver without having attributes enabled, so I’ve recreated the web request in Lua and that seems to be working.
Hopefully I’m not missing some key difference between the two.
Regards,
Felix
On 06/01/2022 20:54 Felix Ingram f.ingram@gmail.com wrote:
On 6 Jan 2022, at 17:27, Aki Tuomi aki.tuomi@open-xchange.com wrote:
On 06/01/2022 01:34 Felix Ingram f.ingram@gmail.com wrote:
Hello all,
Is there a way to enable push notifications for all users, rather than having to enable them one by one?
My thinking was to set mail_attribute_dict to a static file but I can’t work out what I would need to put in it.
(I’ve now realised that that will not allow me to have other attributes to be different per user, but that’s not a real issue with my use case)
If a flat file isn’t the answer, then is a SQL dict my best bet?
Thanks in advance,
Felix
This is pretty driver dependant thing. Which driver are you using? Push notifications are always enabled when push notification plugin is loaded with a driver, it is up to the driver to send those.
Thanks Aki,
I was using the Ox driver as then I can talk directly to my web API but it was complaining that the mailbox needed to have IMAP Attributes enabled. I thought this was the case for all drivers but it appears that I can use the Lua driver without having attributes enabled, so I’ve recreated the web request in Lua and that seems to be working.
Hopefully I’m not missing some key difference between the two.
Regards,
Felix
Hi!
The OX driver is supposed to work with open-xchange appsuite, and such, it needs you to set attributes so that it works.
Using Lua instead is good alternative.
Aki
participants (2)
-
Aki Tuomi
-
Felix Ingram