If you want to obtain Exchange ActiveSync ability on your Zimbra Open Source Edition, you can integrate Zimbra and Z-push + Zimbra Backend. With it, you can synchronize email, contacts, and calendars between Zimbra and your mobile device.
This article only for Zimbra that installing Single Server. If you have Zimbra with multi-server installation, I recommend you to install Z-push + Zimbra Backend on a separate server.
This guidance has been tested on Zimbra 8.8.12 – 8.8.15
# Install dependencies
For CentOS 7
yum install epel-release -y yum install git php-cli php-soap php-process php-mbstring -y
For Ubuntu 16.04 and 18.04
apt update -y apt install git php-cli php-soap php-cgi php-mbstring php-curl -y
Clone repo
git clone https://github.com/imanudin11/zcs-zpush.git cd zcs-zpush/
Create folder for log
mkdir /var/lib/z-push /var/log/z-push chmod 755 /var/lib/z-push /var/log/z-push chown zimbra:zimbra /var/lib/z-push /var/log/z-push
Save z-push folder on /opt/
cp -rvf z-push /opt/
Note : I use Asia/Jakarta as my Timezone. Please open /opt/z-push/config.php and adjust/change Asia/Jakarta to your Timezone
Create symlink
ln -sf /opt/z-push /opt/zimbra/jetty/webapps/
Save php script on /usr/bin
cp php-cgi-fix.sh /usr/bin/php-cgi-fix.sh chmod +x /usr/bin/php-cgi-fix.sh
Change publicHostname domain on your Zimbra into localhost
su - zimbra -c 'zmprov md yourzimbradomain.tld zimbraPublicServiceHostname localhost zimbraPublicServiceProtocol https'
Note : If you have more than 1 domain, and that domain want to use Exchange ActiveSync, you should run above command for each domains
# Backup and replace jetty.xml.in
For Zimbra 8.8.6
cp /opt/zimbra/jetty/etc/jetty.xml.in /opt/zimbra/jetty/etc/jetty.xml.in.backup cp jetty.xml.in-for-zcs-886 /opt/zimbra/jetty/etc/jetty.xml.in chown zimbra.zimbra /opt/zimbra/jetty/etc/jetty.xml.in
For Zimbra 8.8.7
cp /opt/zimbra/jetty/etc/jetty.xml.in /opt/zimbra/jetty/etc/jetty.xml.in.backup cp jetty.xml.in-for-zcs-887 /opt/zimbra/jetty/etc/jetty.xml.in chown zimbra.zimbra /opt/zimbra/jetty/etc/jetty.xml.in
For Zimbra 8.8.8 – Zimbra 8.8.12
cp /opt/zimbra/jetty/etc/jetty.xml.in /opt/zimbra/jetty/etc/jetty.xml.in.backup cp jetty.xml.in-for-zcs-888-8812 /opt/zimbra/jetty/etc/jetty.xml.in chown zimbra.zimbra /opt/zimbra/jetty/etc/jetty.xml.in
For Zimbra 8.8.15
cp /opt/zimbra/jetty/etc/jetty.xml.in /opt/zimbra/jetty/etc/jetty.xml.in.backup cp jetty.xml.in-for-zcs-8815 /opt/zimbra/jetty/etc/jetty.xml.in chown zimbra.zimbra /opt/zimbra/jetty/etc/jetty.xml.in
# Add zpush.ini into php
For CentOS 7
cp zpush.ini /etc/php.d/zpush.ini
For Ubuntu 16.04
cp zpush.ini /etc/php/7.0/cgi/conf.d/10-zpush.ini
For Ubuntu 18.04
cp zpush.ini /etc/php/7.2/cgi/conf.d/10-zpush.ini
Restart Zimbra Mailbox
su - zimbra -c 'zmmailboxdctl restart'
For testing, please access https://ip-of-zimbra/Microsoft-Server-ActiveSync from your browser. Log in with your Zimbra account. If it works, you can see the output as below. Or you can configure your mail apps on mobile devices and ensure choose exchange/activesync
Hi,thank you for your information.
I have something to ask you.
Is there jetty.xml.in for ZCS8.8.5(universal ui unofficial)
Hello,
You can use jetty for 886
Hi Ahmad, your tutorials are great! Thank you. I’ve tried to get this work, but something is not right, the schedules and the e-mails not pushing to the phones. I’m using Ubuntu 18.04.03 with the latest Zimbra build.
Hi Tamas,
Please make sure your mobile phone :
– Enable sync
– Please choose Automatic (Push) on Sync frequency. This configuration is there on your Mail client apps
I tried, but it does not work in Centos 7 and the latest version of zimbra
HTTP ERROR 404
Problem accessing /service/extension/zimbrasync. Reason:
Not Found
Hello,
If see your error. The jetty file not replaced by jetty from me.
Dear,
We are using single server, 8.8.15P3 on Centos 7.7 with 4 vCPU and 8GB RAM. Server will serve about 200-300 accounts. Do you think we can have z-push on this spec?
Many thanks and best regards,
Minh.
Hello,
Yes. It’s more than enough
Sorry, it work`s
thanks for instruction 🙂
Hello,
Glad to hear that 🙂
Hello,
Seems something wrong.
I get :
. * * Consult LICENSE file for details ************************************************/ ob_start(null, 1048576); // ignore user abortions because this can lead to weird errors – see ZP-239 ignore_user_abort(true); require_once ‘vendor/autoload.php’; if (!defined(‘ZPUSH_CONFIG’)) define(‘ZPUSH_CONFIG’, ‘config.php’); include_once(ZPUSH_CONFIG); // Attempt to set maximum execution time ini_set(‘max_execution_time’, SCRIPT_TIMEOUT); set_time_limit(SCRIPT_TIMEOUT); try { // check config & initialize the basics ZPush::CheckConfig(); Request::Initialize(); ZLog::Initialize(); ZLog::Write(LOGLEVEL_DEBUG,”——– Start”); ZLog::Write(LOGLEVEL_DEBUG, sprintf(“cmd=’%s’ devType=’%s’ devId=’%s’ getUser=’%s’ from=’%s’ version=’%s’ method=’%s'”, Request::GetCommand(), Request::GetDeviceType(), Request::GetDeviceID(), Request::GetGETUser(), Request::GetRemoteAddr(), @constant(‘ZPUSH_VERSION’), Request::GetMethod() )); // always request the authorization header if (! R………………..
Hello Stiwans,
Please make sure :
– SELinux has been disabled
– PHP dependencies have been installed
– What your Zimbra and OS version?
Hello Iman,
greetings from Italy.
what about going through the (now) recommended procedure for z-push installation, detailed here
https://wiki.z-hub.io/display/ZP/Installation
(add Yum/Apt repo to the system, installing via OS package management)?
Which steps would be still to be performed?
Thanks in advance.
Best regards
Hello Ferdinando,
I am should try first on my dev server. I have not tried with apt/yum method
Hello Iman,
I noticed that your z-push source version is 2.3.4, while there’s now v2.5.1 final available.
I’m going to experiment the “source” way (i.e. procedure outlined on your article) replacing your z-push subdir with the updated source from here https://stash.z-hub.io/projects/ZP/repos/z-push/browse/src?at=refs%2Ftags%2F2.5.1 (plus, of course, the Zimbra backend v68).
May I fork your GitHub repo for this activity?
Additionally, I believe that it isn’t strictly necessary to set zimbraPublicServiceHostname to “localhost”, you should instead whitelist the server’s public IP address within the Zimbra’s DoSFilter configuration section, as explained here https://wiki.zimbra.com/wiki/DoSFilter
Does this sound correct to you?
Hello Ferdinando,
Sure. You can fork my GitHub repo and it’s open. zimbraPublicServiceHostname refers to the localhost because I define localhost on ZIMBRA_URL config. So, the log is clean and not appear warning about ZIMBRA_URL
Yes, I noticed that, reviewing the various configurations files.
I was only concerned (as a Zimbra newbie) about possible negative interactions with other Zimbra services of setting “public hostname” to localhost.