[Dovecot] IMAP IDLE - iPhone?
ms at mike2k.de
Fri Aug 10 12:29:42 EEST 2012
On 10-Aug-12 4:48, Timo Sirainen wrote:
> Related question that came to my mind: Does anyone know if XAPPLEPUSHSERVICE feature can be implemented by any server, or does it require cooperation between the server and the mobile network operator? I'm guessing the latter..
the Apple push service for Mail.app uses the same push notification
service as all other
push notifications for iOS (APNS, Apple Push Notification Service). The
Device retains a
persistent connection to Apple's APNS Gateway.
To transmit a push notification via APNS, the sender needs a certificate
issued by Apple
for the receiving application (Mail.app in this case). One can get such
a certificate by
purchasing Lion Server, which includes such a certificate (I presume
Server does as well).
The Lion Server uses dovecot, and Apple's patch for the
is available on
It basically works as following:
1) Dovecot advertises the XAPPLEPUSHSERVICE Capability
2) When the device logs in to the IMAP server and sees that it supports
this capability, it registers with the server for push notifications and
provides its device id and the id of the corresponding mail account on
the device. These two ids are required to route a push notification to
3) The server records all registered devices for an account. Upon an
incoming mail for the account, it transmits a push notification.
4) The device does not directly unregister; this is done using the
feedback mechanism of APNS, which tells a service provider that a device
does not wish to receive push notifications any longer.
The actual transmission of the push notifications to the APNS server is
not part of the dovecot patch
but a separate program. One can use the Net::APNS perl module (found on
cpan) to fairly easily
replicate that program. Apple's original is also available:
P.S.: I'm not sure if one is allowed to do this, though.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4493 bytes
Desc: S/MIME Cryptographic Signature
More information about the dovecot