From de72ef065ae887f804525363908a7ae03ea753df Mon Sep 17 00:00:00 2001 From: heavygale Date: Sat, 26 Jan 2019 22:31:28 +0100 Subject: [PATCH] Forward mailcow-ui-domain to the docs We need a additional variable for the mailcow-ui-domain, if the domain used for the mailcow ui differs from the hostname. Otherwise our users will get the login promt, when they try to access the mobileconfig file. --- data/web/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/web/user.php b/data/web/user.php index 5bd9ee9d..9673b2e0 100644 --- a/data/web/user.php +++ b/data/web/user.php @@ -76,7 +76,7 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == ' $username = $_SESSION['mailcow_cc_username']; $mailboxdata = mailbox('get', 'mailbox_details', $username); - $clientconfigstr = "host=" . urlencode($mailcow_hostname) . "&email=" . urlencode($username) . "&name=" . urlencode($mailboxdata['name']) . "&port=" . urlencode($autodiscover_config['caldav']['port']); + $clientconfigstr = "host=" . urlencode($mailcow_hostname) . "&email=" . urlencode($username) . "&name=" . urlencode($mailboxdata['name']) . "&ui=" . urlencode($_SERVER['HTTP_HOST']) . "&port=" . urlencode($autodiscover_config['caldav']['port']); if ($autodiscover_config['useEASforOutlook'] == 'yes') $clientconfigstr .= "&outlookEAS=1"; if (file_exists('thunderbird-plugins/version.csv')) {