autodiscover

Name

Autodiscover HTTP Service Protocol handler

Description

Autodiscover clients can locate the Autodiscover server for a given domain example.com by attempting to resolve the _autodiscover._tcp.example.com IN SRV record from DNS, and otherwise fall back to autodiscover.example.com.

To force using a particular Autodiscover server, such as when Gromox is run in a development environment with a fake domain, c:windowssystem32driversetchosts can be populated with a static entry for autodiscover.example.com to get that particular scenario working.

An Autodiscover client would make a “POST /Autodiscover/Autodiscover.xml” request to the autodiscover server that was determined moments ago. The mailbox credentials are presented using HTTP authentication.

In a Gromox minimal setup, http(8gx) will receive this POST request and, in conjunction with the built-in defaults of mod_rewrite(4gx) and mod_fastcgi(4gx), is forwarded to a php-fpm instance, since the Autodiscover handler is coded in PHP. Alternative setups where, for example, an nginx frontend is used, nginx can also be the server that passes the request to a PHP executor.

The Autodiscover response contains a HTTP server (generally the HTTP home server) and the designated choice for protocol framing. A client uses this to set up the EMSMDB MAPI service within a MAPI profile. Because the HTTP home server is then known, Autodiscover is not used again when making a connection to the message store service. However, the Address Book always issues Autodiscover requests. (In other words, removing the DNS entry for the Autodiscover server after a profile is set up would break the address book, but not the message store.)

Configuration file directives

The configuration file is /etc/gromox/autodiscover.ini. In its absence, built-in defaults, tuned for the minimal Gromox installation, are used. A few ini sections and keys are recognized.

[database]

host

Host and optionally port to pass to php-mysqli. Default: localhost.

username

User for the SQL connection. Default: root.

password

Password for the same. Default: (empty string).

dbname

Database name. Default: email.

[exchange]

hostname

The hostname of the Autodiscover server. This is used by the Autodiscovery handler to issue HTTP->HTTPS upgrades. Default: (system hostname).

mapihttp
This setting controls which server types the Autodiscover handler should respond with. The two options are MAPI-in-DCERPC-in-HTTP (a.k.a. RPCH, RPC/HTTP, Outlook Anywhere) and simply MAPI-in-HTTP (a.k.a. MOH, MAPI-over-HTTP). MOH is supported from Outlook >= 2013 SP1 onwards. 0 selects RPC/HTTP, 1 selects MAPI/HTTP.
Default: 0.

[default]

timezone

Default: (unspecified)

[system]

[http-proxy]

This section contains the emsmdb multiserver map. This conveys the HTTP home server for users. If a HTTP home server is not also the exmdb/sqlite home server for a user, said HTTP server will proxy the datastream to the right exmdb home server, which may result in lower performance than when connecting to the right server from the start.

Keys in this ini section are homedir prefixes, and values are the corresponding HTTP server, quite similar to exmdb_list.txt.

Default:

/var/lib/gromox/user/ = (system hostname)
/var/lib/gromox/domain/ = (system hostname)

Normative references

  • MS-OXDISCO: Autodiscover HTTP Service Protocol

  • MS-OXDSCLI: Autodiscover Publishing and Lookup Protocol

See also

gromox(7)