Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Take your Zimbra with you!
undertoe
Advanced member
Advanced member
Posts: 94
Joined: Fri Sep 12, 2014 10:12 pm

Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Postby undertoe » Thu Oct 13, 2011 6:20 pm

Couldn't you install apache make a virtual ethernet interface for a second ip that apache only listens to on that ip & port 80 that way you don't have a conflict with the zcs instance on the same server?


sidkipper
Posts: 12
Joined: Sat Sep 13, 2014 1:08 am

Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Postby sidkipper » Fri Oct 14, 2011 3:03 am

[quote user="dkbk"]...

Also, as for installing the backend, the only instructions I could find were at : Push email, contacts and calendar with Zimbra 6 Opensource & Z-Push – ActiveSync | slashdevslashnull.com
This is however for a very old version (16)... [/QUOTE]
You might have to trawl this thread a bit more to find instructions, or try these Z-Push (ActiveSync) for Zimbra FOSS « vBlog
dkbk
Advanced member
Advanced member
Posts: 67
Joined: Sat Sep 13, 2014 12:32 am

Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Postby dkbk » Fri Oct 14, 2011 9:17 am

[quote user="undertoe"]Couldn't you install apache make a virtual ethernet interface for a second ip that apache only listens to on that ip & port 80 that way you don't have a conflict with the zcs instance on the same server?[/QUOTE]
Thanks. Basically you're saying there should be no drawbacks from following one of the methods outlined in the wiki (ZimbraApache - Zimbra :: Wiki) ? Specifically the IP based one which seems the most straightforward.
[quote user="sidkipper"]You might have to trawl this thread a bit more to find instructions, or try these Z-Push (ActiveSync) for Zimbra FOSS « vBlog[/QUOTE]
Thanks. I hadn't found that page. I'll use that one as a basis for installing the backend instead.
undertoe
Advanced member
Advanced member
Posts: 94
Joined: Fri Sep 12, 2014 10:12 pm

Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Postby undertoe » Fri Oct 14, 2011 9:34 am

[quote user="dkbk"]Thanks. Basically you're saying there should be no drawbacks from following one of the methods outlined in the wiki (ZimbraApache - Zimbra :: Wiki) ? Specifically the IP based one which seems the most straightforward.[/QUOTE]
I am talking about not having to do reverse proxy or virtual hosts. This way you

are not doing anything special for zimbra and it is operating in a default manor with out any tweeks.
check out this: /etc/network/interfaces Ubuntu Linux networking example
# iface eth0:1 inet static

# address 192.168.0.200

# network 192.168.0.0

# netmask 255.255.255.0

Then just have your apache (outside of zimbra) just listen on 192.168.0.200 (in this example)
each distro of linux handles virtual eth interfaces a little different but you should be able to google how to set them up. So basiclly what is happening is your have one nic with to network interfaces on it.
eth0 - 192.168.0.199 = zimbra

eth0:1 - 192.168.0.200 = local install apache with z-push running under it.
If you need help with the apache conf just let me know. But if your interfaces are setup right your ifconfig should look something like this.
eth1      Link encap:Ethernet  HWaddr 00:0D:60:EB:EA:17  

inet addr:192.168.148.199 Bcast:192.168.148.255 Mask:255.255.255.0

UP BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
eth1:0 Link encap:Ethernet HWaddr 00:0D:60:EB:EA:17

inet addr:192.168.148.204 Bcast:192.168.148.255 Mask:255.255.255.0

UP BROADCAST MULTICAST MTU:1500 Metric:1
eth1:1 Link encap:Ethernet HWaddr 00:0D:60:EB:EA:17

inet addr:192.168.148.205 Bcast:192.168.148.255 Mask:255.255.255.0

UP BROADCAST MULTICAST MTU:1500 Metric:1
eth1:2 Link encap:Ethernet HWaddr 00:0D:60:EB:EA:17

inet addr:192.168.148.202 Bcast:192.168.148.255 Mask:255.255.255.0

UP BROADCAST MULTICAST MTU:1500 Metric:1
eth1:3 Link encap:Ethernet HWaddr 00:0D:60:EB:EA:17

inet addr:192.168.148.206 Bcast:192.168.148.255 Mask:255.255.255.0

UP BROADCAST MULTICAST MTU:1500 Metric:1

SilkBC
Posts: 4
Joined: Fri Sep 12, 2014 11:34 pm

Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Postby SilkBC » Sun Oct 16, 2011 3:22 pm

Zimbra: v7.1

z-push: v1.5.5-790

PHP version: 5.2.17

z-push Zimbra Backend version: 51

Phone: HTC HD2, Android v2.3
My config.php:


// **********************

// BackendZimbra settings

// **********************

define('ZIMBRA_URL', 'mail01.murrell-van.local');

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',false);

define('ZIMBRA_ENFORCE_VALID_EMAIL',true);

define('ZIMBRA_DEBUG',true);


I have z-push running on a seperate server under Apache2. I can log in the /Microsoft-Server-ActiveSync alias on the z-push server with my Zimbra credentials and I get the "GET not supported" page, as i am supposed to.
ISSUE:

I have successfully configured an Exchange account on my Android, entering the z-push server as the server to connect to. It connects up just fine. I am able to send emails from the account with no problem. However, nothing shows up on my device. The email Inbox in blank, no calendar entries from Zimbra, and no contacts from my Zimbra acocunt show up on my device. It *seems* to be conencting OK; here is the entry from the debug.log:


10/16/11 12:17:37 [21057] [alan@murrell.ca] Start

10/16/11 12:17:37 [21057] [alan@murrell.ca] Z-Push version: 1.5.5-790

10/16/11 12:17:37 [21057] [alan@murrell.ca] Client IP: 10.215.1.108

10/16/11 12:17:37 [21057] [alan@murrell.ca] Client supports version 2.5

10/16/11 12:17:38 [21057] [alan@murrell.ca] PHP version: 5.2.17 - z-push Zimbra Backend version: 51

10/16/11 12:17:38 [21057] [alan@murrell.ca] START Logon { username = alan@murrell.ca; domain = ; password = }

10/16/11 12:17:40 [21057] [alan@murrell.ca] END Logon { connected = true; uid = alan }

10/16/11 12:17:40 [21057] [alan@murrell.ca] START Setup { userid = alan@murrell.ca; devid = validate; protocolversion = 2.5; useragent = Android/0.3 }

10/16/11 12:17:40 [21057] [alan@murrell.ca] No XML Profile File [/var/www/html/z-push/zimbra/alan.xml] Found For User - Default Rules Will Apply

10/16/11 12:17:41 [21057] [alan@murrell.ca] END Setup { 71 Folders Loaded }

10/16/11 12:17:41 [21057] [alan@murrell.ca] POST cmd: FolderSync

10/16/11 12:17:41 [21057] [alan@murrell.ca] Initializing folder diff engine

10/16/11 12:17:41 [21057] [alan@murrell.ca] START GetFolderList

10/16/11 12:17:41 [21057] [alan@murrell.ca] END GetFolderList { found 65 folders }

10/16/11 12:17:41 [21057] [alan@murrell.ca] Found 65 folder changes

10/16/11 12:17:41 [21057] [alan@murrell.ca] START GetFolder { devid = f828 }

10/16/11 12:17:41 [21057] [alan@murrell.ca] END GetFolder { parentid = f266; displayname = IN-P-ice_hockey; type = 12 }
[SNIP - too many characters, so removed most of the folder listing]
10/16/11 12:17:41 [21057] [alan@murrell.ca] END GetFolder { parentid = f822; displayname = IN-P-nugget_crew; type = 12 }

10/16/11 12:17:41 [21057] [alan@murrell.ca] START StatFolder { devid = f105680 }

10/16/11 12:17:41 [21057] [alan@murrell.ca] END StatFolder { id = f105680; parent = f822; mod = IN-P-nugget_crew }

10/16/11 12:17:41 [21057] [alan@murrell.ca] START GetFolder { devid = f10 }

10/16/11 12:17:41 [21057] [alan@murrell.ca] END GetFolder { parentid = 0; displayname = Calendar; type = 8 }

10/16/11 12:17:41 [21057] [alan@murrell.ca] START StatFolder { devid = f10 }

10/16/11 12:17:41 [21057] [alan@murrell.ca] END StatFolder { id = f10; parent = 0; mod = Calendar }

10/16/11 12:17:41 [21057] [alan@murrell.ca] START GetFolder { devid = FakeOutbox }

10/16/11 12:17:41 [21057] [alan@murrell.ca] END GetFolder { parentid = 0; displayname = Outbox; type = 6 }

10/16/11 12:17:41 [21057] [alan@murrell.ca] START StatFolder { devid = FakeOutbox }

10/16/11 12:17:41 [21057] [alan@murrell.ca] END StatFolder { id = FakeOutbox; parent = 0; mod = Outbox }

10/16/11 12:17:42 [21057] [alan@murrell.ca] START Logoff

10/16/11 12:17:42 [21057] [alan@murrell.ca] MEMORY - REAL Now (4,718,592) Peak [6,553,600] - ALLOCATED Now (4,201,364) Peak [6,138,620] - END Logoff


Any ideas for why it may not be syncing to my device? Thanks! :-)
-SilkBC
check-ict
Posts: 7
Joined: Sat Sep 13, 2014 2:11 am

Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Postby check-ict » Thu Oct 27, 2011 1:54 am

Hello all,
I just installed a fresh Zimbra server (zcs-7.1.3_GA_3346.UBUNTU10_64.20110928134610) as a single setup. I created a extra virtual machine for Z-push/Backend but I can't get it to work. Here is what I did:
Installed Ubuntu 10.04 server with:

- Apache2

- PHP5

- php-pear

- php5-curl

- libapache2-mod-php5
After that, I downloaded z-push (1.5.5-790) and extracted the contents to /var/www/z-push
I changed the permissions of the state dir:

chmod 777 /var/www/z-push/state
I edited the /etc/apache2/httpd.conf with:

Alias /Microsoft-Server-ActiveSync /var/www/z-push/index.php

php_flag magic_quotes_gpc off

php_flag register_globals off

php_flag magic_quotes_runtime off

php_flag short_open_tag on
Next I restarted apache and test my config:

Z-Push - Open Source ActiveSync

Version 1.5.5-790

GET not supported

This is the z-push location and can only be accessed by Microsoft ActiveSync-capable devices.
So far so good.
I downloaded Zimbra Backend (51) and extracted the zimbra.php to /var/www/z-push/backend and the other files to /var/www/z-push/include
I edited the /var/www/z-push/config.php file:



$BACKEND_PROVIDER = "BackendZimbra";

define('ZIMBRA_URL', 'http://10.10.1.28');

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',false);

When I add the mailbox to my iPhone, all authentication/checks work. When I go to the mailbox, it gives a error that it couldn't read the mailbox content.
After alot of reading in the debug.txt I didn't see anything strange.
Now in the apache2 log on the Z-push server I see the following:

10.10.1.22 - admin@testdomain.com [27/Oct/2011:08:33:01 +0200] "POST /Microsoft-Server-ActiveSync?User=admin@testdomain.nl&DeviceId=Appl5K043F3D3NP&DeviceType=iPhone&Cmd=FolderSync HTTP/1.0" 500 275 "-" "Apple-iPhone2C1/901.334"

This is a HTTP 500 error code. When I do the ActiveSync test from Microsoft: https://www.testexchangeconnectivity.com/

I got the error that FolderSync wasn't working. (I needed to setup a SSL apache server for this test).
On the Zimbra server side I got these logs:

2011-10-27 08:36:49,797 INFO  [btpool0-13://10.10.1.28/service/soap] [ip=10.10.1.29;] soap - AuthRequest

2011-10-27 08:36:49,810 INFO [btpool0-13://10.10.1.28/service/soap] [name=admin@testdomain.com;mid=1;ip=10.10.1.29;] soap - GetInfoRequest

2011-10-27 08:36:49,838 INFO [btpool0-13://10.10.1.28/service/soap] [name=admin@testdomain.com;mid=1;ip=10.10.1.29;] soap - GetFolderRequest

2011-10-27 08:36:49,845 INFO [btpool0-13://10.10.1.28/service/soap] [name=admin@testdomain.com;mid=1;ip=10.10.1.29;] soap - GetSearchFolderRequest

2011-10-27 08:36:49,849 INFO [btpool0-13://10.10.1.28/service/soap] [name=admin@testdomain.com;mid=1;ip=10.10.1.29;] soap - GetTagRequest

2011-10-27 08:36:50,000 INFO [btpool0-13://10.10.1.28/service/soap] [ip=10.10.1.29;] soap - AuthRequest

2011-10-27 08:36:50,002 INFO [btpool0-13://10.10.1.28/service/soap] [name=admin@testdomain.com;ip=10.10.1.29;] session - Too many SOAP sessions, closing SoapSession: {sessionId: 1130, accountId: 59d7aed3-4514-465a-a38b-eb77e86b3866, lastAccessed: 2011-10-27 08:33:01,131}

2011-10-27 08:36:50,013 INFO [btpool0-13://10.10.1.28/service/soap] [name=admin@testdomain.com;mid=1;ip=10.10.1.29;] soap - GetInfoRequest

2011-10-27 08:36:50,041 INFO [btpool0-13://10.10.1.28/service/soap] [name=admin@testdomain.com;mid=1;ip=10.10.1.29;] soap - GetFolderRequest

2011-10-27 08:36:50,047 INFO [btpool0-13://10.10.1.28/service/soap] [name=admin@testdomain.com;mid=1;ip=10.10.1.29;] soap - GetSearchFolderRequest

2011-10-27 08:36:50,051 INFO [btpool0-13://10.10.1.28/service/soap] [name=admin@testdomain.com;mid=1;ip=10.10.1.29;] soap - GetTagRequest

I tried alot of tips from the internet and this forum, but nothing helped for me. I cannot sync my iPhone or Galaxy S with my activesync server.
Any tips?
liverpoolfcfan
Outstanding Member
Outstanding Member
Posts: 936
Joined: Sat Sep 13, 2014 12:47 am

Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Postby liverpoolfcfan » Thu Oct 27, 2011 4:03 pm

SilkBC and check-ict
Do either of you get any errors in your Apache error_log files ?
Look for a PM from me
check-ict
Posts: 7
Joined: Sat Sep 13, 2014 2:11 am

Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Postby check-ict » Fri Oct 28, 2011 1:02 pm

Liverpoolfcfan helped me and we got it fixed!
In the default Z-push config, there is a option "Provisioning" and set with "true". I didn't notice this and my config included "false" at the end but it was ignored.
After all this, we deleted all contents of the state folder and re-created the account on the iPhone (ios 5) and everything works!
rhorist
Posts: 11
Joined: Sat Sep 13, 2014 1:07 am

Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Postby rhorist » Tue Nov 01, 2011 8:52 pm

I am trying to get this working as well. I am running Z-Push on CentOS 5.7. I can log into http://domain/Microsoft-Server-ActiveSync with no problems. I setup my iPad 2 running iOS 5 and it all checks good. However when I go to view my email on it, it is just blank. In the z-push/state directory there is nothing in it. Should there be? I looked in the Apache logs and for the error_log file I do see alot of these errors:
PHP Fatal error: Call to undefined function mysql_query() in /var/www/html/z-push/backend/zimbra.php on line 5667
Is this my issue? How do I fix it?
undertoe
Advanced member
Advanced member
Posts: 94
Joined: Fri Sep 12, 2014 10:12 pm

Z-Push Zimbra Backend (Push Email, Contacts, Appointments & Tasks)

Postby undertoe » Tue Nov 01, 2011 9:02 pm

I bet you have Provisioning set to true in config.php set it to false. I believe that's the only thing that settings that uses MySQL. If u want use provisioning make sure u have it setup right and have php-MySQL install

Return to “Mobility”

Who is online

Users browsing this forum: No registered users and 1 guest