The greatest challenge to any thinker is stating the problem in a way that will allow a solution

Bertrand Russell

By

On 7 Sep 2011

Zimbra

Tags: , , ,


The free open source (FOSS) version of Zimbra lacks the ability to push email (and calendar and contact) updates to your mobile device. In the Network Edition and Appliance versions this feature is known as Zimbra Mobile, which is an implementation of Microsoft’s Active-Sync protocol. You can have these features with the FOSS version, but you need to implement it yourself.

To do so you need three things…

  1. A pubic Apache web-server with good access to your Zimbra server
  2. Z-Push – provides Active-Sync front-end to your mobile devices
  3. Zimbra backend – interfaces with your Zimbra server

UPDATE:  I’ve now documented how get full HTML email sync working using Z-Push (plus I get the impression the below procedure doesn’t reliably work) – which I’ve documented on this vBlog and my vWiki

Core procedure is the same in both, but there’s a bit more explanation on the vBlog post, and the vWiki article includes setting up Z-Push over SSL.

These instructions assume that you already have a working Apache web server with PHP running on it, with which to run the Z-Push and Zimbra Backend PHP scripts.

How to get it up and running…

  1. Download the latest version from https://developer.berlios.de/project/filelist.php?group_id=8963
  2. Extract the download
    • eg tar -zvf z-push-1.5.4-707.tar.gz
  3. Copy the software to your web root
    • cp -r z-push-1.5.4-707 /var/www/z-push
  4. Allow write access to the state folder
    • EG chgrp www-data /var/www/z-push/state
    • EG chmod g+w /var/www/z-push/state
  5. Edit config.php settings for
    1. Timezone (set to your local timezone)
      • EG date_default_timezone_set("Europe/London");
    2. Provisioning (security – needs to be relaxed for older mobile devices)
      • EG define('LOOSE_PROVISIONING', true);
    3. Backend provider
      • EG $BACKEND_PROVIDER = "BackendZimbra";
    4. and append the following Zimbra Backend settings
      • // ************************
      • // BackendZimbra settings
      • // ************************
      • define('ZIMBRA_URL', 'https://NameOfYourDoman.com'); //Please do not put a trailing forward slash at the end of the url
      • define('ZIMBRA_USER_DIR', 'zimbra');
      • define('ZIMBRA_SYNC_CONTACT_PICTURES', true);
      • define('ZIMBRA_VIRTUAL_CONTACTS',true);
      • define('ZIMBRA_VIRTUAL_APPOINTMENTS',true);
      • define('ZIMBRA_VIRTUAL_TASKS',true);
      • define('ZIMBRA_IGNORE_EMAILED_CONTACTS',true);
      • define('ZIMBRA_HTML',true);
      • define('ZIMBRA_ENFORCE_VALID_EMAIL',true);
      • define('ZIMBRA_SMART_FOLDERS',true);
      • define('ZIMBRA_DEBUG',true);
  6. Create file for debug to go to
    • touch /var/www/z-push/debug.txt
    • chmod 777 /var/www/z-push/debug.txt
  7. Install PHP cURL
    • apt-get install php5-curl
  8. Download z-RTF.php to the include directory
  9. Add an alias to the Apache site config (eg /etc/apache2/sites-enabled/000-default)
    • /Microsoft-Server-ActiveSync /var/www/z-push/index.php
    • <Directory /var/www/z-push>
    • AllowOverride All
    • </Directory>
  10. Create a .htaccess in root of z-push with the following entries
    • php_flag magic_quotes_gpc off
    • php_flag register_globals off
    • php_flag magic_quotes_runtime off
    • php_flag short_open_tag on
  11. Download the latest Zimbra Backend release from http://downloads.sourceforge.net/project/zimbrabackend and untar to backend folder

All being well you should now be able to sync your mobile to you Zimbra server…!


6 Comments to “Z-Push (ActiveSync) for Zimbra FOSS”

  1. Vucomir Ianculov says:

    hi,
    Thanks for the tutorial, it works very greate i have only one problem i can’t sent email from my my mobile phone.

    can you please help me with this.

    Thanks

  2. simonstrutt says:

    Not sure – I’ve not actually used this much since I set it up yet, and haven’t had the problem you describe. I’d recommend using the Zimbra forum thread (link above) to ask the question.

    Cheers
    Simon

  3. […] back I played with getting ActiveSync working for my Zimbra server using Z-Push (see previous post here), which was OK, but due to the lack of HTML email sync support and the fact that it seemed likely […]

  4. javier pardo says:

    hi,
    very nice article, when you said
    define(‘ZIMBRA_URL’, ‘https://NameOfYourDoman.com’);
    what service is exactly of the zimbra??
    thanks for all
    javier

Leave a Reply

XHTML: You can use these tags if you know what they are: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

ERROR: si-captcha.php plugin says GD image support not detected in PHP!

Contact your web host and ask them why GD image support is not enabled for PHP.

ERROR: si-captcha.php plugin says imagepng function not detected in PHP!

Contact your web host and ask them why imagepng function is not enabled for PHP.