To all users of the zimbra backend running zimbra 8 (or later I assume), please note that following troubleshooting of a user issue the root cause of erratic sync behaviour was narrowed down to ...

Zimbra 8 introduced a new DoSFilter - in their words ...

The denial-of-service filter or DoSFilter was added to the mailbox server in ZCS 8.0 to throttle clients sending a large number of requests over a very short period of time. The DoSFilter is applied to all requests for service, mailbox and admin. This feature was added with the completion of bug 66921.
DoS filtering is enabled by default once ZCS 8 is installed. It may be necessary to adjust the configuration to accommodate specific environmental needs. Disabling DoSFilter is not recommended.

As z-push is usually installed on a separate server from zimbra, it can get blocked by this filter particularly when first synching a device of turning it back on following an extended period of time not synching - basically any time z-push needs to send over many requests to the server in a short space of time. For example, a device requesting a sync on a mailbox that has received 50 new emails since the last sync would generate at a minimum a Search Request and 50 GetMsg Requests. A fast z-push server could fire off these requests very rapidly.

The zimbra wiki page DoSFilter - Zimbra :: Wiki explains how to add the IP address of the z-push server to the DoSFilter whitelist so it is always allowed to issue as many requests as needed.

If you are using versions 8.0.0, 8.0.1, or 8.0.2 please note that the configuration is a more manual process - please see the link at the bottom of the wiki page.

I know i can change the memory limit for PHP... but i just want to make sure its ok to change it.

09-30-2013, 02:54 PM

drdre

i am using zimbra FOSS 8.0.3 and z-push 2.1.x and zimbra56.1

10-07-2013, 08:11 AM

drdre

liverpoolfcfan you are the best :) ... thumbs up for supporting this module.... if you ever in Trinidad and Tobago or the Caribbean i will definitely buy you a few beers :)

10-09-2013, 11:57 AM

waltholman

Hello all,

I've recently purchased an LG G2 android phone and can't get it working with the zimbrabackend. I've been in contact with Liverpoolcfan, and shown him my logs, setup etc... We can't figure out why it doesn't work. Seems to be a phone issue. I've recently installed the Touchdown app, which works flawlessly, so I don't think it's my configuration, but more likely the phone. During setup on the phone, it gets to the provisioning stage, goes through it fine, and prompts for the Device Administrators Activation screen. Upon activating that, I can see in the logs that it gets to settings, and all looks good in the logs, but the phone errors out at this point and gives an error of:

"Cannot connect to server. Try again after checking network connection and entered information."

Apache does not segfault or give any errors during that time. I'm leaning more and more towards saying it's a buggy email app, but on Liverpool's suggestion, will upgrade to z-push 2.1 to see if that has any impact. Hate to pay $20 for something that ought to work. When I purchased the new phone, I gave my old phone, a Moto Razr to my son. It setup just fine as well. Anyone else have any thoughts on the G2 as to why it might not be working? Thanks for any help,

-Walt

10-09-2013, 12:44 PM

waltholman

Just an update. Upgraded to z-push 2.1 and still getting same error. Touchdown still working like a charm.... What a bummer :(

10-10-2013, 08:00 AM

kosnar

Hi,

we have ZCS 8.0.5 with active DoSFilter (I add z-push to whitelist, but it doesn't work), Z-push 2.0.7-1690, zimbraBackend 56.1.

HTC phone synchronization makes many and many "Unnamed" contacts with no data (no phone number, no mail etc.). If I remove some contact, it removes valid one from zimbra.

I thing it is problem only with stock HTC phone - I test HTC Desire C, HTC Desire S, HTC One. I test some Huawei and HTC with Cyanogenmod and this not happen.

I do not have version 8 so I can only ask some general questions about the filter.

Are you sure the changes were accepted ?
Do you have IPv6 enabled ? If so, did you whitelist both IPv4 and IPv6 addresses ?
Is your connection from z-push to zimbra going through a proxy/firewall that might be changing the IP address ?

I have added code to detect the related 503 error for the next release of the backend. Hopefully that will prevent the empty contacts getting created when this issue crops up. If you send me a real email address by Private Message through the forum I can send you a pre-release to try.

In the meantime, can you also try using the setting in the z-push config.php file to limit the number of items output per request.

// Amount of items to be synchronized per request
// Normally this value is requested by the mobile. Common values are 5, 25, 50 or 100.
// Exporting too much items can cause mobile timeout on busy systems.
// Z-Push will use the lowest value, either set here or by the mobile.
// default: 100 - value used if mobile does not limit amount of items
define('SYNC_MAX_ITEMS', 100);

Change it down to 20 for a test - or lower if that still causes an issue. The only real impact would be on initial sync where the device will need to make a lot more requests to get the initial data over - but in normal running it is highly unlikely you would ever have more than two or three maximum items changing at the same time.