From 416dbebf4558bc83379b62313fcc264b657e81b9 Mon Sep 17 00:00:00 2001 From: Michael Kroes Date: Mon, 17 Apr 2017 13:42:44 +0200 Subject: [PATCH] update z-push to 2.3.5 on the upstream repository z-push.org (#1153) --- conf/zpush/autodiscover_config.php | 6 ++++-- conf/zpush/backend_imap.php | 4 ++++ setup/zpush.sh | 16 ++++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/conf/zpush/autodiscover_config.php b/conf/zpush/autodiscover_config.php index df6faa1..1a9a45a 100644 --- a/conf/zpush/autodiscover_config.php +++ b/conf/zpush/autodiscover_config.php @@ -5,11 +5,12 @@ * Descr : Autodiscover configuration file ************************************************/ +define('TIMEZONE', ''); + // Defines the base path on the server define('BASE_PATH', dirname($_SERVER['SCRIPT_FILENAME']). '/'); -// The Z-Push server location for the autodiscover response -define('SERVERURL', 'https://PRIMARY_HOSTNAME/Microsoft-Server-ActiveSync'); +define('ZPUSH_HOST', 'PRIMARY_HOSTNAME'); define('USE_FULLEMAIL_FOR_LOGIN', true); @@ -18,6 +19,7 @@ define('LOGFILE', LOGFILEDIR . 'autodiscover.log'); define('LOGERRORFILE', LOGFILEDIR . 'autodiscover-error.log'); define('LOGLEVEL', LOGLEVEL_INFO); define('LOGUSERLEVEL', LOGLEVEL); +$specialLogUsers = array(); // the backend data provider define('BACKEND_PROVIDER', 'BackendCombined'); diff --git a/conf/zpush/backend_imap.php b/conf/zpush/backend_imap.php index b186762..a0c1233 100644 --- a/conf/zpush/backend_imap.php +++ b/conf/zpush/backend_imap.php @@ -23,6 +23,9 @@ define('IMAP_FOLDER_TRASH', 'TRASH'); define('IMAP_FOLDER_SPAM', 'SPAM'); define('IMAP_FOLDER_ARCHIVE', 'ARCHIVE'); +define('IMAP_INLINE_FORWARD', true); +define('IMAP_EXCLUDED_FOLDERS', ''); + define('IMAP_FROM_SQL_DSN', 'sqlite:STORAGE_ROOT/mail/roundcube/roundcube.sqlite'); define('IMAP_FROM_SQL_USER', ''); define('IMAP_FROM_SQL_PASSWORD', ''); @@ -49,5 +52,6 @@ global $imap_smtp_params; $imap_smtp_params = array('host' => 'ssl://127.0.0.1', 'port' => 587, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password'); define('MAIL_MIMEPART_CRLF', "\r\n"); +define('IMAP_MEETING_USE_CALDAV', true); ?> diff --git a/setup/zpush.sh b/setup/zpush.sh index 5cc12c5..cbe2f7b 100755 --- a/setup/zpush.sh +++ b/setup/zpush.sh @@ -22,7 +22,8 @@ apt_install \ php5enmod imap # Copy Z-Push into place. -TARGETHASH=80cbe53de4ab8dd598d1f2af6f0a23fa396c529a +TARGETHASH=3ce78c23e02198bffe80c983ce247350c27590bd +VERSION=2.3.5 needs_update=0 #NODOC if [ ! -f /usr/local/lib/z-push/version ]; then needs_update=1 #NODOC @@ -31,7 +32,13 @@ elif [[ $TARGETHASH != `cat /usr/local/lib/z-push/version` ]]; then needs_update=1 #NODOC fi if [ $needs_update == 1 ]; then - git_clone https://github.com/fmbiete/Z-Push-contrib $TARGETHASH '' /usr/local/lib/z-push + wget_verify http://download.z-push.org/final/2.3/z-push-$VERSION.tar.gz $TARGETHASH /tmp/z-push.tar.gz + + rm -rf /usr/local/lib/z-push + tar -xzf /tmp/z-push.tar.gz -C /usr/local/lib/ + rm /tmp/z-push.tar.gz + mv /usr/local/lib/z-push-$VERSION /usr/local/lib/z-push + rm -f /usr/sbin/z-push-{admin,top} 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 @@ -67,6 +74,7 @@ cp conf/zpush/backend_caldav.php /usr/local/lib/z-push/backend/caldav/config.php rm -f /usr/local/lib/z-push/autodiscover/config.php cp conf/zpush/autodiscover_config.php /usr/local/lib/z-push/autodiscover/config.php sed -i "s/PRIMARY_HOSTNAME/$PRIMARY_HOSTNAME/" /usr/local/lib/z-push/autodiscover/config.php +sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" /usr/local/lib/z-push/autodiscover/config.php # Some directories it will use. @@ -93,3 +101,7 @@ EOF # Restart service. restart_service php5-fpm + +# Fix states after upgrade + +hide_output z-push-admin -a fixstates