Autodiscover HTTP Service Protocol handler
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.
Host and optionally port to pass to php-mysqli. Default: localhost.
User for the SQL connection. Default: root.
Password for the same. Default: (empty string).
Database name. Default: email.
The hostname of the Autodiscover server. This is used by the Autodiscovery handler to issue HTTP->HTTPS upgrades. Default: (system hostname).
- 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.
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.
/var/lib/gromox/user/ = (system hostname) /var/lib/gromox/domain/ = (system hostname)
MS-OXDISCO: Autodiscover HTTP Service Protocol
MS-OXDSCLI: Autodiscover Publishing and Lookup Protocol