From 18386125b642e3d6f88159b9f24c7b4e026f23a6 Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Sun, 25 Jun 2017 14:19:44 +0200 Subject: [PATCH] Fix EAS autodiscover for certain Outlook variants --- data/web/autodiscover.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/web/autodiscover.php b/data/web/autodiscover.php index 819dc7ee..3baab049 100644 --- a/data/web/autodiscover.php +++ b/data/web/autodiscover.php @@ -33,9 +33,8 @@ $data = trim(file_get_contents("php://input")); if (strpos($data, 'autodiscover/outlook/responseschema')) { // desktop client $config['autodiscoverType'] = 'imap'; if ($config['useEASforOutlook'] == 'yes' && - strpos($_SERVER['HTTP_USER_AGENT'], 'Outlook') !== FALSE && // Outlook strpos($_SERVER['HTTP_USER_AGENT'], 'Windows NT') !== FALSE && // Windows - preg_match('/Outlook (1[5-9]\.|[2-9]|1[0-9][0-9])/', $_SERVER['HTTP_USER_AGENT']) && // Outlook 2013 (version 15) or higher + preg_match('/(Outlook|Office) (1[5-9]\.|[2-9]|1[0-9][0-9])/', $_SERVER['HTTP_USER_AGENT']) && // Outlook 2013 (version 15) or higher strpos($_SERVER['HTTP_USER_AGENT'], 'MS Connectivity Analyzer') === FALSE // https://testconnectivity.microsoft.com doesn't support EAS for Outlook ) { $config['autodiscoverType'] = 'activesync';