Z-Push web hosted with cPanel don't work



  • Hello,

    I try to install Z-Push on web hosted with cPanel with SSL (let’s encrypt). It’s not dedicated server.

    Z-Push and autodiscover access php page work (HTTP & HTTPS) in browser but autodiscover can work with Address ending with /Autodiscover/Autodiscover.xml.
    Autodiscover don’t work because cPanel override /Autodiscover/Autodiscover.xml.
    Message is "Autodiscover and Autoconfig support is disabled."
    It’s ok for me, I must manual enter server parameter in Outlook or Android.

    Now, I test with Outlook and Android to connect to Z-Push. Z-Push is connected to imap server.
    I tested with Z-Push 2.3.6 final and last version branch develop on bitbucket

    Nothing work with email client.
    z-push-error.log :

    26/05/2017 18:36:24 [50005] [FATAL] [test@mydomain.com] FatalException: Requested the Z-Push URL without the required GET parameters - code: 0 - file: /home/mydomain/public_html/mydomaincom/zpush/index.php:71
    26/05/2017 18:36:24 [50005] [FATAL] [test@mydomain.com] Exception: (FatalException) - Requested the Z-Push URL without the required GET parameters
    

    z-push.log :

    26/05/2017 18:36:32 [50124] [DEBUG] [test@mydomain.com] -------- Start
    26/05/2017 18:36:32 [50124] [DEBUG] [test@mydomain.com] cmd='' devType='' devId='' getUser='test@mydomain.com' from='x.x.x.x' version='GIT' method='GET'
    26/05/2017 18:36:32 [50124] [DEBUG] [test@mydomain.com] Used timezone 'Europe/Paris'
    26/05/2017 18:36:32 [50124] [DEBUG] [test@mydomain.com] Request::ProcessHeaders() ASVersion: 14.0
    26/05/2017 18:36:32 [50124] [DEBUG] [test@mydomain.com] ZPush::CommandNeedsAuthentication(0): true
    26/05/2017 18:36:32 [50124] [DEBUG] [test@mydomain.com] BackendIMAP->Logon(): User 'test@mydomain.com' is authenticated on '{mail.mydomain.com:993/imap/ssl/novalidate-cert}'
    26/05/2017 18:36:32 [50124] [DEBUG] [test@mydomain.com] NoPostRequestException: This is the Z-Push location and can only be accessed by Microsoft ActiveSync-capable devices - code: 2 - file: /home/mydomain/public_html/mydomaincom/zpush/index.php:90
    26/05/2017 18:36:32 [50124] [ INFO] [test@mydomain.com] User-agent: 'Android-Mail/7.5.7.156101332.release'
    26/05/2017 18:36:32 [50124] [DEBUG] [test@mydomain.com] ZPush::PrintZPushLegal()
    26/05/2017 18:36:32 [50124] [ INFO] [test@mydomain.com] cmd='' memory='2.33 MiB/2.75 MiB' time='0.14s' devType='' devId='' getUser='test@mydomain.com' from='x.x.x.x' idle='0s' version='GIT' method='GET' httpcode='200'
    26/05/2017 18:36:32 [50124] [DEBUG] [test@mydomain.com] -------- End
    

    I see :

    • User “test” can log in to imap
    • First access is with GET with Outlook and Android
    • Server have advance of 5-6 minutes.

    I think to have passed all step of INSTALL file and log is with LOGLEVEL @ LOGLEVEL_WBXML.
    Microsoft-Server-ActiveSync folder is redirected with htaccess:
    Redirect /Microsoft-Server-ActiveSync https://mydomain.com/zpush/index.php

    What can I do now?

    Thanks in advance.


  • Kopano

    Well, the issue is that the redirect doesn’t seem to work with a POST request, Z-Push is not receiving the POST request from the device, nor the command, devicetype nor deviceid (cmd=’’ devType=’’ devId=’’) which are actually GET parameters from the requested URI.

    So, the issue is in the redirect. I am not sure if this can be done properly from within an htaccess file.

    Cheers,
    Seb


  • Kopano



  • Wonderful, this step works. Thank you.

    Now, I have others issues.
    I go to telnet to list imap folders:

    50 list "*" "*"
    * LIST (\HasChildren) "." INBOX
    * LIST (\HasNoChildren \UnMarked \Junk) "." INBOX.spam
    * LIST (\HasNoChildren \UnMarked \Archive) "." INBOX.Archive
    * LIST (\HasNoChildren \UnMarked \Junk) "." INBOX.Junk
    * LIST (\HasNoChildren \UnMarked \Drafts) "." INBOX.Drafts
    * LIST (\HasNoChildren \UnMarked \Trash) "." INBOX.Trash
    * LIST (\HasNoChildren \UnMarked \Sent) "." INBOX.Sent
    50 OK List completed (0.001 + 0.001 + 0.001 secs).
    

    I configure and nothing works:

    define('IMAP_FOLDER_CONFIGURED', true);
    define('IMAP_FOLDER_PREFIX', 'INBOX');
    define('IMAP_FOLDER_PREFIX_IN_INBOX', true);
    define('IMAP_FOLDER_INBOX', '');
    define('IMAP_FOLDER_SENT', 'Sent');
    define('IMAP_FOLDER_DRAFT', 'Drafts');
    define('IMAP_FOLDER_TRASH', 'Trash');
    define('IMAP_FOLDER_SPAM', 'spam');
    define('IMAP_FOLDER_ARCHIVE', 'Archive');
    

    Error:

    27/05/2017 02:35:00 [875660] [ERROR] [test@mydomain.com] [c4bdca5de3185839] LoopDetection->ProcessLoopDetectionPreviousConnectionFailed(): Command 'FolderSync' at 27/05/2017 02:20:41 with pid '669739' terminated unexpectedly or is still running.
    27/05/2017 02:35:00 [875660] [ERROR] [test@mydomain.com] [c4bdca5de3185839] Please check your logs for this PID and errors like PHP-Fatals or Apache segmentation faults and report your results to the Z-Push dev team.
    

    Log Begin:

    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] -------- Start
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] cmd='FolderSync' devType='Outlook' devId='c4bdca5de3185839' getUser='test@mydomain.com' from='x.x.x.x' version='GIT' method='POST'
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] Used timezone 'Europe/Paris'
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] Request::ProcessHeaders() ASVersion: 14.0
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] ZPush::CommandNeedsAuthentication(9): true
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] BackendIMAP->Logon(): User 'test@mydomain.com' is authenticated on '{mail.mydomain.com:993/imap/ssl/novalidate-cert}'
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] FileStateMachine->GetState() read '567' bytes from file: '/home/mydomain/public_html/mydomaincom/zpush/state/9/3/c4bdca5de3185839-devicedata'
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] ASDevice data loaded for user: 'test@mydomain.com'
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] TopCollector(): Initialized mutexid Resource id #20 and memid Resource id #21.
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] TopCollector initialised with IPC provider 'IpcSharedMemoryProvider' with type '20'
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] LoopDetection(): Initialized mutexid Resource id #24 and memid Resource id #25.
    27/05/2017 02:35:00 [875660] [DEBUG] [test@mydomain.com] [c4bdca5de3185839] LoopDetection initialised with IPC provider 'IpcSharedMemoryProvider' with type '1337'
    27/05/2017 02:35:00 [875660] [ERROR] [test@mydomain.com] [c4bdca5de3185839] LoopDetection->ProcessLoopDetectionPreviousConnectionFailed(): Command 'FolderSync' at 27/05/2017 02:20:41 with pid '669739' terminated unexpectedly or is still running.
    27/05/2017 02:35:00 [875660] [ERROR] [test@mydomain.com] [c4bdca5de3185839] Please check your logs for this PID and errors like PHP-Fatals or Apache segmentation faults and report your results to the Z-Push dev team.
    ...
    

    I change settings and it’s works … almost

    define('IMAP_FOLDER_CONFIGURED', true);
    define('IMAP_FOLDER_PREFIX', '');
    define('IMAP_FOLDER_PREFIX_IN_INBOX', false);
    define('IMAP_FOLDER_INBOX', 'INBOX');
    define('IMAP_FOLDER_SENT', 'INBOX.Sent');
    define('IMAP_FOLDER_DRAFT', 'INBOX.Drafts');
    define('IMAP_FOLDER_TRASH', 'INBOX.Trash');
    define('IMAP_FOLDER_SPAM', 'INBOX.spam');
    define('IMAP_FOLDER_ARCHIVE', 'INBOX.Archive');
    
    • Sometime, email in INBOX disappears from email client when state change to read.
    • Drafts are not synchronised. (doesn’t show existing draft and doesn’t sent new draft).
    • Issue with spam and Junk directory


  • Hello,

    Emails are missing because there is issue with LoopDetection.
    It’s test email with few emails:

    • INBOX: 3
    • Trash: 3
    • Sent: 2
    • Drafts: 1
    27/05/2017 19:02:26 [992344] [WARN] [test@mydomain.com] [androidc10628000] Mobile loop detected! Messages sent to the mobile will be restricted to 1 items in order to identify the conflict
    27/05/2017 19:02:27 [992592] [WARN] [test@mydomain.com] [androidc10628000] Mobile loop detected! Messages sent to the mobile will be restricted to 1 items in order to identify the conflict
    

    Log

    I think “unmatched WBXML” is source of issue.
    For large log, I must use pastebin?

    Thanks.


  • Kopano

    For larger logs you should use pastebin (or any other similar) service.
    You could also upload the log somewhere and post the link here.



  • After several tests with 4 emails softwares on android, I updated with last git version, I stopped loop detection and it works well.
    I think the problem probably comes from the special imap folder configuration.

    Thanks for your help.

    For me, this problem is solved.


Log in to reply
 

Looks like your connection to Kopano Community Forum was lost, please wait while we try to reconnect.