Hi Sebastian, A few notes: - You need a valid push certificate. You can get one from macOS Server, but I do not know the limitations on the usage. My shop is really small, so I think it’s not a problem. - There is close to nothing documenting how this work, so much of it is based on looking at the source code (Cyrus), from info on a similar Dovecot plugin and on the actual Apple source code (based on Dovecot). Also a lot of debugging and trial and error. - Contrary to the existing (and minimal) reference in the docs, there is no “—enable-apple-push-service” configure flag. The code in imapd is so simple and harmless that it’s always compiled. - XAPPLEPUSH requires TLS, so if TLS is not configured it will not be advertised. - XAPPLEPUSH is only advertised with the proper notifications settings (see bellow). - I used MySQL because it’s already running on the same server as Cyrus and I have a nice set of functions to make scripts like this a breeze. For the same reasons, it’s in PHP. This is what needs to be added to imapd.conf: # Apple Push Service Events event_notifier: external event_groups: applepushservice message flags event_extra_params: timestamp vnd.cmu.unseenMessages notify_external: /usr/local/bin/notifyd_apns aps_topic: com.apple.mail.XServer.xxxxxxxxxxxxxxx aps_topic is the common name take from the certificate. It’s sent to the mobile device so that it will match the source of the push notification when it arrives. The MySQL database configuration is also attached. For the certificate you need to enable mail services and export the “mobilemail” certificate and key (as pkcs12) from the keychain. Then use openssl to remove key and certificate as well as to unencrypt the key. Combine both in a single PEM file. Enjoy!
Attachment:
notifyd_apns
Description: Binary data
Attachment:
apns_mobilemail.sql
Description: Binary data
---- Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus