Update autoconfig.php
parent
53d44ed18d
commit
b295bedf53
|
@ -1,5 +1,12 @@
|
|||
<?php
|
||||
require_once 'inc/vars.inc.php';
|
||||
$default_autodiscover_config = $autodiscover_config;
|
||||
if(file_exists('inc/vars.local.inc.php')) {
|
||||
include_once 'inc/vars.local.inc.php';
|
||||
}
|
||||
$configuration = array_merge($default_autodiscover_config, $autodiscover_config);
|
||||
|
||||
error_reporting(0);
|
||||
|
||||
if (empty($mailcow_hostname)) {
|
||||
exit();
|
||||
|
@ -25,15 +32,15 @@ header('Content-Type: application/xml');
|
|||
<displayShortName>mail server</displayShortName>
|
||||
|
||||
<incomingServer type="imap">
|
||||
<hostname><?= $autodiscover_config['imap']['server']; ?></hostname>
|
||||
<port><?= $autodiscover_config['imap']['port']; ?></port>
|
||||
<hostname><?= $configuration['imap']['server']; ?></hostname>
|
||||
<port><?= $configuration['imap']['port']; ?></port>
|
||||
<socketType>SSL</socketType>
|
||||
<username>%EMAILADDRESS%</username>
|
||||
<authentication>password-cleartext</authentication>
|
||||
</incomingServer>
|
||||
<incomingServer type="imap">
|
||||
<hostname><?= $autodiscover_config['imap']['server']; ?></hostname>
|
||||
<port><?= $autodiscover_config['imap']['tlsport']; ?></port>
|
||||
<hostname><?= $configuration['imap']['server']; ?></hostname>
|
||||
<port><?= $configuration['imap']['tlsport']; ?></port>
|
||||
<socketType>STARTTLS</socketType>
|
||||
<username>%EMAILADDRESS%</username>
|
||||
<authentication>password-cleartext</authentication>
|
||||
|
@ -43,8 +50,8 @@ header('Content-Type: application/xml');
|
|||
$records = dns_get_record('_pop3s._tcp.' . $domain, DNS_SRV); // check if POP3 is announced as "not provided" via SRV record
|
||||
if (count($records) == 0 || $records[0]['target'] != '') { ?>
|
||||
<incomingServer type="pop3">
|
||||
<hostname><?= $autodiscover_config['pop3']['server']; ?></hostname>
|
||||
<port><?= $autodiscover_config['pop3']['port']; ?></port>
|
||||
<hostname><?= $configuration['pop3']['server']; ?></hostname>
|
||||
<port><?= $configuration['pop3']['port']; ?></port>
|
||||
<socketType>SSL</socketType>
|
||||
<username>%EMAILADDRESS%</username>
|
||||
<authentication>password-cleartext</authentication>
|
||||
|
@ -54,8 +61,8 @@ if (count($records) == 0 || $records[0]['target'] != '') { ?>
|
|||
$records = dns_get_record('_pop3._tcp.' . $domain, DNS_SRV); // check if POP3 is announced as "not provided" via SRV record
|
||||
if (count($records) == 0 || $records[0]['target'] != '') { ?>
|
||||
<incomingServer type="pop3">
|
||||
<hostname><?= $autodiscover_config['pop3']['server']; ?></hostname>
|
||||
<port><?= $autodiscover_config['pop3']['tlsport']; ?></port>
|
||||
<hostname><?= $configuration['pop3']['server']; ?></hostname>
|
||||
<port><?= $configuration['pop3']['tlsport']; ?></port>
|
||||
<socketType>STARTTLS</socketType>
|
||||
<username>%EMAILADDRESS%</username>
|
||||
<authentication>password-cleartext</authentication>
|
||||
|
@ -63,15 +70,15 @@ if (count($records) == 0 || $records[0]['target'] != '') { ?>
|
|||
<?php } ?>
|
||||
|
||||
<outgoingServer type="smtp">
|
||||
<hostname><?= $autodiscover_config['smtp']['server']; ?></hostname>
|
||||
<port><?= $autodiscover_config['smtp']['port']; ?></port>
|
||||
<hostname><?= $configuration['smtp']['server']; ?></hostname>
|
||||
<port><?= $configuration['smtp']['port']; ?></port>
|
||||
<socketType>SSL</socketType>
|
||||
<username>%EMAILADDRESS%</username>
|
||||
<authentication>password-cleartext</authentication>
|
||||
</outgoingServer>
|
||||
<outgoingServer type="smtp">
|
||||
<hostname><?= $autodiscover_config['smtp']['server']; ?></hostname>
|
||||
<port><?= $autodiscover_config['smtp']['tlsport']; ?></port>
|
||||
<hostname><?= $configuration['smtp']['server']; ?></hostname>
|
||||
<port><?= $configuration['smtp']['tlsport']; ?></port>
|
||||
<socketType>STARTTLS</socketType>
|
||||
<username>%EMAILADDRESS%</username>
|
||||
<authentication>password-cleartext</authentication>
|
||||
|
|
Loading…
Reference in New Issue