Carbonio – ActiveSync with Z-Push

The implementation of the Exchange/ActiveSync protocol made by Zarafa’s devs is sensational! Z-Push  is developed in PHP and works very well, but integrating it with Carbonio has always been difficult, especially after they no longer made “tgz” available and installation started to be done via repositories on a mandatory basis.

If you have a second server then installation is quite simple, but not everyone has a second server available for this, so the only thing left to do is integrate with Zimbra on the same server and this can be a challenge: adding repositories, changing settings, installing local php-fpm and put everything together to run as “zextra” user. A lot do to and fix.

So… let’s make it easier using a Docket container I make for this.


a) Because it is a container, it is monolithic, meaning it has a certain fixed number of Apache instances to handle requests. This amount may not be enough for your scenario;

b) Docker and Z-Push in the container may consume many of your server’s resources;

So let’s go!

Installing Docker

To install docker use your package manager: apt or yum

apt install


yum install

Testing Docker

docker run hello-world

Installing z-push in docker

Use the command below to create a CT called “ zpush ” that will use your Carbonio server IP as a parameter in the “ ZIMBRA_URL ” option. Like this:

docker run -d -p 9443:80 --restart=always -e ZIMBRA_URL=IP_do_servidor -e TIMEZONE=America/Recife --name zpush anahuac/kya-zpush-zimbra

Fixing Carbonio Proxy

Z-Push will run on port 9443 and we need to setup Carbonio to use z-push on this port. This is done by changing the Nginx template that Carbonio uses as a proxy.

1 – Edit and change Carbonio’s 3 Nginx templates


2 – Look for “set $mailhostport” in the Microsoft-Server-ActiveSync section, around line 306 of the file and adjust it to match the z-push port, like this:

set $mailhostport 9443;

3 – Find, a little further down, around line 313, the “proxy_pass” option and change it to the name of your server in http, like this:

proxy_pass          http://your_server_hostname:9443;

4 – If you don’t want to lose those setups and have to redo it every time Carbonio is upgraded, copy those file into templates_custom folder, like this:

cp /opt/zextras/conf/nginx/templates/nginx.conf.web.https.template /opt/zextras/conf/nginx/templates_custom
cp /opt/zextras/conf/nginx/templates/nginx.conf.web.https.default.template /opt/zextras/conf/nginx/templates_custom
cp /opt/zextras/conf/nginx/templates/nginx.conf.web.http.template /opt/zextras/conf/nginx/templates_custom

5 – Finally restart the proxy

su - zextras -c "zmproxyctl restart"

Testing it

Access your server’s URL with the full protocol path, like this:


And log in with a valid username and password.


Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *