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

Take your Zimbra with you!
DataFirst
Posts: 4
Joined: Sat Sep 13, 2014 1:14 am

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

Postby DataFirst » Wed Jun 02, 2010 7:29 am

[quote user="liverpoolfcfan"]Some people have reported issues with complex Calendar items. And, there are some issues with very large email attachments. But, just quantity of emails and/or folders should not make too much difference. I have probably 50 email folders, including some shared ones, on my system and they sync just fine.
Some things to start with:

1. What phone types are you using ? Yours, your colleagues ?

2. What memory_limit is set in php.ini - should be at least 128M ?

3. Are you using default ZIMBRA settings in config.php - or are you also using user configuration XML files ? If config files, can you post a sample (remember to enclose in CODE tags using the # button above editor)

4. For the problem accounts, can you try sync'ing one thing at a time. So Contacts first. If that works, add email. If that works, add calendar, etc.

If something fails along the way, turn up debug logging, and try to identify the Contact/Email/Appointment that is breaking.
To turn up debugging you need to:

cd /[path to www]/z-push

touch debug.txt

chmod 777 debug.txt

then edit wbxml.php and change the value in define('WBXML_DEBUG', false) to true
To turn off debugging again.

cd /[path to www]/z-push

edit wbxml.php and change the value in define('WBXML_DEBUG', true) to false

rename or delete debug.txt[/QUOTE]
Thanks for that, we seem to have a couple of issues, one is with a particular account failing to sync, the second is the phones in use.
For php I've tried a range of setups, from 128M to 256M, script exec from 120-1200, input 60-120, upload/post limits both set to 64MB
I'm using an HTC Magic, and have been able to sync most accounts without issue, except for the aforementioned account with lots of mail, and complex calendar.
My colleague is testing with an HTC Desire, and an iPhone. we've had the following issues
1) set up testing account, imported approximately 3GB of data, have set up sync on my phone, syncs perfectly. Set up on Desire, sync fails completely.

2) With account that problem was first noted, iPhone has been connected since then, problems on this account were first that mail didn't appear to sync (device reported successful sync, but nothing visible in mailbox) and it reported errors syncing calendar. When set up on iPhone the mail synced, and showed 2 top-level "inbox" folders, one empty and one containing all the mail - suspicion here is that the HTC's are just displaying the empty inbox.
I've set up the debugging against the test account with the desire syncing so far, and I'm seeing this in the logs,
06/02/10 14:09:31 [24790] /usr/share/zpush/backend/zimbra.php:1429 Undefined property: BackendZimbra::$_virtualCalendar (8)

06/02/10 14:09:31 [24790] /usr/share/zpush/backend/zimbra.php:1495 Undefined index: desc (8)
Obviously theres a lot more in there, those lines jumped out at me though,
I can send log/pastebin it if you'd like a copy, otherwise I'll see what else I can dig out
Not sure if it has any bearing, server details are

- Ubuntu 9.04 x86_64

- php 5.2.6

- Apache 2.2.11
Cheers


liverpoolfcfan
Outstanding Member
Outstanding Member
Posts: 925
Joined: Sat Sep 13, 2014 12:47 am

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

Postby liverpoolfcfan » Thu Jun 03, 2010 6:40 am

[quote user="blabub"]What does not works:

- Sync appointments with invitation from zimbra

[/QUOTE]
I think I have located the issue.
If you search zimbra.php for "cAttendees" you should find the piece of code that adds attendees to an appointment.
                        // Attendees

$cAttendees = count($item['inv'][$i]['comp'][0]['at_attribute_a']);

if($cAttendees > 0) {

$subApp->attendees = array();
for($i=0; $i
$attendee = new SyncAttendee();
if(isset($item['inv'][$i]['comp'][0]['at_attribute_d'][$i])) {

$attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_d'][$i];

} else {

$attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_a'][$i];

}
$attendee->email = $item['inv'][$i]['comp'][0]['at_attribute_a'][$i];
if(isset($attendee->name) && isset($attendee->email) && (!isset($subApp->organizeremail) || (isset($subApp->organizeremail) && $attendee->email != $subApp->organizeremail))) {

array_push($subApp->attendees, $attendee);

}

}

}


Unfortunately, this code makes double use of the same variable for a counter $i - It is used to identify the current Appointment, and then within an Appointment to identify the current Attendee. Thus, the variable gets corrupted if any appointments have attendees.
Replace this block of code with



// Attendees

$cAttendees = count($item['inv'][$i]['comp'][0]['at_attribute_a']);

if($cAttendees > 0) {

$subApp->attendees = array();
for($j=0; $j
$attendee = new SyncAttendee();
if(isset($item['inv'][$i]['comp'][0]['at_attribute_d'][$j])) {

$attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_d'][$j];

} else {

$attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_a'][$j];

}
$attendee->email = $item['inv'][$i]['comp'][0]['at_attribute_a'][$j];
if(isset($attendee->name) && isset($attendee->email) && (!isset($subApp->organizeremail) || (isset($subApp->organizeremail) && $attendee->email != $subApp->organizeremail))) {

array_push($subApp->attendees, $attendee);

}

}

}


where $j now identifies the current Attendee of Appointment $i
Hopefully this should resolve that particular issue.
skug67
Posts: 4
Joined: Sat Sep 13, 2014 1:12 am

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

Postby skug67 » Thu Jun 03, 2010 1:46 pm

[quote user="skug67"]I'm syncing my Palm Pre w/Zimbra via z-push. My server and my handset are both using Eastern time (GMT-5:00). When I set up a weekly recurring event that starts at or after 8:00 pm, when it syncs the first entry shows up on the correct day but all subsequent entries show up one day earlier in the week (i.e., if I want something to happen every Tuesday, the 2nd and later entries show up on Monday). This happens in both directions -- if I create the entry on the server-side (via the web interface) then my phone shows later entries on the wrong day. If I create it on the phone, then it is the server/web interface that shows the wrong day.
I'm assuming that this has something to do with the zimbra backend for z-push translating things into UTC and crossing over midnight but not realizing what that does to the day of the week. Unfortunately, I'm not a good enough hacker to figure out what needs to be changed......
Any suggestions would be greatly welcome (especially, since I do actually have a recurring appointment at 8 pm every week....).
Thanks,
Seth Green[/QUOTE]
Nobody has any thoughts? If I understood the syntax in which the backend was written (SOAP?), I could deal with it by simply creating a kludge that moves the appointment forward by a day any time it occurs at or after 8 pm. Unfortunately, my skills don't even rise to that simplistic level. But I'd welcome a suggestion of how to do even just that. I don't have to solve the problems of the entire world, just my own little corner of it. ;-)
TIA (I hope),
Seth Green
liverpoolfcfan
Outstanding Member
Outstanding Member
Posts: 925
Joined: Sat Sep 13, 2014 12:47 am

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

Postby liverpoolfcfan » Thu Jun 03, 2010 2:47 pm

[quote user="DataFirst"]2) With account that problem was first noted, iPhone has been connected since then, problems on this account were first that mail didn't appear to sync (device reported successful sync, but nothing visible in mailbox) and it reported errors syncing calendar. [/QUOTE]
Please implement the fix in the second to last post above for Meeting attendees, and see if that allows your Calendar sync to complete.
blabub
Posts: 11
Joined: Sat Sep 13, 2014 1:11 am

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

Postby blabub » Thu Jun 03, 2010 3:04 pm

[quote user="liverpoolfcfan"]I think I have located the issue.
If you search zimbra.php for "cAttendees" you should find the piece of code that adds attendees to an appointment.
                        // Attendees

$cAttendees = count($item['inv'][$i]['comp'][0]['at_attribute_a']);

if($cAttendees > 0) {

$subApp->attendees = array();
for($i=0; $i
$attendee = new SyncAttendee();
if(isset($item['inv'][$i]['comp'][0]['at_attribute_d'][$i])) {

$attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_d'][$i];

} else {

$attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_a'][$i];

}
$attendee->email = $item['inv'][$i]['comp'][0]['at_attribute_a'][$i];
if(isset($attendee->name) && isset($attendee->email) && (!isset($subApp->organizeremail) || (isset($subApp->organizeremail) && $attendee->email != $subApp->organizeremail))) {

array_push($subApp->attendees, $attendee);

}

}

}


