Mailclient autoconfiguration: Difference between revisions

From Open-Xchange
No edit summary
No edit summary
Line 1: Line 1:
= Providing autoconfiguration for mail clients =
= Providing autoconfiguration for mail clients =


This article explains a solution for autoconfiguration for a set of mail clients which can be configured against a mail system automatically by just entering email address and password. There are three widely used approaches based on Microsoft's autodiscover, [https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration Mozilla's autoconfig], and iOS/MacOS provisioning which are relevant to support detecting IMAP and SMTP for client configuration.
This article explains a solution for autoconfiguration for a set of mail clients which can be configured against a mail system automatically by just entering email address and password. There are three widely used approaches based on Microsoft's autodiscover, [https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration Mozilla's autoconfig], and iOS/MacOS provisioning which are relevant to support detecting IMAP and SMTP server details for client configuration.


Since [[AppSuite:EM_Client_for_OX_App_Suite|eMClient for OX App Suite]] is using the Microsoft based solution this service is especially important to have a smooth user experience for customer environments offering it to their users.
Since [[AppSuite:EM_Client_for_OX_App_Suite|eMClient for OX App Suite]] is using the Microsoft based solution this service is especially important to have a smooth user experience for customer environments offering it to their users.


autodiscover and autoconfig are based on XML schemas. Therefore for very simple deployments it might even be enough to serve some static XML files for both usecases. Please see the respective vendor standard documentation for more details.
autodiscover and autoconfig are based on XML schemas. Therefore for very simple deployments it might even be enough to serve some static XML files for both usecases. Please see the respective vendor standard documentation for more details.
In this article we show how to deploy a simple autoconfiguration service based on the open source project [https://automx.org/en/ automx].
== Preparations ==
The autoconfiguration protocols use several ways to find the XML provided later by automx. In the following section there is listed in which order the protocols are looking for the XML. Depending where you would like to serve the XML files you can choose from those options.
=== autoconfig ===
# http://autoconfig.example.com/mail/config-v1.1.xml
# http://example.com/.well-known/autoconfig/mail/config-v1.1.xml
=== autodiscover ===
# https://example.org/autodiscover/autodiscover.xml
# https://autodiscover.example.org/autodiscover/autodiscover.xml
# DNS SRV lookup for autodiscover.tcp.example.org
==== DNS ====
A DNS SRV entry would look like this:
  _autodiscover._tcp                      IN      SRV 0 0 443 $HOSTNAME.example.org.
== automx ==
=== Installation ===
If you would like to support eMClient for OX App Suite please make sure that you are using a version after 1.1.1 or an earlier patched version which supports the DAV and OX services.
For manual installation please refer to the [https://automx.org/en/#download automx download instructions].
RPM packages for SUSE and RHEL flavours are provided by the [https://software.opensuse.org/package/automx Open Build Service]. Those packages are currently version 0.10.2 with the above patches applied and are working with Python 2.
=== Configuration ===
==== automx ====
/etc/automx.conf
<nowiki>
[automx]
provider = example.org
domains = example.org, example.com
debug = no
logfile = /var/log/automx/automx.log
# Protect against DoS
memcache = 127.0.0.1:11211
memcache_ttl = 600
client_error_limit = 20
rate_limit_exception_networks = 127.0.0.0/8, ::1/128
# The DEFAULT section is always merged into each other section. Each section
# can overwrite settings done here.
[DEFAULT]
account_type = email
account_name = example Mail
account_name_short = example Mail
# If a domain is listed in the automx section, it may have its own section. If
# none is found here, the global section is used.
[global]
backend = static
action = settings
# EAS (mobilesync)
server_url = https://ox.an-netz.de
server_name = an-netz
# If you want to sign mobileconfig profiles, enable these options. Make sure
# that your webserver has proper privileges to read the key. The cert file
# must contain the server certificate and all intermediate certificates. You
# can simply concatenate these certificates.
#sign_mobileconfig = yes
#sign_cert = /path/to/cert
#sign_key = /path/to/key
smtp = yes
smtp_server = mail.an-netz.de
smtp_port = 587
smtp_encryption = starttls
smtp_auth = plaintext
smtp_auth_identity = %s
smtp_refresh_ttl = 6
smtp_default = yes
imap = yes
imap_server = mail.an-netz.de
imap_port = 993
imap_encryption = ssl
imap_auth = plaintext
imap_auth_identity = %s
imap_refresh_ttl = 6
pop = yes
pop_server = mail.an-netz.de
pop_port = 995
pop_encryption = ssl
pop_auth = plaintext
pop_auth_identity = %s
pop_refresh_ttl = 6
carddav = yes
carddav_server = https://dav.an-netz.de/
carddav_auth_identity = %s
caldav = yes
caldav_server = https://dav.an-netz.de/
caldav_auth_identity = %s
ox = yes
ox_server = https://ox.an-netz.de/
ox_auth_identity = %s
follow = imap_starttls
[imap_starttls]
backend = static_append
imap = yes
imap_server = mail.an-netz.de
imap_port = 143
imap_encryption = starttls
imap_auth = plaintext
imap_auth_identity = %s
imap_refresh_ttl = 6
</nowiki>
==== Apache ====
== Related links ==
[[Caldav_carddav_Bundles#Autodiscovery|DAV autodiscovery]]


[[Category: Clients]]
[[Category: Clients]]
[[Category: Administrator]]
[[Category: Administrator]]

Revision as of 12:36, 16 April 2017

Providing autoconfiguration for mail clients

This article explains a solution for autoconfiguration for a set of mail clients which can be configured against a mail system automatically by just entering email address and password. There are three widely used approaches based on Microsoft's autodiscover, Mozilla's autoconfig, and iOS/MacOS provisioning which are relevant to support detecting IMAP and SMTP server details for client configuration.

Since eMClient for OX App Suite is using the Microsoft based solution this service is especially important to have a smooth user experience for customer environments offering it to their users.

autodiscover and autoconfig are based on XML schemas. Therefore for very simple deployments it might even be enough to serve some static XML files for both usecases. Please see the respective vendor standard documentation for more details.

In this article we show how to deploy a simple autoconfiguration service based on the open source project automx.

Preparations

The autoconfiguration protocols use several ways to find the XML provided later by automx. In the following section there is listed in which order the protocols are looking for the XML. Depending where you would like to serve the XML files you can choose from those options.

autoconfig

  1. http://autoconfig.example.com/mail/config-v1.1.xml
  2. http://example.com/.well-known/autoconfig/mail/config-v1.1.xml


autodiscover

  1. https://example.org/autodiscover/autodiscover.xml
  2. https://autodiscover.example.org/autodiscover/autodiscover.xml
  3. DNS SRV lookup for autodiscover.tcp.example.org


DNS

A DNS SRV entry would look like this:

 _autodiscover._tcp                      IN      SRV 0 0 443 $HOSTNAME.example.org.


automx

Installation

If you would like to support eMClient for OX App Suite please make sure that you are using a version after 1.1.1 or an earlier patched version which supports the DAV and OX services.

For manual installation please refer to the automx download instructions.

RPM packages for SUSE and RHEL flavours are provided by the Open Build Service. Those packages are currently version 0.10.2 with the above patches applied and are working with Python 2.


Configuration

automx

/etc/automx.conf

[automx]
provider = example.org
domains = example.org, example.com
debug = no
logfile = /var/log/automx/automx.log

# Protect against DoS
memcache = 127.0.0.1:11211
memcache_ttl = 600
client_error_limit = 20
rate_limit_exception_networks = 127.0.0.0/8, ::1/128

# The DEFAULT section is always merged into each other section. Each section
# can overwrite settings done here.
[DEFAULT]
account_type = email
account_name = example Mail
account_name_short = example Mail


# If a domain is listed in the automx section, it may have its own section. If
# none is found here, the global section is used.
[global]
backend = static
action = settings

# EAS (mobilesync)
server_url = https://ox.an-netz.de
server_name = an-netz

# If you want to sign mobileconfig profiles, enable these options. Make sure
# that your webserver has proper privileges to read the key. The cert file
# must contain the server certificate and all intermediate certificates. You
# can simply concatenate these certificates.
#sign_mobileconfig = yes
#sign_cert = /path/to/cert
#sign_key = /path/to/key

smtp = yes
smtp_server = mail.an-netz.de
smtp_port = 587
smtp_encryption = starttls
smtp_auth = plaintext
smtp_auth_identity = %s
smtp_refresh_ttl = 6
smtp_default = yes

imap = yes
imap_server = mail.an-netz.de
imap_port = 993
imap_encryption = ssl
imap_auth = plaintext
imap_auth_identity = %s
imap_refresh_ttl = 6
pop = yes
pop_server = mail.an-netz.de
pop_port = 995
pop_encryption = ssl
pop_auth = plaintext
pop_auth_identity = %s
pop_refresh_ttl = 6

carddav = yes
carddav_server = https://dav.an-netz.de/
carddav_auth_identity = %s

caldav = yes
caldav_server = https://dav.an-netz.de/
caldav_auth_identity = %s

ox = yes
ox_server = https://ox.an-netz.de/
ox_auth_identity = %s

follow = imap_starttls

[imap_starttls]
backend = static_append

imap = yes
imap_server = mail.an-netz.de
imap_port = 143
imap_encryption = starttls
imap_auth = plaintext
imap_auth_identity = %s
imap_refresh_ttl = 6

Apache

Related links

DAV autodiscovery