Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
d53cb88a
Commit
d53cb88a
authored
Aug 11, 2014
by
jkaberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update z-push with carddav and caldav support
parent
20b494c3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
9 deletions
+128
-9
zpush_backend_combined.php
conf/zpush_backend_combined.php
+103
-0
zpush.sh
setup/zpush.sh
+25
-9
No files found.
conf/zpush_backend_combined.php
0 → 100644
View file @
d53cb88a
<?php
/***********************************************
* File : backend/combined/config.php
* Project : Z-Push
* Descr : configuration file for the
* combined backend.
*
* Created : 29.11.2010
*
* Copyright 2007 - 2013 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 <http://www.gnu.org/licenses/>.
*
* Consult LICENSE file for details
************************************************/
class
BackendCombinedConfig
{
// *************************
// 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'
,
);
}
}
?>
\ No newline at end of file
setup/zpush.sh
View file @
d53cb88a
...
...
@@ -19,25 +19,41 @@ apt_install \
php5enmod imap
# Copy Z-Push into place.
if
[
!
-d
/usr/local/lib/z-push
]
;
then
ZPUSH
=
z-push-2.1.3-1892
wget
-qO
/tmp/zpush.
tgz http://download.z-push.org/final/2.1/
$ZPUSH
.tar.gz
tar
-C
/tmp
-zxf
/tmp/zpush.tgz
mv
/
tmp/
$ZPUSH
/usr/local/lib/z-push
rm
-f
/tmp/zpush.zip
wget
-qO
/tmp/zpush.
zip https://github.com/fmbiete/Z-Push-contrib/archive/master.zip
unzip /tmp/zpush.zip
-d
/usr/local/lib/
mv
/
usr/local/lib/Z-Push-contrib-master
/usr/local/lib/z-push
ln
-s
/usr/local/lib/z-push/z-push-admin.php /usr/sbin/z-push-admin
ln
-s
/usr/local/lib/z-push/z-push-top.php /usr/sbin/z-push-top
rm
/tmp/zpush.
tgz
;
rm
/tmp/zpush.
zip
;
fi
# Configure. Tell is to connect to email via IMAP using SSL. Since we connect on
# Configure default config
# TODO: Add timezone etc?
sed
-i
"s/define('BACKEND_PROVIDER', .*/define('BACKEND_PROVIDER', 'BackendCombined');/"
/usr/local/lib/z-push/config.php
# Configure BACKEND
rm
-f
/usr/local/lib/z-push/backend/combined/config.php
cp
conf/zpush_backend_combined.php /usr/local/lib/z-push/backend/combined/config.php
# Configure IMAP. Tell is to connect to email via IMAP using SSL. Since we connect on
# localhost, the certificate won't match (it may be self-signed and invalid anyway)
# so don't check the cert.
sed
-i
"s/define('BACKEND_PROVIDER', .*/define('BACKEND_PROVIDER', 'BackendIMAP');/"
/usr/local/lib/z-push/config.php
#sed -i "s/define('IMAP_SERVER', .*/define('IMAP_SERVER', '$PRIMARY_HOSTNAME');/" /usr/local/lib/z-push/backend/imap/config.php
sed
-i
"s/define('IMAP_SERVER', .*/define('IMAP_SERVER', 'localhost');/"
/usr/local/lib/z-push/backend/imap/config.php
sed
-i
"s/define('IMAP_PORT', .*/define('IMAP_PORT', 993);/"
/usr/local/lib/z-push/backend/imap/config.php
sed
-i
"s/define('IMAP_OPTIONS', .*/define('IMAP_OPTIONS', '
\/
ssl
\/
norsh
\/
novalidate-cert');/"
/usr/local/lib/z-push/backend/imap/config.php
# Configure CardDav
sed
-i
"s/define('CARDDAV_PROTOCOL', .*/define('CARDDAV_PROTOCOL', 'https');/"
/usr/local/lib/z-push/backend/carddav/config.php
sed
-i
"s/define('CARDDAV_SERVER', .*/define('CARDDAV_SERVER', 'localhost');/"
/usr/local/lib/z-push/backend/carddav/config.php
sed
-i
"s/define('CARDDAV_PORT', .*/define('CARDDAV_PORT', '443');/"
/usr/local/lib/z-push/backend/carddav/config.php
sed
-i
"s/define('CARDDAV_PATH', .*/define('CARDDAV_PATH', '/remote.php/carddav/addressbooks/%u/');/"
/usr/local/lib/z-push/backend/carddav/config.php
# Configure CalDav
sed
-i
"s/define('CALDAV_SERVER', .*/define('CALDAV_SERVER', 'https://localhost');/"
/usr/local/lib/z-push/backend/caldav/config.php
sed
-i
"s/define('CALDAV_PORT', .*/define('CALDAV_PORT', '443');/"
/usr/local/lib/z-push/backend/caldav/config.php
sed
-i
"s/define('CALDAV_PATH', .*/define('CALDAV_PATH', '/remote.php/caldav/calendars/%u/');/"
/usr/local/lib/z-push/backend/caldav/config.php
# Some directories it will use.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment