[Tickets #11639] ActiveSync :: Extend the Autodiscover feature to return also valid answers to MS Outlook queries

bugs at horde.org bugs at horde.org
Sun Nov 4 17:20:30 UTC 2012


BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE  
E-MAIL-ADRESSE WERDEN NICHT GELESEN.

Ticket-URL: http://bugs.horde.org/ticket/11639
------------------------------------------------------------------------------
  Ticket           | 11639
  Erstellt Von     | torben at dannhauer.info
  Zusammenfassung  | ActiveSync :: Extend the Autodiscover feature to return
                   | also valid answers to MS Outlook queries
  Warteschlange    | Horde Framework Packages
  Version          | Git master
  Typ              | Enhancement
  Status           | New
  Priorität        | 3. High
  Milestone        |
  Patch            | 1
  Zuständige       |
------------------------------------------------------------------------------


torben at dannhauer.info (2012-11-04 17:20) hat geschrieben:

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 "_buildResponseString($properties)" to:


    protected function _buildResponseString($properties)
     {
         if (stripos($properties['request_schema'],  
'autodiscover/mobilesync') !== false) {
             return '<?xml version="1.0" encoding="utf-8"?>
               <Autodiscover  
xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
                 <Response  
xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006">
                   <Culture>' . $properties['culture'] . '</Culture>
                   <User>
                     <DisplayName>' . $properties['display_name'] .  
'</DisplayName>
                     <EMailAddress>' . $properties['email'] . '</EMailAddress>
                   </User>
                   <Action>
                     <Settings>
                       <Server>
                         <Type>MobileSync</Type>
                          <Url>' . $properties['url'] . '</Url>
                          <Name>' . $properties['url'] . '</Name>
                        </Server>
                     </Settings>
                   </Action>
                 </Response>
               </Autodiscover>';
         }
         else if (stripos($properties['request_schema'],  
'autodiscover/outlook') !== false) {
             //// MS Outlook 2013 (Outlook 15) : Output data for ActiveSync
             //if(preg_match("Microsoft[\.|\s]Outlook[\.|\s]15",  
$_SERVER['HTTP_USER_AGENT'])) {
                // 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['HTTP_USER_AGENT'], 'Outlook') !== false) {
             return '<Autodiscover  
xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
               <Response xmlns="' . $properties['response_schema'] . '">
                 <User>
                   <DisplayName>' . $properties['display_name'] .  
'</DisplayName>
                 </User>
                 <Account>
                   <AccountType>email</AccountType>
                     <Action>settings</Action>
                       <Protocol>
                         <Type>IMAP</Type>
                         <Server>my-horde.tld</Server>
                         <Port>993</Port>
                         <LoginName>' . $properties['email'] . '</LoginName>
                         <DomainRequired>off</DomainRequired>
                         <SPA>off</SPA>
                         <SSL>on</SSL>
                         <AuthRequired>on</AuthRequired>
                       </Protocol>
                       <Protocol>
                         <Type>POP3</Type>
                         <Server>my-horde.tld</Server>
                         <Port>110</Port>
                         <LoginName>' . $properties['email'] . '</LoginName>
                         <DomainRequired>off</DomainRequired>
                         <SPA>off</SPA>
                         <SSL>on</SSL>
                         <AuthRequired>on</AuthRequired>
                       </Protocol>
                       <Protocol>
                         <Type>SMTP</Type>
                         <Server>my-horde.tld</Server>
                         <Port>465</Port>
                         <LoginName>' . $properties['email'] . '</LoginName>
                         <DomainRequired>off</DomainRequired>
                         <SPA>off</SPA>
                         <SSL>on</SSL>
                         <AuthRequired>on</AuthRequired>
                         <UsePOPAuth>on</UsePOPAuth>
                       </Protocol>
                    </Account>
                 </Response>
              </Autodiscover>';
         }
     }
     else    return(_buildFailureResponse($properties['email'],  
"Invalid autodiscover schema")); // 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







More information about the bugs mailing list