Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    zpush with backend combined?

    General usage of Z-Push
    3
    12
    3635
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Manfred
      Manfred Kopano last edited by

      Hi killmasta93,

      first of all - Z-Push 2.3 versions have reached end of life. You should use the most recent, which is currently 2.4.4.

      In the combined config you have to set which backend is responsible for which type of sync:

      'folderbackend' => array(
                      SYNC_FOLDER_TYPE_INBOX => 'i',
                      SYNC_FOLDER_TYPE_DRAFTS => 'i',
                      SYNC_FOLDER_TYPE_WASTEBASKET => 'i',
                      SYNC_FOLDER_TYPE_SENTMAIL => 'i',
                      SYNC_FOLDER_TYPE_OUTBOX => 'i',
                      SYNC_FOLDER_TYPE_TASK => 'z',
                      SYNC_FOLDER_TYPE_APPOINTMENT => 'c',
                      SYNC_FOLDER_TYPE_CONTACT => 'd',
                      SYNC_FOLDER_TYPE_NOTE => 'z',
                      SYNC_FOLDER_TYPE_JOURNAL => 'z',
                      SYNC_FOLDER_TYPE_OTHER => 'i',
                      SYNC_FOLDER_TYPE_USER_MAIL => 'i',
                      SYNC_FOLDER_TYPE_USER_APPOINTMENT => 'c',
                      SYNC_FOLDER_TYPE_USER_CONTACT => 'd',
                      SYNC_FOLDER_TYPE_USER_TASK => 'z',
                      SYNC_FOLDER_TYPE_USER_JOURNAL => 'z',
                      SYNC_FOLDER_TYPE_USER_NOTE => 'z',
                      SYNC_FOLDER_TYPE_UNKNOWN => 'z',
                  ),
      

      In my example I replaced the values of SYNC_FOLDER_TYPE_USER_APPOINTMENT and SYNC_FOLDER_TYPE_APPOINTMENT to use the caldav backend and the values of SYNC_FOLDER_TYPE_USER_CONTACT and SYNC_FOLDER_TYPE_CONTACT to use the carddav backend. Change the other values as well to match your needs (the ‘i’ ones should be ok, you’ll need to change the ‘z’ ones if you’re not using the Kopano backend.

      Manfred

      1 Reply Last reply Reply Quote 0
      • killmasta93
        killmasta93 last edited by

        Dear Manfred,
        Thank you for the reply, I will update it was not sure if 2.4.4 was beta, so if i understood correctly “i” are the types im using and z the types im not using what about c and d?

        Thank you

        fbartels Manfred 2 Replies Last reply Reply Quote 0
        • fbartels
          fbartels Kopano @killmasta93 last edited by

          @killmasta93 said in zpush with backend combined?:

          I will update it was not sure if 2.4.4 was beta

          I am curious to learn what made you come to this conclusion.

          http://z-push.org/z-push-2-4-4-final-release/

          https://forum.kopano.io/topic/1608/z-push-2-4-4-final-released

          Regards Felix

          Resources:
          https://kopano.com/blog/how-to-get-kopano/
          https://documentation.kopano.io/
          https://kb.kopano.io/

          Support overview:
          https://kopano.com/support/

          1 Reply Last reply Reply Quote 0
          • Manfred
            Manfred Kopano @killmasta93 last edited by

            Hi killmasta93,

            @killmasta93 said in zpush with backend combined?:

            Dear Manfred,
            Thank you for the reply, I will update it was not sure if 2.4.4 was beta, so if i understood correctly “i” are the types im using and z the types im not using what about c and d?

            ‘c’, ‘d’, ‘i’, ‘z’ are shortcuts for the backends: BackendCalDAV, BackendCardDAV, BackendIMAP, BackendKopano respectively. They are defined in the combined config just a couple of lines above of the ‘folderbackend’:

            'backends' => array(
                            'i' => array(
                                'name' => 'BackendIMAP',
                            ),
                            'z' => array(
                                'name' => 'BackendKopano',
                            ),
                            'm' => array(
                                'name' => 'BackendMaildir',
                            ),
                            'v' => array(
                                'name' => 'BackendVCardDir',
                            ),
                            'l' => array(
                                'name' => 'BackendLDAP',
                            ),
                            'd' => array(
                                'name' => 'BackendCardDAV',
                            ),
                            'c' => array(
                                'name' => 'BackendCalDAV',
                            ),
                        ),
            

            Manfred

            1 Reply Last reply Reply Quote 0
            • killmasta93
              killmasta93 last edited by

              Thank you for the reply, so i upgraded to 2.4.4 and got it working with the BackendIMAP but again i tried on the BackendCombined no luck, i then went to the chrome and put mail.mydomain.com and it ask username and pass and once i put it im getting this error

                            PHP-MAPI extension is not available
              

              i was reading that i would need to create a symlink? or is it something that has to do with the NGINX config?

              Thank you

              1 Reply Last reply Reply Quote 0
              • Manfred
                Manfred Kopano last edited by

                Hi killmasta93,

                the PHP-MAPI extension is required for the Kopano/Zarafa backend only. If you’re not using it, just replace the ‘z’ in ‘folderbackend’ with some other backend, e.g. ‘i’.

                Manfred

                1 Reply Last reply Reply Quote 0
                • killmasta93
                  killmasta93 last edited by killmasta93

                  Hi Manfred,
                  Thank you so much for the reply, what i did is delete the backends i don’t use, but when i configure the email i keep getting server error occurred check your username and password. So then back on the config i changed back to the backend IMAP and after that it works. Then i start checking the logs i get this
                  My question is for the backendCombined to work i need to configure caldav and carddav also? I also forgot to mention im using Radicale for caldav not sure if its compatible?

                                    20/09/2018 20:41:41 [ 1113] [WARN] [sistemas] /var/www/zpush/src/include/z_caldav.php:15     require_once(XMLDocument.php): failed to open stream: No such file or directory (2)
                              20/09/2018 20:41:41 [ 1113] [FATAL] [sistemas] Fatal error: /var/www/zpush/src/include/z_caldav.php:15 - require_once(): Failed opening required 'XMLDocument.php' (include_path='.:/usr/share/php:/usr/share/pear:/usr/share/awl/inc:/var/www/zpush/src/backend/imap/') (64)
                  
                  
                  
                  
                                          // *************************
                  //  BackendCombined settings
                  // *************************
                  /**
                   * Returns the configuration of the combined backend
                   *
                   * @access public
                   * @return array
                   *
                   */
                  public static function GetBackendCombinedConfig() {
                      //use a function for it because php does not allow
                      //assigning variables to the class members (expecting T_STRING)
                      return array(
                          //the order in which the backends are loaded.
                          //login only succeeds if all backend return true on login
                          //sending mail: the mail is sent with first backend that is able to send the mail
                          'backends' => array(
                            'i' => array(
                              'name' => 'BackendIMAP',
                          ),
                          'c' => array(
                              'name' => 'BackendCalDAV',
                          ),
                          'd' => array(
                              'name' => 'BackendCardDAV',
                          ),
                      ),
                          'delimiter' => '/',
                          //force one type of folder to one backend
                          //it must match one of the above defined backends
                          'folderbackend' => array(
                              SYNC_FOLDER_TYPE_INBOX => 'i',
                          SYNC_FOLDER_TYPE_DRAFTS => 'i',
                          SYNC_FOLDER_TYPE_WASTEBASKET => 'i',
                          SYNC_FOLDER_TYPE_SENTMAIL => 'i',
                          SYNC_FOLDER_TYPE_OUTBOX => 'i',
                          SYNC_FOLDER_TYPE_TASK => 'c',
                          SYNC_FOLDER_TYPE_APPOINTMENT => 'c',
                          SYNC_FOLDER_TYPE_CONTACT => 'd',
                          SYNC_FOLDER_TYPE_NOTE => 'c',
                          SYNC_FOLDER_TYPE_JOURNAL => 'c',
                          SYNC_FOLDER_TYPE_OTHER => 'i',
                          SYNC_FOLDER_TYPE_USER_MAIL => 'i',
                          SYNC_FOLDER_TYPE_USER_APPOINTMENT => 'c',
                          SYNC_FOLDER_TYPE_USER_CONTACT => 'd',
                          SYNC_FOLDER_TYPE_USER_TASK => 'c',
                          SYNC_FOLDER_TYPE_USER_JOURNAL => 'c',
                          SYNC_FOLDER_TYPE_USER_NOTE => 'c',
                          SYNC_FOLDER_TYPE_UNKNOWN => 'i',
                          ),
                          //creating a new folder in the root folder should create a folder in one backend
                          'rootcreatefolderbackend' => 'i',
                      );
                     }
                     }
                  

                  Thank you

                  1 Reply Last reply Reply Quote 0
                  • Manfred
                    Manfred Kopano last edited by

                    Hi killmasta93,

                    the XMLDocument.php errors indicate that libawl-php package is either not installed or PHP can’t find it on your system.

                    For the combined backend to work the username and password must be the same on all involved systems (imap, caldav, cardav etc).

                    Manfred

                    1 Reply Last reply Reply Quote 0
                    • killmasta93
                      killmasta93 last edited by

                      Thanks Manfred for the reply, after hours i finally got working the backend to work with the IMAP but whats odd is that still no calendar, i checked the logs and i see this

                                    22/09/2018 23:57:27 [21941] [WARN] [sistemas] /var/www/zpush/src/include/z_caldav.php:459 Undefined property:  CalDAVClient::$xmltags (8)
                                   22/09/2018 23:57:27 [21941] [WARN] [sistemas] /var/www/zpush/src/include/z_caldav.php:459 Invalid argument supplied for foreach() (2)
                      

                      I guess my question is which do you recommend for caldav and cardav? as current I have radicale but i guess its not going to work in this case.

                      Thank you

                      Manfred 1 Reply Last reply Reply Quote 0
                      • Manfred
                        Manfred Kopano @killmasta93 last edited by

                        Hi killmasta93,

                        @killmasta93 said in zpush with backend combined?:

                        Thanks Manfred for the reply, after hours i finally got working the backend to work with the IMAP but whats odd is that still no calendar, i checked the logs and i see this

                                      22/09/2018 23:57:27 [21941] [WARN] [sistemas] /var/www/zpush/src/include/z_caldav.php:459 Undefined property:  CalDAVClient::$xmltags (8)
                                     22/09/2018 23:57:27 [21941] [WARN] [sistemas] /var/www/zpush/src/include/z_caldav.php:459 Invalid argument supplied for foreach() (2)
                        

                        Please set the loglevel to LOGLEVEL_WBXML and post the complete Sync request. Just this tiny excerpt isn’t very helpful.

                        I guess my question is which do you recommend for caldav and cardav? as current I have radicale but i guess its not going to work in this case.

                        Thank you

                        That would be a question for someone who uses combined backend. I don’t use any caldav or carddav server, so I’m not able to give a recommendation which works the best with Z-Push. We also didn’t receive a lot of feedback regarding this.

                        Manfred

                        1 Reply Last reply Reply Quote 0
                        • killmasta93
                          killmasta93 last edited by killmasta93

                          Hi, Manfred Sorry for the late reply, i was trying every options before posting back, good news i nextcloud using the carddav and caldav, the bad news not sure why im getting this error when going to the weburl of zpush

                                   FatalMisconfigurationException The configured LOGFILE can not be modified.
                          

                          For anyone in the same dilemma look at this site you need to configure 2 subdomains one is mail.mydomain.com and another webmail.mydomain.com the mail is the zpush and the webmail is the nextcloud

                          https://pawelgorny.com/using-nextcloud-owncloud-with-z-push-for-caldav-and-carddav/

                          Thank you

                          EDIT: so i solved that part i had to give permissions www-data instead of root but now im getting this other error

                              FatalException
                          
                              BackendIMAP(): php-imap module is not installed
                          

                          Solved: had to install apt-get install php5-imap and reboot

                          Thank you again

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post