Page 37 of 106 FirstFirst ... 2735363738394787 ... LastLast
Results 361 to 370 of 1052

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

  1. #361
    sangamc is offline Special Member
    Join Date
    Aug 2009
    Location
    florida
    Posts
    129
    Rep Power
    5

    Default

    Thanks for the reply Liverpoolfcfan ... the problem was the certificiate. my https connection to the server does not work as of now. I am not sure what i am missing and the documentation is very sparse.

    what i did was get it working with http. and when i connect my iphone i save the settings without veryfying the server. I then go back into the email settings and disable SSL and it works!!!!!

    for a while there i was wondering what was wrong since i could only see new email messages. But then i realised i can change the sync option on the phone from 3 days to unlimited and all my old messages showed up.

    Still some minor issues with folders that are not the inbox not downloading the entire message but im sure i can work that out by reading through this thread again.

  2. #362
    liverpoolfcfan's Avatar
    liverpoolfcfan is offline Outstanding Member
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    710
    Rep Power
    6

    Default Z-Push Zimbra Backend Release 46 uploaded to SourceForge

    Release 46 of the z-push zimbra backend has just been uploaded to SourceForge (https://sourceforge.net/projects/zimbrabackend/)


    Here is a summary of the changes.
    Code:
    Changes Made To Revision 46:
     - Added new functions TagsToCategories & CategoriesToTags to support syncing
       Categories<->Tags on all content types
     - Extended Categories<->Tags syncing to Appointments/Tasks (Note: z-push doesn't
       support categories on Message sync in z-push 1.4)
     - Fixed loop counter in Setup function to prevent recursion through all newly
       added folders when checking for children of linked folders
     - In StatMessage function for 'message' replaced call to GetMsgRequest with call 
       to GetMsgMetadataRequest to reduce data transfer and logging
     - Improved sync of Birthday/Anniversary - Dates on zimbra must be in YYYY-MM-DD
       format (or if --MM-DD format this/next year will be added depending on date)
     - Fixed Children sync on Contacts by treating the value as an array instead of
       a string. Uses implode/explode (Note: does not sync to Nokia Children field)
     - Hard linked webpage sync on Contacts to workURL on zimbra as only one of the 3
       workURL, homeURL and otherURL can be synced out to the phone, and once sync'ed
       if a change is made to the contact on the phone, we would not know which of the
       three URL fields to sync webpage to on an incoming contact
     - Fix to avoid overflowing 32-bit integer for calExpandInstStart and 
       calExpandInstEnd when syncing calendar/tasks. Use strval() and append "000"
       instead of multiplying by 1000
     - Replaced divide by 1000 with substr() to avoid conversion issues in
       DateForActiveSync and GetMessage (appointment request email)
     - Added new CONFIG.PHP key ZIMBRA_DEBUG to enable/disable logging of the SOAP 
       requests & responses, and the Setup Folder Lists. This allows more granular
       debugging than using the value of the WBXML.PHP key WBXML_DEBUG that turns on 
       Z-Push internal logging. It is now possible to log either on their own, or both 
     - Fix in GetMessage to avoid e_attribute_?? arrays to match names with email 
       addresses, as a blank value for a persons name would result in the incorrect
       Personal name being matched with any subsequent email addresses
     - Removed unused code and debug statements, and tidied up code
     - Added DeviceType on new, and updated DeviceType and UserAgent on sync in
       getDeviceRWStatus to show most recent client version that sync'ed
     - Fixed reference to this_WasteID instead of $this->_wasteID

    Also, a new release of the Provisioning Management Tool was uploaded yesterday.


    Here is a summary of the changes.
    Code:
    Changes Made To Version 1.02:
    
     - Fixed missing tag closing ">" for FORM tag on Device RESET and Device WIPE
       pages. This prevented the confirmation box from displaying on Google Chrome
     - Added Device DELETE capability to simplify removing a device from the database
       This functionality was added due to the fact that a full reset of at least some
       Android devices causes the device to get a new DeviceID. This results in 
       redundant records in the database.   
     - Changed Version numbering to 1.xx to avoid confusion with Zimbra Backend Version

  3. #363
    kongregate is offline Junior Member
    Join Date
    Nov 2010
    Posts
    7
    Rep Power
    4

    Default

    thanks for the backend - it works great. by the way, I'm hosting zpush with the zimbra backend on an windows server 2008 box on IIS7 with php+fastcgi! Had to change a couple of things but it works nice.

    Somehow I'm having the issue of "umlaute" being encoded wrongly i.e. appear as garbage characters. The fix you have mentioned in the earlier post is already applied in r46.

  4. #364
    liverpoolfcfan's Avatar
    liverpoolfcfan is offline Outstanding Member
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    710
    Rep Power
    6

    Default

    Would be good to know what you had to change.

    It is possible that if you are running on Windows, that your default character set in PHP under Windows is introducing some extra complexities into the conversion processes. It is difficult enough trying to get stuff that is nominally stored in UTF-8 under zimbra to the phone with UTF-8. Any other character sets introduced by hosting on a non UTF-8 platform could cause unpredictable behaviour.

  5. #365
    kongregate is offline Junior Member
    Join Date
    Nov 2010
    Posts
    7
    Rep Power
    4

    Default

    I think the biggest change was that the apache_request_headers method does not exist on Windows.

    IIS7 is basically only UTF8 so this shouldn't be a big issue.
    However appointments and contacts are synced just fine so I assume that there is something wrong in the email handling.

    If you're sure that the response is always sent in UTF8 then there is a semantic error in the codebase:

    This:
    header("Content-type: text/html");
    Should be changed to this:
    header("Content-type: text/html; charset=utf-8");

    The content type is also missing in several places like: if(!isset($_SERVER['PHP_AUTH_PW'])) { } (around line 38)

    If you can give me a URL that sends the contents of the email folder I could debug the response, see if it's really UTF8.

  6. #366
    sangamc is offline Special Member
    Join Date
    Aug 2009
    Location
    florida
    Posts
    129
    Rep Power
    5

    Default

    Is the GAL supposed to work with z-push? When i try and search for users, it returns "No Name" but still returns the correct number of users that the search would normally yield (if i have 3 pauls in the GAL it will return 3 No Names)

  7. #367
    kongregate is offline Junior Member
    Join Date
    Nov 2010
    Posts
    7
    Rep Power
    4

    Default

    I have nailed the issue, it is indeed a bug in the Zimbra backend.
    Apparently there is some type of double encoding going on:

    In GetBodyRecursive (zimbra.php) the function iconv( in, out, string) converts the string from "in" format to the "out" format.

    Code:
    $oldEncoding = $parameters["charset"];
    $body .= iconv( $oldEncoding, "UTF-8//IGNORE//TRANSLIT", $message->body);
    This does look alright, however $parameters["charset"] is "ISO-8859-1" even though the contents are "UTF-8". This results in garbage characters in the email.

    Here is a version of the function that properly detects the string encoding and uses this as a base, not the supplied values. This produces 100% correct emails in all tested languages (german, french etc.). If you're moving this back into the repo, please keep the attrib!

    Code:
    /** 	GetBodyRecursive
    *	Get all parts in the message with specified type and concatenate them together, unless the
    *  	Content-Disposition is 'attachment', in which case the text is apparently an attachment
    *  
    * 	2011-11-14: encoding fixed, comments added and beautified by kongregate/dwc <dwckongregate_x_googlemail.com>
    */
    function GetBodyRecursive($message, $subtype, &$body) 
    {
    	if (!isset($message->ctype_primary)) 
    	{
    		return;
    	}
    
    	// is this object a text message, then grab the message body
    	if (strcasecmp($message->ctype_primary,"text") == 0 && 
    		strcasecmp($message->ctype_secondary,$subtype) == 0 && 
    		isset($message->body)) 
    	{
    		if (isset($message->ctype_parameters)) 
    		{
    			$parameters = $message->ctype_parameters;				
    			$sourceEncoding = mb_detect_encoding($message->body, "auto"); // get encoding from body
    		
    			// if encoding is not UTF-8 encode it properly
    			// FIXME: why do we need subtype plain?
    			if ($sourceEncoding != "UTF-8" && $subtype == "plain")  
    			{
    				$body .= iconv( $sourceEncoding, "UTF-8//IGNORE//TRANSLIT", $message->body);
    			} 
    			else 
    			{
    				$body .= $message->body;
    			}
    		} 
    		else 
    		{
    			$body .= $message->body;
    		}
    	}
    
    	// is this a multipart email and there are multiple parts in this object then also grab the contents
    	if(strcasecmp($message->ctype_primary,"multipart") == 0 && 
    		isset($message->parts) && 
    		is_array($message->parts)) 
    	{
    		// iterate through message parts
    		foreach($message->parts as $part) 
    		{
    			// if the part is not a binary attachement
    			if(!isset($part->disposition) || strcasecmp($part->disposition,"attachment"))  
    			{
    				// grab the contents!
    				$this->GetBodyRecursive($part, $subtype, $body);
    			}
    		}
    	}
    } // end GetBodyRecursive
    Guess this will make some international users happy
    Also, don't forget the Content-Type fix I have posted earlier if you want to run a happy system.

    Thanks again for your work on this backend. Cheers!

  8. #368
    liverpoolfcfan's Avatar
    liverpoolfcfan is offline Outstanding Member
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    710
    Rep Power
    6

    Default

    Thanks for the suggestion.

    I had tried to use some of the mb_string functions before but the did not exist on my system (CentoOS 5.x).

    I have just read up on it a bit more now and found out I just need to "yum install php_mbstring" to add the capability.

    I will test out your fix suggestion.

  9. #369
    liverpoolfcfan's Avatar
    liverpoolfcfan is offline Outstanding Member
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    710
    Rep Power
    6

    Default

    Quote Originally Posted by kongregate View Post
    I think the biggest change was that the apache_request_headers method does not exist on Windows.

    IIS7 is basically only UTF8 so this shouldn't be a big issue.
    However appointments and contacts are synced just fine so I assume that there is something wrong in the email handling.

    If you're sure that the response is always sent in UTF8 then there is a semantic error in the codebase:

    This:
    header("Content-type: text/html");
    Should be changed to this:
    header("Content-type: text/html; charset=utf-8");

    The content type is also missing in several places like: if(!isset($_SERVER['PHP_AUTH_PW'])) { } (around line 38)

    If you can give me a URL that sends the contents of the email folder I could debug the response, see if it's really UTF8.

    Where are you seeing this ?

    Somewhere in the zimbra.php backend ?

    OR, are you talking about index.php ?

  10. #370
    kongregate is offline Junior Member
    Join Date
    Nov 2010
    Posts
    7
    Rep Power
    4

    Default

    Yes, those fixes are in the index.php. I would suggest that for zimbra-push we're branching the zpush trunk OR we just submit the to zpush

Page 37 of 106 FirstFirst ... 2735363738394787 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. z-push and zimbra backend problem
    By ben1967 in forum Mobility
    Replies: 9
    Last Post: 11-14-2012, 11:29 PM
  2. z-push and zimbra backend problem
    By ben1967 in forum Administrators
    Replies: 0
    Last Post: 11-11-2012, 02:11 PM
  3. [SOLVED] Z-push Zimbra backend workaround
    By Inchoate in forum Mobility
    Replies: 6
    Last Post: 01-19-2012, 04:22 AM
  4. [SOLVED] Z-push Zimbra backend workaround
    By Inchoate in forum Administrators
    Replies: 0
    Last Post: 10-31-2010, 07:06 AM
  5. Replies: 348
    Last Post: 10-11-2010, 05:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •