From 646957efee565952739780c91184d08562bdfc57 Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Sun, 18 Jun 2017 10:08:19 +0200 Subject: [PATCH] Autodiscovery for eM Client It can be identified by its lack of user agent header. Through additional Protocol tags, it can also have CalDAV and CardDAV configured. --- data/web/autodiscover.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/data/web/autodiscover.php b/data/web/autodiscover.php index 3f2fd1b4..c0a06e87 100644 --- a/data/web/autodiscover.php +++ b/data/web/autodiscover.php @@ -33,6 +33,10 @@ if ($config['useEASforOutlook'] == 'no') { } } +if (!isset($_SERVER['HTTP_USER_AGENT']) || empty($_SERVER['HTTP_USER_AGENT'])) { // eM Client sends no user agent + $config['autodiscoverType'] = 'imap'; +} + $dsn = "$database_type:host=$database_host;dbname=$database_name"; $opt = [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, @@ -94,6 +98,18 @@ if (!isset($_SERVER['PHP_AUTH_USER']) OR $as !== "user") { on off + + CalDAV + https:///SOGo/dav//Calendar + off + + + + CardDAV + https:///SOGo/dav//Contacts + off + +