push-notification plugin and imap-metadata permissions

Teemu Huovila teemu.huovila at dovecot.fi
Mon Apr 25 08:51:30 UTC 2016

On 23.04.2016 10:01, giovanni at giovannisfois.net wrote:
> On 2016-04-22 09:07 PM, Timo Sirainen wrote:
>> On 22 Apr 2016, at 15:17, Giovanni S. Fois <giovanni at giovannisfois.net> wrote:
>>> In order to tell if a mailbox is enabled to send out the notification, the plugin
>>> looks out for the following mailbox metadata key:
>>> /private/vendor/vendor.dovecot/pvt/server/vendor/vendor.dovecot/http-notify
>>> If the key is set then everything is OK and the notification is sent, otherwise the
>>> action is skipped.
>>> If I try to setup the metadata key by hand (telnet as the user over the imap port):
>>> setmetadata INBOX (/private/vendor/vendor.dovecot/pvt/server/vendor/vendor.dovecot/http-notify "user=myuser at mydomain.com")
>>> I get the error message: "Internal mailbox attributes cannot be accessed"
>> Server metadata is set with:
>> a SETMETADATA "" (/private/vendor/vendor.dovecot/http-notify "user=myuser at mydomain.com")
>> Which should internally map into the INBOX's /private/vendor/vendor.dovecot/pvt/server/vendor/vendor.dovecot/http-notify.
> I am sorry, but this is not working.
> As you suggested I have launched the imap commands:
> a setmetadata ""  (/private/vendor/vendor.dovecot/http-notify "user=myuser at mydomain.com")
> b getmetadata "" "/private/vendor/vendor.dovecot/http-notify"
> c getmetadata "INBOX" "/private/vendor/vendor.dovecot/pvt/server/vendor/vendor.dovecot/http-notify"
> the 'b' command returns a sort of json with the correct result
> the 'c' command returns NIL
After command "a", I think you should have gotten the push notification. The getmetadata imap command is not supposed to be able to access the path with /pvr/server/ in it. It is used for internal mapping only. Since command "b" returned the data, I would say the metadata is correctly set.

Teemu Huovila

> By the way,  hardcoding the key as "/private/vendor/vendor.dovecot/http-notify" and recompiling the plugin
> has the effect to bring the system on the expected course.
> Thank you again for your time and kind support.
> Have a good weekend,
> Giovanni

More information about the dovecot mailing list