<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>ActiveSync :: Extend the Autodiscover feature to return also valid answers to MS Outlook queries</title> 
  <pubDate>Sat, 04 Apr 2026 06:01:05 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/11639?Horde=3ebfb45aa6966d9bb625812a395d2546</link> 
  <atom:link rel="self" type="application/rss+xml" title="ActiveSync :: Extend the Autodiscover feature to return also valid answers to MS Outlook queries" href="https://bugs.horde.org/ticket/11639/rss?Horde=3ebfb45aa6966d9bb625812a395d2546" /> 
  <description>ActiveSync :: Extend the Autodiscover feature to return also valid answers to MS Outlook queries</description> 
 
   
   
  <item> 
   <title>The AutoDiscover feature could be enhanced to answer also qu</title> 
   <description>The AutoDiscover feature could be enhanced to answer also queries performed  by Microsoft Outlook Mail clients.

Mail clients like Outlook 2010 and older should auto discover there IMAP/SMTP settings, Outlook 2013 clients could be handled seperately to allow ActiveSync connections once EAS Protocoll 14.1 or above is implemented in Horde.

This Ticket relies an the implementation submitted in Horde Ticket 11637 (http://bugs.horde.org/ticket/11637) to be able to analyze he request schema.

Please edit Horde/ActiveSync/Request/Autodiscover.php and enhance the function &quot;_buildResponseString($properties)&quot; to:


   protected function _buildResponseString($properties)
    {
        if (stripos($properties[&#039;request_schema&#039;], &#039;autodiscover/mobilesync&#039;) !== false) {
            return &#039;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
              &lt;Autodiscover xmlns=&quot;http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006&quot;&gt;
                &lt;Response xmlns=&quot;http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006&quot;&gt;
                  &lt;Culture&gt;&#039; . $properties[&#039;culture&#039;] . &#039;&lt;/Culture&gt;
                  &lt;User&gt;
                    &lt;DisplayName&gt;&#039; . $properties[&#039;display_name&#039;] . &#039;&lt;/DisplayName&gt;
                    &lt;EMailAddress&gt;&#039; . $properties[&#039;email&#039;] . &#039;&lt;/EMailAddress&gt;
                  &lt;/User&gt;
                  &lt;Action&gt;
                    &lt;Settings&gt;
                      &lt;Server&gt;
                        &lt;Type&gt;MobileSync&lt;/Type&gt;
                         &lt;Url&gt;&#039; . $properties[&#039;url&#039;] . &#039;&lt;/Url&gt;
                         &lt;Name&gt;&#039; . $properties[&#039;url&#039;] . &#039;&lt;/Name&gt;
                       &lt;/Server&gt;
                    &lt;/Settings&gt;
                  &lt;/Action&gt;
                &lt;/Response&gt;
              &lt;/Autodiscover&gt;&#039;;
        }
        else if (stripos($properties[&#039;request_schema&#039;], &#039;autodiscover/outlook&#039;) !== false) {
            //// MS Outlook 2013 (Outlook 15) : Output data for ActiveSync
            //if(preg_match(&quot;Microsoft[\.|\s]Outlook[\.|\s]15&quot;, $_SERVER[&#039;HTTP_USER_AGENT&#039;])) {
               // Todo: currently not supported by horde because Outlook 2013 ActiveSync requires EAS Protocol 14.1 or above
           //}
          // Any other MS Outlook version: Output data for IMAP
          if (stripos( $_SERVER[&#039;HTTP_USER_AGENT&#039;], &#039;Outlook&#039;) !== false) {
            return &#039;&lt;Autodiscover xmlns=&quot;http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006&quot;&gt;
              &lt;Response xmlns=&quot;&#039; . $properties[&#039;response_schema&#039;] . &#039;&quot;&gt;
                &lt;User&gt;
                  &lt;DisplayName&gt;&#039; . $properties[&#039;display_name&#039;] . &#039;&lt;/DisplayName&gt;
                &lt;/User&gt;
                &lt;Account&gt;
                  &lt;AccountType&gt;email&lt;/AccountType&gt;
                    &lt;Action&gt;settings&lt;/Action&gt;
                      &lt;Protocol&gt;
                        &lt;Type&gt;IMAP&lt;/Type&gt;
                        &lt;Server&gt;my-horde.tld&lt;/Server&gt;
                        &lt;Port&gt;993&lt;/Port&gt;
                        &lt;LoginName&gt;&#039; . $properties[&#039;email&#039;] . &#039;&lt;/LoginName&gt;
                        &lt;DomainRequired&gt;off&lt;/DomainRequired&gt;
                        &lt;SPA&gt;off&lt;/SPA&gt;
                        &lt;SSL&gt;on&lt;/SSL&gt;
                        &lt;AuthRequired&gt;on&lt;/AuthRequired&gt;
                      &lt;/Protocol&gt;
                      &lt;Protocol&gt;
                        &lt;Type&gt;POP3&lt;/Type&gt;
                        &lt;Server&gt;my-horde.tld&lt;/Server&gt;
                        &lt;Port&gt;110&lt;/Port&gt;
                        &lt;LoginName&gt;&#039; . $properties[&#039;email&#039;] . &#039;&lt;/LoginName&gt;
                        &lt;DomainRequired&gt;off&lt;/DomainRequired&gt;
                        &lt;SPA&gt;off&lt;/SPA&gt;
                        &lt;SSL&gt;on&lt;/SSL&gt;
                        &lt;AuthRequired&gt;on&lt;/AuthRequired&gt;
                      &lt;/Protocol&gt;
                      &lt;Protocol&gt;
                        &lt;Type&gt;SMTP&lt;/Type&gt;
                        &lt;Server&gt;my-horde.tld&lt;/Server&gt;
                        &lt;Port&gt;465&lt;/Port&gt;
                        &lt;LoginName&gt;&#039; . $properties[&#039;email&#039;] . &#039;&lt;/LoginName&gt;
                        &lt;DomainRequired&gt;off&lt;/DomainRequired&gt;
                        &lt;SPA&gt;off&lt;/SPA&gt;
                        &lt;SSL&gt;on&lt;/SSL&gt;
                        &lt;AuthRequired&gt;on&lt;/AuthRequired&gt;
                        &lt;UsePOPAuth&gt;on&lt;/UsePOPAuth&gt;
                      &lt;/Protocol&gt;
                   &lt;/Account&gt;
                &lt;/Response&gt;
             &lt;/Autodiscover&gt;&#039;;
        }
    }
    else    return(_buildFailureResponse($properties[&#039;email&#039;], &quot;Invalid autodiscover schema&quot;)); // Fallback
}

Please  be aware that this example has hardcoded values in the outlook response. It should be configurable in the Administration/ActiveSync prefs.
The following aspects should be configurable:
* Which protocol types should be configured for autodetection (IMAP, POP3, SMTP
* The server for each protocol type
* The Port for each protocol type
* If SSL is active for each protocol type
* If SMTP requires Pop-auth

This example with hardcode values is tested and works with MS Outlook 2010.
The ActiveSync profile for MS Outlook 2013 cannot be testet because Horde needs to implement EAS protocol 14 to allow MS Outlook  2013 to be used as ActiveSync client.

Many Thanks,
Torben Dannhauer

 </description> 
   <pubDate>Sun, 04 Nov 2012 17:20:29 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74359</link> 
  </item> 
   
  <item> 
   <title>*Please* provide standard diffs/patches.</title> 
   <description>*Please* provide standard diffs/patches.</description> 
   <pubDate>Sun, 04 Nov 2012 17:47:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74360</link> 
  </item> 
   
  <item> 
   <title>sorry, each project has other rules, I was not aware of the </title> 
   <description>sorry, each project has other rules, I was not aware of the horde submission protocol.

I will create diffs this evening and attach it as soon as possible.</description> 
   <pubDate>Mon, 05 Nov 2012 11:36:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74381</link> 
  </item> 
   
  <item> 
   <title>&gt; *Please* provide standard diffs/patches.

Here is a diff</title> 
   <description>&gt; *Please* provide standard diffs/patches.

Here is a diff, I hope it is the right format:

Thanks,
Torben

</description> 
   <pubDate>Tue, 06 Nov 2012 00:23:05 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74451</link> 
  </item> 
   
  <item> 
   <title>I discovered today, that Outlook 2013 performs two Autodisco</title> 
   <description>I discovered today, that Outlook 2013 performs two Autodiscover attempts:

The first is regarding IMAP/POP/SMTP, the second for ActiveSync.

In my opinion, Outlook 2013 should ignore the exchange/autodiscover/outlook query and should answer for the exchange/autodiscover/mobilesync query.

this is the query debug output of the two Outlook requests:

[12-Nov-2012 19:05:27] _buildResponseString properties as struct: Array
(
    [display_name] =&gt;
    [email] =&gt; test@osgvisual.org
    [url] =&gt; https://www.dannhauer.de/Microsoft-Server-ActiveSync
    [culture] =&gt; en:en
    [request_schema] =&gt; http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006
    [response_schema] =&gt; http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a
)
[12-Nov-2012 19:05:27] _buildResponseString user_agent: Microsoft Office/15.0 (Windows NT 6.1; Microsoft Outlook 15.0.4128; Pro)


[12-Nov-2012 19:05:28] _buildResponseString properties as struct: Array
(
    [display_name] =&gt;
    [email] =&gt; test@osgvisual.org
    [url] =&gt; https://www.dannhauer.de/Microsoft-Server-ActiveSync
    [culture] =&gt; en:en
    [request_schema] =&gt; http://schemas.microsoft.com/exchange/autodiscover/mobilesync/requestschema/2006
    [response_schema] =&gt; http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006
)
[12-Nov-2012 19:05:28] _buildResponseString user_agent: Microsoft.Outlook.15

</description> 
   <pubDate>Mon, 12 Nov 2012 19:20:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74707</link> 
  </item> 
   
  <item> 
   <title>Will this allow Outlook to be configured for Exchange setup?</title> 
   <description>Will this allow Outlook to be configured for Exchange setup?
Syncing Email, Calendar, Contacts?

Top job though mate, thumbs up from Aus.</description> 
   <pubDate>Wed, 14 Nov 2012 05:07:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74728</link> 
  </item> 
   
  <item> 
   <title>&gt; Will this allow Outlook to be configured for Exchange setu</title> 
   <description>&gt; Will this allow Outlook to be configured for Exchange setup?
&gt; Syncing Email, Calendar, Contacts?
&gt;
&gt; Top job though mate, thumbs up from Aus.

It depends on your outlook version.Outlook 2007 and 2010 support only true exchange (which horde does NOT) and of course IMAP and POP. This modification adds autodiscover for Outlook to use IMAP if available, otherwise POP.

In addition, Outlook 2013 supports native &quot;Exchange ActiveSync&quot; (EAS) connections, it is able to act as an active sync client like a smortphone does. This includes email, contancts, calendars and tasks. 
The autodiscover service of Outlook 2013 is performed in two stages: it queries the existing mobilesync response schema to get an EAS setup. Additionaly it queries the classical exchange schema I proposed in this ticket to autodiscover the SMTP/POP/IMAP setup. 
Native ActiveSync usage of Outlook 2013 works regarding the autodiscover feature, but unfortunately Outlook requieres EAS version 14.x, and horde only provides version 12.1. This is the show stopper for Outtlook 2013+Horde currently.

According to micheal they requiere round about 40 hours to implement EAS version 14.
I&#039;m willing to spend a part of the necessary hours to Horde LLC. Maybe you are one of these to spend the other hours.. :)

By the way: tine2.0 has oldready implemented a update to work with Outlook 2013 ( currently not released, only in their GIT repo), so it should also be possible for Horde

Best wishes,
Torben

</description> 
   <pubDate>Wed, 14 Nov 2012 07:21:25 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74729</link> 
  </item> 
   
  <item> 
   <title>G&#039;day Torben,

Thanks for the update, very helpful.

So </title> 
   <description>G&#039;day Torben,

Thanks for the update, very helpful.

So there is no way currently for Horde with its Activesync Mobile ability to communicate with Outlook 2010 - Funambol doesn&#039;t work in my experience with Windows 8.

I would gladly help, however my expertise are quite limited. I have a background only in network administration. So unfortunately I cannot help. But I would be glad to help out in any other way, for example testing, etc.

Regards,
Steve</description> 
   <pubDate>Wed, 14 Nov 2012 07:36:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74730</link> 
  </item> 
   
  <item> 
   <title>&gt; G&#039;day Torben,
&gt;
&gt; Thanks for the update, very helpful.
</title> 
   <description>&gt; G&#039;day Torben,
&gt;
&gt; Thanks for the update, very helpful.
&gt;
&gt; So there is no way currently for Horde with its Activesync Mobile 
&gt; ability to communicate with Outlook 2010 - Funambol doesn&#039;t work in 
&gt; my experience with Windows 8.
&gt;
&gt; I would gladly help, however my expertise are quite limited. I have a 
&gt; background only in network administration. So unfortunately I cannot 
&gt; help. But I would be glad to help out in any other way, for example 
&gt; testing, etc.
&gt;
&gt; Regards,
&gt; Steve

G&#039;day,

my Funambol experience is quite bad, so I will never use funambol again.

No, with Outlook 2010 there is now way to use Horde&#039;s ActiveSync capabilities. You would need a newer version of Outlook (2013) and Horde EAS implementation (14).

Torben</description> 
   <pubDate>Wed, 14 Nov 2012 07:42:27 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74731</link> 
  </item> 
   
  <item> 
   <title>Figured as much.

Cheers for letting me know. I&#039;ll keep wa</title> 
   <description>Figured as much.

Cheers for letting me know. I&#039;ll keep watching for updates and give feedback.

Regards,
Steve

G&#039;day Torben,
&gt;&gt;
&gt;&gt; Thanks for the update, very helpful.
&gt;&gt;
&gt;&gt; So there is no way currently for Horde with its Activesync Mobile
&gt;&gt; ability to communicate with Outlook 2010 - Funambol doesn&#039;t work in
&gt;&gt; my experience with Windows 8.
&gt;&gt;
&gt;&gt; I would gladly help, however my expertise are quite limited. I have a
&gt;&gt; background only in network administration. So unfortunately I cannot
&gt;&gt; help. But I would be glad to help out in any other way, for example
&gt;&gt; testing, etc.
&gt;&gt;
&gt;&gt; Regards,
&gt;&gt; Steve
&gt;
&gt; G&#039;day,
&gt;
&gt; my Funambol experience is quite bad, so I will never use funambol again.
&gt;
&gt; No, with Outlook 2010 there is now way to use Horde&#039;s ActiveSync 
&gt; capabilities. You would need a newer version of Outlook (2013) and 
&gt; Horde EAS implementation (14).
&gt;
&gt; Torben
</description> 
   <pubDate>Wed, 14 Nov 2012 07:44:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74732</link> 
  </item> 
   
  <item> 
   <title>&gt; I discovered today, that Outlook 2013 performs two Autodis</title> 
   <description>&gt; I discovered today, that Outlook 2013 performs two Autodiscover attempts:
&gt;
&gt; The first is regarding IMAP/POP/SMTP, the second for ActiveSync.
&gt;
&gt; In my opinion, Outlook 2013 should ignore the 
&gt; exchange/autodiscover/outlook query and should answer for the 
&gt; exchange/autodiscover/mobilesync query.

This doesn&#039;t make sense to me unless Horde actually supported EAS for Outlook 2013. Rather, once this is supported we should send a response based on the highest configured EAS version to support. For now, we should do the opposite; ignore the mobilesync request and only respond to the outlook request.
</description> 
   <pubDate>Wed, 14 Nov 2012 15:10:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74740</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; I discovered today, that Outlook 2013 performs two Autodi</title> 
   <description>&gt;&gt; I discovered today, that Outlook 2013 performs two Autodiscover attempts:
&gt;&gt;
&gt;&gt; The first is regarding IMAP/POP/SMTP, the second for ActiveSync.
&gt;&gt;
&gt;&gt; In my opinion, Outlook 2013 should ignore the
&gt;&gt; exchange/autodiscover/outlook query and should answer for the
&gt;&gt; exchange/autodiscover/mobilesync query.
&gt;
&gt; This doesn&#039;t make sense to me unless Horde actually supported EAS for 
&gt; Outlook 2013. Rather, once this is supported we should send a 
&gt; response based on the highest configured EAS version to support. For 
&gt; now, we should do the opposite; ignore the mobilesync request and 
&gt; only respond to the outlook request.
&gt;

I agree, from my own mental roadman regarding AcrtieSync this does make sense, but not for the current implemntation status

Maybe you are right, step by step, first lets add the Outlook autodiscover support, later on the ActiveSync/Outlook support.
</description> 
   <pubDate>Wed, 14 Nov 2012 16:38:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74746</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit df58e64aed4f</title> 
   <description>Changes have been made in Git (master):

commit df58e64aed4f1b600748fe3452d0363a753ba949
Author: Michael J Rubinsky &lt;mrubinsk@horde.org&gt;
Date:   Wed Nov 14 14:49:23 2012 -0500

    Add hooks for modifying autodiscover data and overriding the XML.
    
    Part of Request: 11639

 .../lib/Horde/ActiveSync/Request/Autodiscover.php  |   23 ++++++++++----
 .../Core/lib/Horde/Core/ActiveSync/Driver.php      |   30 +++++++++++++------
 horde/config/hooks.php.dist                        |   31 +++++++++++++++++++-
 3 files changed, 67 insertions(+), 17 deletions(-)

http://git.horde.org/horde-git/-/commit/df58e64aed4f1b600748fe3452d0363a753ba949</description> 
   <pubDate>Wed, 14 Nov 2012 22:16:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74779</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit ba5b5d15d04b</title> 
   <description>Changes have been made in Git (master):

commit ba5b5d15d04bb3d490b5c3c5c3a522879b4ad730
Author: Michael J Rubinsky &lt;mrubinsk@horde.org&gt;
Date:   Wed Nov 14 16:36:03 2012 -0500

    Support sending Autodiscover responses for Outlook configuration.
    
    Part of Request: 11639

 .../lib/Horde/ActiveSync/Request/Autodiscover.php  |  100 ++++++++++++++++----
 1 files changed, 81 insertions(+), 19 deletions(-)

http://git.horde.org/horde-git/-/commit/ba5b5d15d04bb3d490b5c3c5c3a522879b4ad730</description> 
   <pubDate>Wed, 14 Nov 2012 22:16:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74780</link> 
  </item> 
   
  <item> 
   <title>Implemented.

Anyway you can test the current Git code in </title> 
   <description>Implemented.

Anyway you can test the current Git code in your setup?</description> 
   <pubDate>Wed, 14 Nov 2012 22:25:03 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74781</link> 
  </item> 
   
  <item> 
   <title>&gt; Implemented.
&gt;
&gt; Anyway you can test the current Git cod</title> 
   <description>&gt; Implemented.
&gt;
&gt; Anyway you can test the current Git code in your setup?

That was fast!
Of course I will test, but it may take some days, I&#039;m not sure I can squeeze it in  today. I&#039;ll give you feedback till end of week at latest.
Torben</description> 
   <pubDate>Thu, 15 Nov 2012 07:18:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74792</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Implemented.
&gt;&gt;
&gt;&gt; Anyway you can test the current Git </title> 
   <description>&gt;&gt; Implemented.
&gt;&gt;
&gt;&gt; Anyway you can test the current Git code in your setup?
&gt;
&gt; That was fast!
&gt; Of course I will test, but it may take some days, I&#039;m not sure I can 
&gt; squeeze it in  today. I&#039;ll give you feedback till end of week at 
&gt; latest.
&gt; Torben

Two question rise while reading the code:
- What is the intent of Audodiscover.php lines 130:135 ?
- How are the params of the outlook autodiscover set? Only via the hook or also via the actviesync configuration tab ? Just curious...

Torben
</description> 
   <pubDate>Thu, 15 Nov 2012 08:10:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74793</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt;&gt; Implemented.
&gt;&gt;&gt;
&gt;&gt;&gt; Anyway you can test the current G</title> 
   <description>&gt;&gt;&gt; Implemented.
&gt;&gt;&gt;
&gt;&gt;&gt; Anyway you can test the current Git code in your setup?
&gt;&gt;
&gt;&gt; That was fast!
&gt;&gt; Of course I will test, but it may take some days, I&#039;m not sure I can
&gt;&gt; squeeze it in  today. I&#039;ll give you feedback till end of week at
&gt;&gt; latest.
&gt;&gt; Torben
&gt;
&gt; Two question rise while reading the code:
&gt; - What is the intent of Audodiscover.php lines 130:135 ?
&gt; - How are the params of the outlook autodiscover set? Only via the 
&gt; hook or also via the actviesync configuration tab ? Just curious...
&gt;
&gt; Torben
&gt;

Ah, I got it: I have overlooked the conf.xml, now I can configure all teh details in the settings tab.

I have some errors, it is currently not working but I assume it is my fault, so I&#039;ll dive into it tomorrow evening.

Torben</description> 
   <pubDate>Thu, 15 Nov 2012 10:37:12 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74808</link> 
  </item> 
   
  <item> 
   <title>&gt; Implemented.
&gt;
&gt; Anyway you can test the current Git cod</title> 
   <description>&gt; Implemented.
&gt;
&gt; Anyway you can test the current Git code in your setup?

In autodiscover.php in line 66 is an error:

      if (!empty($results[&#039;raw_xml&#039;])) {

should be 

      if (empty($results[&#039;raw_xml&#039;])) {

in my opinion. otherwise it wouldn&#039;t call buildResponse( if raw_xml is empty..

Torben</description> 
   <pubDate>Thu, 15 Nov 2012 11:25:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74810</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt;&gt; Implemented.
&gt;&gt;&gt;
&gt;&gt;&gt; Anyway you can test the current G</title> 
   <description>&gt;&gt;&gt; Implemented.
&gt;&gt;&gt;
&gt;&gt;&gt; Anyway you can test the current Git code in your setup?
&gt;&gt;
&gt;&gt; That was fast!
&gt;&gt; Of course I will test, but it may take some days, I&#039;m not sure I can
&gt;&gt; squeeze it in  today. I&#039;ll give you feedback till end of week at
&gt;&gt; latest.
&gt;&gt; Torben
&gt;
&gt; Two question rise while reading the code:
&gt; - What is the intent of Audodiscover.php lines 130:135 ?
&gt; - How are the params of the outlook autodiscover set? Only via the 
&gt; hook or also via the actviesync configuration tab ? Just curious...
&gt;
&gt; Torben
&gt;

Now I got the reason why it is not working:

around line 130, you test the responseschema to be empty.

This is not correct: for every autodiscover query the accetable response schema is delivered. Thus this variable should always be set, otherwise our parsing of the request is wrong.

Indeed, as I tested with outlook 2010 and also with the Microsoft &quot;Remote Connectivity Analyzer&quot; ( 	Connectivity Tests for Microsoft Office Outlook ), I discovered that with the RCA, the response schema is empty, because the string has different positions in Outlook and in RCA. This was new for me and was not adressed yet.

In my opinion we have to apply two changes to Autodiscover.php to get it working:
1. refactor line 130:135  to avoid &quot;!empty($properties[&#039;response_schema&#039;])&quot; - which should never be emtpy.. As I said, I have no clue about the reason of this if-clause at lines 130:135
2. Make the repsonse schema more robust. It is not sufficient to extract values at certain place, but we have to parse for ACCEPTABLERESPONSESCHEMA to get the right value.

Please find below the request data send by RCA and by Outlook to get an idea how to fetch the response schema. this depub output is done by print:r() and thus represents the array structure

------------------------
values send by RCA:
    [0] =&gt; Array
        (
            [tag] =&gt; AUTODISCOVER
            [type] =&gt; open
            [level] =&gt; 1
            [attributes] =&gt; Array
                (
                    [XMLNS:XSD] =&gt; http://www.w3.org/2001/XMLSchema
                    [XMLNS:XSI] =&gt; http://www.w3.org/2001/XMLSchema-instance
                    [XMLNS] =&gt; http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006
                )

            [value] =&gt;

        )

    [1] =&gt; Array
        (
            [tag] =&gt; REQUEST
            [type] =&gt; open
            [level] =&gt; 2
            [value] =&gt;

        )

    [2] =&gt; Array
        (
            [tag] =&gt; EMAILADDRESS
            [type] =&gt; complete
            [level] =&gt; 3
            [value] =&gt; test2013@dannhauer.de
        )

    [3] =&gt; Array
        (
            [tag] =&gt; REQUEST
            [value] =&gt;

            [type] =&gt; cdata
            [level] =&gt; 2
        )

    [4] =&gt; Array
        (
            [tag] =&gt; ACCEPTABLERESPONSESCHEMA
            [type] =&gt; complete
            [level] =&gt; 3
            [value] =&gt; http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a
        )

    [5] =&gt; Array
        (
            [tag] =&gt; REQUEST
            [value] =&gt;

            [type] =&gt; cdata
            [level] =&gt; 2
        )

    [6] =&gt; Array
        (
            [tag] =&gt; REQUEST
            [type] =&gt; close
            [level] =&gt; 2
        )

    [7] =&gt; Array
        (
            [tag] =&gt; AUTODISCOVER
            [value] =&gt;

            [type] =&gt; cdata
            [level] =&gt; 1
        )

    [8] =&gt; Array
        (
            [tag] =&gt; AUTODISCOVER
            [type] =&gt; close
            [level] =&gt; 1
        )
---------------------
values send by Outlook:
 [0] =&gt; Array
        (
            [tag] =&gt; AUTODISCOVER
            [type] =&gt; open
            [level] =&gt; 1
            [attributes] =&gt; Array
                (
                    [XMLNS] =&gt; http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006
                )

        )

    [1] =&gt; Array
        (
            [tag] =&gt; REQUEST
            [type] =&gt; open
            [level] =&gt; 2
        )

    [2] =&gt; Array
        (
            [tag] =&gt; EMAILADDRESS
            [type] =&gt; complete
            [level] =&gt; 3
            [value] =&gt; test2013@dannhauer.de
        )

    [3] =&gt; Array
        (
            [tag] =&gt; ACCEPTABLERESPONSESCHEMA
            [type] =&gt; complete
            [level] =&gt; 3
            [value] =&gt; http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a
        )

    [4] =&gt; Array
        (
            [tag] =&gt; REQUEST
            [type] =&gt; close
            [level] =&gt; 2
        )

    [5] =&gt; Array
        (
            [tag] =&gt; AUTODISCOVER
            [type] =&gt; close
            [level] =&gt; 1
        )

Thanks Torben</description> 
   <pubDate>Thu, 15 Nov 2012 12:00:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74812</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Implemented.
&gt;&gt;
&gt;&gt; Anyway you can test the current Git </title> 
   <description>&gt;&gt; Implemented.
&gt;&gt;
&gt;&gt; Anyway you can test the current Git code in your setup?
&gt;
&gt; In autodiscover.php in line 66 is an error:
&gt;
&gt;       if (!empty($results[&#039;raw_xml&#039;])) {
&gt;
&gt; should be
&gt;
&gt;       if (empty($results[&#039;raw_xml&#039;])) {
&gt;
&gt; in my opinion. otherwise it wouldn&#039;t call buildResponse( if raw_xml 
&gt; is empty..

Yeah, caught that last night and hadn&#039;t pushed it yet.  It&#039;s in Git now.</description> 
   <pubDate>Thu, 15 Nov 2012 14:00:02 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74815</link> 
  </item> 
   
  <item> 
   <title>How about now?


http://lists.horde.org/archives/commits/</title> 
   <description>How about now?


http://lists.horde.org/archives/commits/2012-November/017210.html

http://lists.horde.org/archives/commits/2012-November/017212.html</description> 
   <pubDate>Thu, 15 Nov 2012 14:50:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74822</link> 
  </item> 
   
  <item> 
   <title>&gt; How about now?
&gt;
&gt;
&gt; http://lists.horde.org/archives/co</title> 
   <description>&gt; How about now?
&gt;
&gt;
&gt; http://lists.horde.org/archives/commits/2012-November/017210.html
&gt;
&gt; http://lists.horde.org/archives/commits/2012-November/017212.html

Hi,
The respond schema is now detected correctly for both, Outlook and RCA.


Regarding teh logic fix: Maybe I&#039;m missing the point, but for me it does make still no sense.

My observation was, that outlook 2013 performs two independet autodiscover steps: It tries to discover a mobilesync setting, and it tries to discover a conventional Outlook setting as Outlook 2010 and Outlook 2007 do.

Some suggestions for Autodiscover.php:
- Line  113 and 136 check both for empty repsonse schema. this could be done directly after entering the _buildResponseString(..)  function to make the rest of the function easier to read.
- Line 135 opens a conditionalblock for the &quot;autodiscover/outlook&quot; schema, so within this block, it does not make sense to check for a mobilesync schema as done in lines 140:144. -&gt; what was the intention of the line? In my opinion we must drop that lines, because the comparison in line 140 is always true and thus the function returns a failure response.

Bye the way:
the failure response has always  the response schema for a mobilesync, so RCA seems not to unterstand that an error occured. the _buildFailureResponse(..) function should use the correct response schema in line 216 to allow Outlook &amp; RCA to unterstand that the error code is the response to teir query.

Torben</description> 
   <pubDate>Thu, 15 Nov 2012 15:38:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74825</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; How about now?
&gt;&gt;
&gt;&gt;
&gt;&gt; http://lists.horde.org/archive</title> 
   <description>&gt;&gt; How about now?
&gt;&gt;
&gt;&gt;
&gt;&gt; http://lists.horde.org/archives/commits/2012-November/017210.html
&gt;&gt;
&gt;&gt; http://lists.horde.org/archives/commits/2012-November/017212.html
&gt;
&gt; Hi,
&gt; The respond schema is now detected correctly for both, Outlook and RCA.
&gt;
&gt;
&gt; Regarding teh logic fix: Maybe I&#039;m missing the point, but for me it 
&gt; does make still no sense.
&gt;
&gt; My observation was, that outlook 2013 performs two independet 
&gt; autodiscover steps: It tries to discover a mobilesync setting, and it 
&gt; tries to discover a conventional Outlook setting as Outlook 2010 and 
&gt; Outlook 2007 do.
&gt;
&gt; Some suggestions for Autodiscover.php:
&gt; - Line  113 and 136 check both for empty repsonse schema. this could 
&gt; be done directly after entering the _buildResponseString(..)  
&gt; function to make the rest of the function easier to read.

Line 113 checks for an empty *request* schema. It&#039;s needed because some broken android clients don&#039;t send the XML payload at all. So, we default to the assuming a mobilesync *request* schema.

&gt; - Line 135 opens a conditionalblock for the &quot;autodiscover/outlook&quot; 
&gt; schema, so within this block, it does not make sense to check for a 
&gt; mobilesync schema as done in lines 140:144. -&gt; what was the intention 
&gt; of the line? In my opinion we must drop that lines, because the 
&gt; comparison in line 140 is always true and thus the function returns a 
&gt; failure response.

I misunderstood what you were telling me about the multiple requests that outlook makes. The idea was to catch the mobilesync request made by Outlook and reject it, but I now see that the request from Outlook for mobilesync looks like any other mobilesync request. I&#039;ll have to check the useragent, which I was hoping to avoid since future versions of Outlook can have different values for this.


&gt; Bye the way:
&gt; the failure response has always  the response schema for a 
&gt; mobilesync, so RCA seems not to unterstand that an error occured. the 
&gt; _buildFailureResponse(..) function should use the correct response 
&gt; schema in line 216 to allow Outlook &amp; RCA to unterstand that the 
&gt; error code is the response to teir query.

Ok. Thanks for the info. Will fix.


&gt; Torben
</description> 
   <pubDate>Thu, 15 Nov 2012 15:54:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74826</link> 
  </item> 
   
  <item> 
   <title>
&gt; I misunderstood what you were telling me about the multi</title> 
   <description>
&gt; I misunderstood what you were telling me about the multiple requests 
&gt; that outlook makes. The idea was to catch the mobilesync request made 
&gt; by Outlook and reject it, but I now see that the request from Outlook 
&gt; for mobilesync looks like any other mobilesync request. I&#039;ll have to 
&gt; check the useragent, which I was hoping to avoid since future 
&gt; versions of Outlook can have different values for this.

Actually, on second thought. I shouldn&#039;t have to sniff this out at all. It&#039;s up to the client to know if the server supports the version number required by the client. Outlook should detect this and refuse to use EAS. This is what I&#039;ll implment, you&#039;ll have to let me know if this works, since I don&#039;t have an Outlook client to use to test.</description> 
   <pubDate>Thu, 15 Nov 2012 15:57:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74827</link> 
  </item> 
   
  <item> 
   <title>Now?</title> 
   <description>Now?</description> 
   <pubDate>Thu, 15 Nov 2012 16:05:36 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74828</link> 
  </item> 
   
  <item> 
   <title>&gt; Now?

Autodiscover works for Outlook 2010 and iOS 6.0.1 </title> 
   <description>&gt; Now?

Autodiscover works for Outlook 2010 and iOS 6.0.1 ! :)

I&#039;ll test Outlook 2013 at home this evening, but I strongly assume this feature is finally implemented.

Regarding Outlook 2013:
My last impression was, that Outlook 2013 performs to independent queries:
the autodiscover for Imap &amp; Co followed by the autodiscover for activesync.

In my opinion Microsoft should have sorted their autodiscover attempts from the most capable protocol (activesync: email, contacs and calenders) to the least capable protocol (imap: only email) to establish the &quot;best&quot; connection the server/client can achieve. But it doesn&#039;t.
So the question is if horde should address this MS bug and should return for Outlook 2013 only activesync repsonses? I&#039;m not sure. But that could be adressed once horde supports EAS 14.

Anyway, the autodiscover for outlook works great, so I&#039;m looking forward to see it integrated into the next release.

Torben




</description> 
   <pubDate>Fri, 16 Nov 2012 07:30:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/11639#t74840</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
