2020-02-07 09:25:58 +01:00
**You do not need to change or create this file, autodiscover works out of the box**. This guide is only meant for customizations to the autodiscover or autoconfig process.
Newer Outlook clients (especially those delivered with O365) will not autodiscover mail profiles.
Keep in mind, that **ActiveSync should NOT be used with a desktop client** .
2017-09-10 23:54:46 +02:00
Open/create `data/web/inc/vars.local.inc.php` and add your changes to the configuration array.
2017-07-02 10:56:50 +02:00
2017-09-10 23:54:46 +02:00
Changes will be merged with "$autodiscover_config" in `data/web/inc/vars.inc.php` ):
2017-05-06 00:22:26 +02:00
2017-06-28 18:56:01 +02:00
```
2017-09-13 09:33:45 +02:00
< ?php
2017-06-28 18:56:01 +02:00
$autodiscover_config = array(
// General autodiscover service type: "activesync" or "imap"
2018-12-03 15:07:37 +01:00
// emClient uses autodiscover, but does not support ActiveSync. mailcow excludes emClient from ActiveSync.
2017-06-28 18:56:01 +02:00
'autodiscoverType' => 'activesync',
2018-12-03 15:07:37 +01:00
// If autodiscoverType => activesync, also use ActiveSync (EAS) for Outlook desktop clients (>= Outlook 2013 on Windows)
// Outlook for Mac does not support ActiveSync
'useEASforOutlook' => 'yes',
// Please don't use STARTTLS-enabled service ports in the "port" variable.
2017-07-02 10:56:50 +02:00
// The autodiscover service will always point to SMTPS and IMAPS (TLS-wrapped services).
2018-12-03 15:07:37 +01:00
// The autoconfig service will additionally announce the STARTTLS-enabled ports, specified in the "tlsport" variable.
2017-06-28 18:56:01 +02:00
'imap' => array(
'server' => $mailcow_hostname,
2018-12-03 15:07:37 +01:00
'port' => array_pop(explode(':', getenv('IMAPS_PORT'))),
'tlsport' => array_pop(explode(':', getenv('IMAP_PORT'))),
),
'pop3' => array(
'server' => $mailcow_hostname,
'port' => array_pop(explode(':', getenv('POPS_PORT'))),
'tlsport' => array_pop(explode(':', getenv('POP_PORT'))),
2017-06-28 18:56:01 +02:00
),
'smtp' => array(
'server' => $mailcow_hostname,
2018-12-03 15:07:37 +01:00
'port' => array_pop(explode(':', getenv('SMTPS_PORT'))),
'tlsport' => array_pop(explode(':', getenv('SUBMISSION_PORT'))),
2017-06-28 18:56:01 +02:00
),
'activesync' => array(
2018-12-03 15:07:37 +01:00
'url' => 'https://'.$mailcow_hostname.($https_port == 443 ? '' : ':'.$https_port).'/Microsoft-Server-ActiveSync',
2017-07-02 10:56:50 +02:00
),
'caldav' => array(
2018-12-03 15:07:37 +01:00
'server' => $mailcow_hostname,
'port' => $https_port,
2017-10-26 09:12:26 +02:00
),
2017-07-02 10:56:50 +02:00
'carddav' => array(
2018-12-03 15:07:37 +01:00
'server' => $mailcow_hostname,
'port' => $https_port,
),
2017-06-28 18:56:01 +02:00
);
```
2017-05-06 00:22:26 +02:00
To always use IMAP and SMTP instead of EAS, set `'autodiscoverType' => 'imap'` .
2017-06-28 18:56:01 +02:00
2017-09-10 23:54:46 +02:00
Disable ActiveSync for Outlook desktop clients by setting "useEASforOutlook" to "no".