Push email on iPhone and other smartphones… without Exchange
Tonight, I found a clever open-source project entitled Z-Push. This small collection of PHP sits in a web directory and responds to ActiveSync queries — the protocol used for Exchange. It then checks and delivers email.
This is useful because of the limitations of some smartphones — such as the iPhone — wherein Exchange-hosted mail is delivered instantly, while standard POP3 or IMAP mail accounts suffer a long polling delay.
On the server side, configuration is fairly simple:
- wget http://download.berlios.de/z-push/z-push-1.3RC.tar.gz
- tar xzvf z-push-1.3RC.tar.gz
- mv z-push /var/www/html
- yum install php-imap
- chown apache:apache /var/www/html/z-push/state
- vi /var/www/html/z-push/config.php and configure the following:
- Add the following Alias to an Apache SSL VirtualHost:
- Restart Apache
$BACKEND_PROVIDER = “BackendIMAP”;
define(’IMAP_SERVER’, ‘localhost’);
define(’IMAP_PORT’, 143);
define(’IMAP_OPTIONS’, ‘/notls/norsh’);
Alias /Microsoft-Server-ActiveSync /var/www/html/z-push/index.php
On your phone, simply create a new Exchange-type account that points to your server as if it was an Exchange server. Send a test mail and marvel at how fast it appears on your phone! Tested on iPhone and Motorola Droid with excellent success.