z-push imap + Iphone

Like I mentioned in my last post I bought myself an IPhone. Before my IPhone I had my blackberry and I got used to being notified when I got new mail. On the IPhone however IMAP only has 15minutes updates, so you have to wait and it’s not really 15 minutes …

The nice people from zarafa created z-push. An opensource php application that mimics active-sync. I installed on my server and made some small changes. Now it works on my imap account and I get notified of new mails in my inbox.

I did however have to do some minor changes in the php code.

In config.php changed backend to imap


in backend/imap.php changed to retrieval to only retrieve the INBOX to check for changes (I have +100 folders)

$list = @imap_getmailboxes($this->_mbox, $this->_server, “%”);

in backend/diffbackend.php I changed the default cutoffdate (this showed up 0 in the logging)

function getCutOffDate($restrict) {

Now my automatic notify works 🙂

Like they mention in the forums, it does drain your battery life on the IPhone. So be carefull when you turn it on!

One Reply to “z-push imap + Iphone”

  1. This is the first reason I’m not buying an iPhone,
    I just love my blackberry… mail arrives on my mobile
    even before iMail can notify me about it.

    Some of the other reasons would be
    – poor battery lifetime (as you mentioned)
    – who wants to learn Objective-C anyway….
    – Replying to e-mails and chatting with a touchscreen is a PITA
    (Do own an iPod touch though… so it’s not as if I haven’t tried :p)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.