Results 1 to 6 of 6

Thread: z-push seems to be working but won't sync with my phone

  1. #1
    tokerau is offline New Member
    Join Date
    Dec 2012
    Posts
    3
    Rep Power
    2

    Default z-push seems to be working but won't sync with my phone

    I'm new with both zimbra and z-push. I'm somewhat of a newbie with linux, also.
    I use Centos 6
    I've installed zimbra 8, and it works.
    On another machine, I've installed z-push 2 and gotten it to the point where I access it via a browser and it gives me the expected "get not supported" error when I give it a valid zimbra user/password.
    when I try to set up the activesync account on my android phone, it tells me that it is not authenticating to the server. It seems that it is hitting the server, though, so I'm not sure what the problem is. Any ideas would be greatly appreciated.

    And also for some reason, the debug.txt thing isn't working. It is set to "true" in the config.php file, and the permissions are correct on the debug,txt file, but it doesn't write to it. Maybe it can't find it? Where can I tell z-push where to find the debug.txt file?

  2. #2
    lytledd is offline Elite Member
    Join Date
    Dec 2009
    Location
    Michigan
    Posts
    453
    Rep Power
    5

    Default

    I'm new with both zimbra and z-push. I'm somewhat of a newbie with linux, also.
    I use Centos 6
    I've installed zimbra 8, and it works.
    Without knowing what version of Z-Push, or seeing any of your configs, nobody is going to be able to help. Things that need posting:

    Version of Z-Push
    Version of Zimbra Z-Push backend
    A copy of your backend/zimbra/config.php
    Internal IP address of your Z-push server
    Internal IP address of your Zimbra server

    Doug
    Ben Franklin quote:

    "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."

  3. #3
    tokerau is offline New Member
    Join Date
    Dec 2012
    Posts
    3
    Rep Power
    2

    Default

    Thanks for your help. These servers are experimental only right now, and I can do whatever I want with them, there are no real users on them right now. They are both out in the open with external IPs on them so they are easy to get to for now. However, I hesitate putting the IPs out here because of future security issues.

    if you want to try it out, I am willing to create a user for you, but I'd rather not expose the domain and IPs publically, I can send that via private mail.

    Part of my problem is that I don't know if I'm getting all the stuff I need to make this work. I've seen so many versions of installations. They all have similarities, but it's the differences that are confusing.

    z-push version is:
    2.0.6-1616

    z-push backend revision 158, as found here:
    https://zimbrabackend.svn.sourceforg...ches/z-push-2/

    There doesn't seem to be a backend/zimbra/config.php, but there is a z-push/config.php quoted here:

    /***********************************************
    * File : config.php
    * Project : Z-Push
    * Descr : Main configuration file
    *
    * Created : 01.10.2007
    *
    * Copyright 2007 - 2012 Zarafa Deutschland GmbH
    *
    * This program is free software: you can redistribute it and/or modify
    * it under the terms of the GNU Affero General Public License, version 3,
    * as published by the Free Software Foundation with the following additional
    * term according to sec. 7:
    *
    * According to sec. 7 of the GNU Affero General Public License, version 3,
    * the terms of the AGPL are supplemented with the following terms:
    *
    * "Zarafa" is a registered trademark of Zarafa B.V.
    * "Z-Push" is a registered trademark of Zarafa Deutschland GmbH
    * The licensing of the Program under the AGPL does not imply a trademark license.
    * Therefore any rights, title and interest in our trademarks remain entirely with us.
    *
    * However, if you propagate an unmodified version of the Program you are
    * allowed to use the term "Z-Push" to indicate that you distribute the Program.
    * Furthermore you may use our trademarks where it is necessary to indicate
    * the intended purpose of a product or service provided you use it in accordance
    * with honest practices in industrial or commercial matters.
    * If you want to propagate modified versions of the Program under the name "Z-Push",
    * you may only do so if you have a written permission by Zarafa Deutschland GmbH
    * (to acquire a permission please contact Zarafa at trademark@zarafa.com).
    *
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    * GNU Affero General Public License for more details.
    *
    * You should have received a copy of the GNU Affero General Public License
    * along with this program. If not, see .
    *
    * Consult LICENSE file for details
    ************************************************/
    /************************************************** ********************************
    * Default settings
    */
    // Defines the default time zone, change e.g. to "Europe/London" if necessary
    define('TIMEZONE', 'America/Los_Angeles');

    // Defines the base path on the server
    define('BASE_PATH', dirname($_SERVER['SCRIPT_FILENAME']). '/');

    // Try to set unlimited timeout
    define('SCRIPT_TIMEOUT', 0);

    //Max size of attachments to display inline. Default is 2 MB
    define('MAX_EMBEDDED_SIZE', 2097152);


    /************************************************** ********************************
    * Default FileStateMachine settings
    */
    // define('STATE_DIR', '/var/lib/z-push/');
    define('STATE_DIR', '/var/www/html/z-push/state/');

    /************************************************** ********************************
    * Logging settings
    * Possible LOGLEVEL and LOGUSERLEVEL values are:
    * LOGLEVEL_OFF - no logging
    * LOGLEVEL_FATAL - log only critical errors
    * LOGLEVEL_ERROR - logs events which might require corrective actions
    * LOGLEVEL_WARN - might lead to an error or require corrective actions in the future
    * LOGLEVEL_INFO - usually completed actions
    * LOGLEVEL_DEBUG - debugging information, typically only meaningful to developers
    * LOGLEVEL_WBXML - also prints the WBXML sent to/from the device
    * LOGLEVEL_DEVICEID - also prints the device id for every log entry
    * LOGLEVEL_WBXMLSTACK - also prints the contents of WBXML stack
    *
    * The verbosity increases from top to bottom. More verbose levels include less verbose
    * ones, e.g. setting to LOGLEVEL_DEBUG will also output LOGLEVEL_FATAL, LOGLEVEL_ERROR,
    * LOGLEVEL_WARN and LOGLEVEL_INFO level entries.
    */
    define('LOGFILEDIR', '/var/log/z-push/');
    define('LOGFILE', LOGFILEDIR . 'z-push.log');
    define('LOGERRORFILE', LOGFILEDIR . 'z-push-error.log');
    define('LOGLEVEL', LOGLEVEL_INFO);
    define('LOGAUTHFAIL', false);


    // To save e.g. WBXML data only for selected users, add the usernames to the array
    // The data will be saved into a dedicated file per user in the LOGFILEDIR
    define('LOGUSERLEVEL', LOGLEVEL_DEVICEID);
    $specialLogUsers = array();


    /************************************************** ********************************
    * Mobile settings
    */
    // Device Provisioning
    define('PROVISIONING', false);

    // This option allows the 'loose enforcement' of the provisioning policies for older
    // devices which don't support provisioning (like WM 5 and HTC Android Mail) - dw2412 contribution
    // false (default) - Enforce provisioning for all devices
    // true - allow older devices, but enforce policies on devices which support it
    define('LOOSE_PROVISIONING', true);

    // Default conflict preference
    // Some devices allow to set if the server or PIM (mobile)
    // should win in case of a synchronization conflict
    // SYNC_CONFLICT_OVERWRITE_SERVER - Server is overwritten, PIM wins
    // SYNC_CONFLICT_OVERWRITE_PIM - PIM is overwritten, Server wins (default)
    define('SYNC_CONFLICT_DEFAULT', SYNC_CONFLICT_OVERWRITE_PIM);

    // Global limitation of items to be synchronized
    // The mobile can define a sync back period for calendar and email items
    // For large stores with many items the time period could be limited to a max value
    // If the mobile transmits a wider time period, the defined max value is used
    // Applicable values:
    // SYNC_FILTERTYPE_ALL (default, no limitation)
    // SYNC_FILTERTYPE_1DAY, SYNC_FILTERTYPE_3DAYS, SYNC_FILTERTYPE_1WEEK, SYNC_FILTERTYPE_2WEEKS,
    // SYNC_FILTERTYPE_1MONTH, SYNC_FILTERTYPE_3MONTHS, SYNC_FILTERTYPE_6MONTHS
    define('SYNC_FILTERTIME_MAX', SYNC_FILTERTYPE_ALL);
    // Interval in seconds before checking if there are changes on the server when in Ping.
    // It means the highest time span before a change is pushed to a mobile. Set it to
    // a higher value if you have a high load on the server.
    define('PING_INTERVAL', 30);

    // Interval in seconds to force a re-check of potentially missed notifications when
    // using a changes sink. Default are 300 seconds (every 5 min).
    // This can also be disabled by setting it to false
    define('SINK_FORCERECHECK', 300);

    // Set the fileas (save as) order for contacts in the webaccess/webapp/outlook.
    // It will only affect new/modified contacts on the mobile which then are synced to the server.
    // Possible values are:
    // SYNC_FILEAS_FIRSTLAST - fileas will be "Firstname Middlename Lastname"
    // SYNC_FILEAS_LASTFIRST - fileas will be "Lastname, Firstname Middlename"
    // SYNC_FILEAS_COMPANYONLY - fileas will be "Company"
    // SYNC_FILEAS_COMPANYLAST - fileas will be "Company (Lastname, Firstname Middlename)"
    // SYNC_FILEAS_COMPANYFIRST - fileas will be "Company (Firstname Middlename Lastname)"
    // SYNC_FILEAS_LASTCOMPANY - fileas will be "Lastname, Firstname Middlename (Company)"
    // SYNC_FILEAS_FIRSTCOMPANY - fileas will be "Firstname Middlename Lastname (Company)"
    // The company-fileas will only be set if a contact has a company set. If one of
    // company-fileas is selected and a contact doesn't have a company set, it will default
    // to SYNC_FILEAS_FIRSTLAST or SYNC_FILEAS_LASTFIRST (depending on if last or first
    // option is selected for company).
    // If SYNC_FILEAS_COMPANYONLY is selected and company of the contact is not set
    // SYNC_FILEAS_LASTFIRST will be used
    define('FILEAS_ORDER', SYNC_FILEAS_LASTFIRST);

    // 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);
    /************************************************** ********************************
    * Backend settings
    */
    // The data providers that we are using (see configuration below)
    define('BACKEND_PROVIDER', "BackendZimbra");


    // ************************
    // BackendZarafa settings
    // ************************
    // Defines the server to which we want to connect
    define('MAPI_SERVER', 'file:///var/run/zarafa');


    // ************************
    // BackendIMAP settings
    // ************************
    // Defines the server to which we want to connect
    define('IMAP_SERVER', 'https://mail.mydomain.com');
    // connecting to default port (143)
    define('IMAP_PORT', 143);
    // best cross-platform compatibility (see PHP: imap_open - Manual for options)
    define('IMAP_OPTIONS', '/notls/norsh');
    // overwrite the "from" header if it isn't set when sending emails
    // options: 'username' - the username will be set (usefull if your login is equal to your emailaddress)
    // 'domain' - the value of the "domain" field is used
    // '@mydomain.com' - the username is used and the given string will be appended
    define('IMAP_DEFAULTFROM', '@mydomain.com');
    // copy outgoing mail to this folder. If not set z-push will try the default folders
    define('IMAP_SENTFOLDER', '');
    // forward messages inline (default false - as attachment)
    define('IMAP_INLINE_FORWARD', false);
    // use imap_mail() to send emails (default) - if false mail() is used
    define('IMAP_USE_IMAPMAIL', true);
    /* BEGIN fmbiete's contribution r1527, ZP-319 */
    // list of folders we want to exclude from sync. Names, or part of it, separated by |
    // example: dovecot.sieve|archive|spam
    define('IMAP_EXCLUDED_FOLDERS', '');
    /* END fmbiete's contribution r1527, ZP-319 */

    // ************************
    // BackendMaildir settings
    // ************************
    define('MAILDIR_BASE', '/tmp');
    define('MAILDIR_SUBDIR', 'Maildir');

    // **********************
    // BackendVCardDir settings
    // **********************
    define('VCARDDIR_DIR', '/home/%u/.kde/share/apps/kabc/stdvcf');


    /************************************************** ********************************
    * Search provider settings
    *
    * Alternative backend to perform SEARCH requests (GAL search)
    * By default the main Backend defines the preferred search functionality.
    * If set, the Search Provider will always be preferred.
    * Use 'BackendSearchLDAP' to search in a LDAP directory (see backend/searchldap/config.php)
    */
    define('SEARCH_PROVIDER', '');
    // Time in seconds for the server search. Setting it too high might result in timeout.
    // Setting it too low might not return all results. Default is 10.
    define('SEARCH_WAIT', 10);
    // The maximum number of results to send to the client. Setting it too high
    // might result in timeout. Default is 10.
    define('SEARCH_MAXRESULTS', 10);

    /************************************************** ********************************
    * Synchronize additional folders to all mobiles
    *
    * With this feature, special folders can be synchronized to all mobiles.
    * This is useful for e.g. global company contacts.
    *
    * This feature is supported only by certain devices, like iPhones.
    * Check the compatibility list for supported devices:
    * http://z-push.sf.net/compatibility
    *
    * To synchronize a folder, add a section setting all parameters as below:
    * store: the ressource where the folder is located.
    * Zarafa users use 'SYSTEM' for the 'Public Folder'
    * folderid: folder id of the folder to be synchronized
    * name: name to be displayed on the mobile device
    * type: supported types are:
    * SYNC_FOLDER_TYPE_USER_CONTACT
    * SYNC_FOLDER_TYPE_USER_APPOINTMENT
    * SYNC_FOLDER_TYPE_USER_TASK
    * SYNC_FOLDER_TYPE_USER_MAIL
    *
    * Additional notes:
    * - on Zarafa systems use backend/zarafa/listfolders.php script to get a list
    * of available folders
    *
    * - all Z-Push users must have full writing permissions (secretary rights) so
    * the configured folders can be synchronized to the mobile
    *
    * - this feature is only partly suitable for multi-tenancy environments,
    * as ALL users from ALL tenents need access to the configured store & folder.
    * When configuring a public folder, this will cause problems, as each user has
    * a different public folder in his tenant, so the folder are not available.

    * - changing this configuration could cause HIGH LOAD on the system, as all
    * connected devices will be updated and load the data contained in the
    * added/modified folders.
    */

    $additionalFolders = array(
    // demo entry for the synchronization of contacts from the public folder.
    // uncomment (remove '/*' '*/') and fill in the folderid
    /*
    array(
    'store' => "SYSTEM",
    'folderid' => "",
    'name' => "Public Contacts",
    'type' => SYNC_FOLDER_TYPE_USER_CONTACT,
    ),
    */
    );


    // ************************
    // BackendZimbra settings
    // ************************
    define('ZIMBRA_URL', 'https://mydomain.com'); //Please do not put a trailing forward slash at the end of the url
    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',true);
    define('ZIMBRA_ENFORCE_VALID_EMAIL',true);
    define('ZIMBRA_SMART_FOLDERS',true);
    define('ZIMBRA_DEBUG',true);

  4. #4
    lytledd is offline Elite Member
    Join Date
    Dec 2009
    Location
    Michigan
    Posts
    453
    Rep Power
    5

    Default

    Okay, lets start from scratch. Since I'm running on CentOs as well it should be somewhat easier.

    Since you've mentioned that you're new to Linux, I don't know how detailed I need to get, so I'll give you the basics and if you have questions, I'll try to fill in the blanks.

    You're Z-push version is fine, but I wouldn't suggest using the svn version of ZimbraBackend until you've got a working system. Download the version below:

    Z-Push Zimbra Backend - Browse /Release55 at SourceForge.net

    Extract the contents of z-push-2.0.6-1616.tar.gz to /var/www/html
    Rename the folder to whatever you'd like, I use z-push

    Create a directory within /var/www/html/z-push called state

    Code:
    mkdir /var/www/html/z-push/state -p
    Change ownership of the z-push directory to apache

    Code:
    chown apache:apache /var/www/html/z-push -R
    Extract the contents of zimbra55-zpush2--zimbra54-zpush1-as12.1.tgz to a temporary directory, I usually create a folder in my home directory for this.

    The only directory we're interested from this archive is the zimbra55 and it's sub-directory called z-push-2

    Create a diretory called zimbra in the /var/www/html/z-push/backend
    Copy the contents of the previously extracted z-push-2 directory to your /var/www/html/z-push/backend/zimbra directory

    You'll note there is a config.php there.

    Edit the config.php to meet your setup, mine is:

    Code:
        // **********************
        //  BackendZimbra settings
        // **********************
    
            define('ZIMBRA_URL', 'https://10.10.10.250');               
            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',true);
    
    //      define('ZIMBRA_TIMEZONE', 'America/Detroit');
    
            define('ZIMBRA_ENFORCE_VALID_EMAIL', true);
    
            define('ZIMBRA_SMART_FOLDERS',false);
            define('ZIMBRA_RETRIES_ON_HOST_CONNECT_ERROR',5);
    
        define('ZIMBRA_LOCAL_CACHE', true);
    
    //      define('ZIMBRA_MB_DETECT_ORDER', 'ASCII, UTF-8, ISO-8859-1, ISO-8859-15' );
    
            define('ZIMBRA_DEBUG',false);
    //      define('ZIMBRA_DEBUG','setup');
    //      define('ZIMBRA_DEBUG','username');
    
    
            // In case Function Overload is being detect for mbstring functions we set the define
            // to the overload level so that we can handle binary data propper...
            define('MBSTRING_OVERLOAD', (extension_loaded('mbstring') ? ini_get('mbstring.func_overload') : false));
    You said you've got your apache settings correct, but lets compare with mine anyways.

    cd /etc/httpd/conf.d

    cat z-push.conf
    Code:
     
    Alias /Microsoft-Server-ActiveSync /var/www/html/z-push/index.php
    Make sure to restart apache

    Code:
    service httpd restart
    You can watch log entries in 2 locations

    /var/log/httpd
    /var/www/html/z-push/z-push.log

    Doug
    Ben Franklin quote:

    "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."

  5. #5
    tokerau is offline New Member
    Join Date
    Dec 2012
    Posts
    3
    Rep Power
    2

    Default

    Thanks so much! I followed your instructions, and did a few things not outlined that needed to be done and it worked! I think it was the version of the backend because your instructions aren't all that different than other ones I tried. But it works!

    Thanks so much!

    Now I just need to figure out why my android phone doesn't sync the calendar very well. The mail and contacts both sync both directions, but the calendar only syncs in one direction. If I make an event in the web access, it syncs the initial added event, but after that, nothing syncs. If I change the even on the web access, it won't change it on the phone. I can delete it on web access, but it stays there on the phone. If I edit the event on the phone, it doesn't sync back to the server. I'm not sure why, and I still can't get the z-push to use debug.txt for some reason.

    Figures that it's the calendering that I need the most!

  6. #6
    lytledd is offline Elite Member
    Join Date
    Dec 2009
    Location
    Michigan
    Posts
    453
    Rep Power
    5

    Default

    Now I just need to figure out why my android phone doesn't sync the calendar very well. The mail and contacts both sync both directions, but the calendar only syncs in one direction. If I make an event in the web access, it syncs the initial added event, but after that, nothing syncs. If I change the even on the web access, it won't change it on the phone. I can delete it on web access, but it stays there on the phone. If I edit the event on the phone, it doesn't sync back to the server. I'm not sure why, and I still can't get the z-push to use debug.txt for some reason.

    I'm not experiencing these issues on my Galaxy S III, anything in your logs. You should be able to see if there are errors in your /var/logs/httpd/

    Also, if your /var/www/html/z-push directory isn't owned by apache, then no logs will be written there.

    Code:
    chown apache:apache /var/www/html/z-push -R
    service httpd restart
    Doug
    Ben Franklin quote:

    "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] z-push stopped working with zimbra
    By powrrrplay in forum Administrators
    Replies: 2
    Last Post: 05-28-2010, 10:37 AM
  2. z-push installation not working
    By bkortleven in forum Mobility
    Replies: 4
    Last Post: 05-16-2010, 07:26 AM
  3. How to sync my phone
    By gscherz in forum Mobility
    Replies: 2
    Last Post: 02-18-2010, 12:59 AM
  4. Replies: 0
    Last Post: 09-24-2009, 10:31 AM
  5. Sync cal with symbian phone
    By fernandoflorez in forum Administrators
    Replies: 3
    Last Post: 10-15-2007, 07:19 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
  •