From a0df18506b902ff295114183e4815fe74295ce55 Mon Sep 17 00:00:00 2001 From: jkaberg Date: Tue, 19 Aug 2014 13:03:44 +0200 Subject: [PATCH] use z-push autodisover instead --- conf/nginx.conf | 2 +- conf/zpush/autodiscover_config.php | 29 ++++++++++ setup/zpush.sh | 4 ++ tools/exchange-autodiscover.php | 91 ------------------------------ 4 files changed, 34 insertions(+), 92 deletions(-) create mode 100644 conf/zpush/autodiscover_config.php delete mode 100755 tools/exchange-autodiscover.php diff --git a/conf/nginx.conf b/conf/nginx.conf index 49fe8655..af28173b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -61,7 +61,7 @@ server { # Microsoft Exchange autodiscover.xml for email location /autodiscover/autodiscover.xml { include fastcgi_params; - fastcgi_param SCRIPT_FILENAME /usr/local/bin/mailinabox-exchange-autodiscover.php; + fastcgi_param SCRIPT_FILENAME /usr/local/lib/z-push/autodiscover/autodiscover.php; fastcgi_param PHP_VALUE "short_open_tag=Off"; fastcgi_pass php-fpm; } diff --git a/conf/zpush/autodiscover_config.php b/conf/zpush/autodiscover_config.php new file mode 100644 index 00000000..28a93d45 --- /dev/null +++ b/conf/zpush/autodiscover_config.php @@ -0,0 +1,29 @@ + \ No newline at end of file diff --git a/setup/zpush.sh b/setup/zpush.sh index 74962290..22e57e92 100755 --- a/setup/zpush.sh +++ b/setup/zpush.sh @@ -60,6 +60,10 @@ cp conf/zpush/backend_carddav.php /usr/local/lib/z-push/backend/carddav/config.p rm -f /usr/local/lib/z-push/backend/caldav/config.php cp conf/zpush/backend_caldav.php /usr/local/lib/z-push/backend/caldav/config.php +# Configure Autodiscover +rm -f /usr/local/lib/z-push/autodiscover/config.php +cp conf/zpush/autodiscover_config.php /usr/local/lib/z-push/autodiscover/config.php + # Some directories it will use. mkdir -p /var/log/z-push diff --git a/tools/exchange-autodiscover.php b/tools/exchange-autodiscover.php deleted file mode 100755 index 07803762..00000000 --- a/tools/exchange-autodiscover.php +++ /dev/null @@ -1,91 +0,0 @@ -(.*?)<\/AcceptableResponseSchema>/', $post_body, $match); - $AcceptableResponseSchema = $match[1]; - - if ($AcceptableResponseSchema == "http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006") { - // There is no way to convey the user's login name with this? - ?> - - - - - - - MobileSync - https:// - https:// - - - - - -(.*?)<\/EMailAddress>/', $post_body, $match); - $LOGIN = $match[1]; - - header("Content-type: text/xml"); -?> - - - - https:// - - email - settings - - - IMAP - - 993 - on - - - - - SMTP - - 587 - on - - - - - DAV - https:// - on - on - - - - - WEB - https:///mail - on - - - - - - -