Unfortunately, this code makes double use of the same variable for a counter $i - It is used to identify the current Appointment, and then within an Appointment to identify the current Attendee. Thus, the variable gets corrupted if any appointments have attendees.
Replace this block of code with



// Attendees

$cAttendees = count($item['inv'][$i]['comp'][0]['at_attribute_a']);

if($cAttendees > 0) {

$subApp->attendees = array();
for($j=0; $j
$attendee = new SyncAttendee();
if(isset($item['inv'][$i]['comp'][0]['at_attribute_d'][$j])) {

$attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_d'][$j];

} else {

$attendee->name = $item['inv'][$i]['comp'][0]['at_attribute_a'][$j];

}
$attendee->email = $item['inv'][$i]['comp'][0]['at_attribute_a'][$j];
if(isset($attendee->name) && isset($attendee->email) && (!isset($subApp->organizeremail) || (isset($subApp->organizeremail) && $attendee->email != $subApp->organizeremail))) {

array_push($subApp->attendees, $attendee);

}

}

}


where $j now identifies the current Attendee of Appointment $i
Hopefully this should resolve that particular issue.[/QUOTE]


Wow, it works perfect! Thanks a lot. :)

I owe you one!
gnosbush
Posts: 36
Joined: Sat Sep 13, 2014 12:31 am

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

Postby gnosbush » Thu Jun 03, 2010 3:59 pm

[quote user="skug67"]Nobody has any thoughts?[/QUOTE]
Seth, I believe I have it solved in the next revision (this will be revision 37) but want to do some more testing on it before I publish it to SourceForge. If you would like to test, I would be more then happy to email it to you. Send me a PM with your email address if you want it.
skug67
Posts: 4
Joined: Sat Sep 13, 2014 1:12 am

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

Postby skug67 » Thu Jun 03, 2010 5:33 pm

You rock!! I'll send a PM right now.
DataFirst
Posts: 4
Joined: Sat Sep 13, 2014 1:14 am

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

Postby DataFirst » Mon Jun 07, 2010 7:47 am

[quote user="liverpoolfcfan"]Please implement the fix in the second to last post above for Meeting attendees, and see if that allows your Calendar sync to complete.[/QUOTE]
That fix for calendar sync worked beautifully, thanks for that!
In regards to the mail, it looks like the issue there is definitely related to the size of the mail store, currently the mailbox sits at 3.2GB of mail, spread across around 100 folders. After a fair bit of testing I've found that some subfolders will sync if you refresh them, but not the inbox. Also most folders with either subfolders or 400+ messages won't sync either.
edit: in addition to this, I'm having problems with the user xml config, I've tried to restrict sync to just the inbox, but the mail rule doesn't seem to be honoured. the file is at /zimbra/.xml
I've matched the UID to the UID reported in debug logs. Any assistance would be much appreciated :)


" usehtml="false" sendasname="" sendasemail="">





























white8
Posts: 16
Joined: Fri Sep 12, 2014 11:58 pm

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

Postby white8 » Fri Jun 11, 2010 1:53 pm

I have Z Push 29 set up on my server and am able to get to the:
GET not supported
This is the z-push location and can only be accessed by Microsoft ActiveSync-capable devices.
message from a browser but after setting up an account on the iPhone, it is unable to sync mail, calendars, or contacts. Is this an iPhone issue or something in the Z Push configuration. The iPhone is version 3.x
powrrrplay
Advanced member
Advanced member
Posts: 120
Joined: Fri Sep 12, 2014 11:55 pm

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

Postby powrrrplay » Fri Jun 11, 2010 11:31 pm

A great piece of code from the community for zimbra, the zimbrabackend works great.
With the RIM introduction of BES Express I am wondering if it would be possible to entertain the idea of writing a front end for zimbrabackend that interfaced with BES Express.
Food for thought.

Return to “Mobility”

Who is online

Users browsing this forum: No registered users and 5 guests