diff --git a/docs/README b/docs/README --- a/docs/README +++ b/docs/README @@ -23,12 +23,12 @@ 1. Apache # for https://domain.tld (and https://autodiscover.domain.tld) -Alias /autodiscover/autodiscover.xml /usr/share/kolab-autodiscover/public_html -Alias /Autodiscover/Autodiscover.xml /usr/share/kolab-autodiscover/public_html -Alias /AutoDiscover/AutoDiscover.xml /usr/share/kolab-autodiscover/public_html +Alias /autodiscover/autodiscover.xml /usr/share/kolab-autoconf/public_html/index.php +Alias /Autodiscover/Autodiscover.xml /usr/share/kolab-autoconf/public_html/index.php +Alias /AutoDiscover/AutoDiscover.xml /usr/share/kolab-autoconf/public_html/index.php # for http://autoconfig.domain.tld -Alias /mail/config-v1.1.xml /usr/share/kolab-autodiscover/public_html -# for http://domain.tld -Alias /.well-known/autoconfig/mail/config-v1.1.xml /usr/share/kolab-autodiscover/public_html +Alias /mail/config-v1.1.xml /usr/share/kolab-autoconf/public_html/index.php +# for http://domain.tld/index.php +Alias /.well-known/autoconfig/mail/config-v1.1.xml /usr/share/kolab-autoconf/public_html/index.php 2. Add [autodiscover] section in /etc/kolab/kolab.conf (see sample kolab.conf.sample) diff --git a/docs/kolab-autoconf.conf b/docs/kolab-autoconf.conf --- a/docs/kolab-autoconf.conf +++ b/docs/kolab-autoconf.conf @@ -1,11 +1,11 @@ # for https://domain.tld (and https://autodiscover.domain.tld) -Alias /autodiscover/autodiscover.xml /usr/share/kolab-autoconf/public_html -Alias /Autodiscover/Autodiscover.xml /usr/share/kolab-autoconf/public_html -Alias /AutoDiscover/AutoDiscover.xml /usr/share/kolab-autoconf/public_html +Alias /autodiscover/autodiscover.xml /usr/share/kolab-autoconf/public_html/index.php +Alias /Autodiscover/Autodiscover.xml /usr/share/kolab-autoconf/public_html/index.php +Alias /AutoDiscover/AutoDiscover.xml /usr/share/kolab-autoconf/public_html/index.php # for http://autoconfig.domain.tld -Alias /mail/config-v1.1.xml /usr/share/kolab-autoconf/public_html +Alias /mail/config-v1.1.xml /usr/share/kolab-autoconf/public_html/index.php # for http://domain.tld -Alias /.well-known/autoconfig/mail/config-v1.1.xml /usr/share/kolab-autoconf/public_html +Alias /.well-known/autoconfig/mail/config-v1.1.xml /usr/share/kolab-autoconf/public_html/index.php AllowOverride None diff --git a/lib/AutodiscoverMicrosoft.php b/lib/AutodiscoverMicrosoft.php --- a/lib/AutodiscoverMicrosoft.php +++ b/lib/AutodiscoverMicrosoft.php @@ -110,10 +110,10 @@ $xml = new DOMDocument('1.0', Autodiscover::CHARSET); // create main elements (tree) - $doc = $xml->createElementNS(self::MOBILESYNC_NS, 'Autodiscover'); + $doc = $xml->createElementNS(self::NS, 'Autodiscover'); $doc = $xml->appendChild($doc); - $response = $xml->createElement('Response'); + $response = $xml->createElementNS(self::MOBILESYNC_NS, 'Response'); $response = $doc->appendChild($response); $user = $xml->createElement('User'); @@ -129,14 +129,14 @@ $server = $settings->appendChild($server); // configuration -/* + $dispname = $xml->createElement('DisplayName'); $dispname = $user->appendChild($dispname); - $dispname->appendChild($xml->createTextNode($this->config['user'])); -*/ + $dispname->appendChild($xml->createTextNode($this->config['username'])); + $email = $xml->createElement('EMailAddress'); $email = $user->appendChild($email); - $email->appendChild($xml->createTextNode($this->config['email'])); + $email->appendChild($xml->createTextNode($this->config['login'] ?: $this->config['email'])); $element = $xml->createElement('Type'); $element = $server->appendChild($element); @@ -182,11 +182,11 @@ $action->appendChild($xml->createTextNode('settings')); // configuration -/* + $dispname = $xml->createElement('DisplayName'); $dispname = $user->appendChild($dispname); - $dispname->appendChild($xml->createTextNode($this->config['user'])); -*/ + $dispname->appendChild($xml->createTextNode($this->config['username'])); + $email = $xml->createElement('AutoDiscoverSMTPAddress'); $email = $user->appendChild($email); $email->appendChild($xml->createTextNode($this->config['email']));