zpush with backend combined?
-
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
-
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
-
@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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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