Re: Cyrus 3.0.3 XAPPLEPUSH

Sebastian Hagedorn <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
Hi Arnaldo,

thank you very much! This has been very enlightening. I think I understand 
most of it and have already set up a testing environment with a certificate 
from our OS X Server. What I have not yet understood completely is how you 
populate the database. Where do I find the "APNS Account Id" and the "APNS 
Device Token" for the devices table, and what do I put in the mailboxes 
table?

Thanks,
Sebastian

--On 23. August 2017 um 08:27:04 -0300 Arnaldo Viegas de Lima 
<[email protected]> wrote:

> 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!

----
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
signature.asc (application/pgp-signature, 191 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0

iEYEARECAAYFAlmexa8ACgkQGXsGmU0QW0V44wCgjvfa2gmPFAiAjyJE1puQSiGn
o3cAn2Q7+P6Oxe18aVHWFOg/GZJOS24k
=17Ta
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.