• Hello Forum,

    im trying to get the autodiscovery working in my setup.
    Im able to get the requests to the server:

    27/07/2020 17:37:34 [23027] [WBXML] [#unknown] [] ZPushAutodiscover->getIncomingXml() incoming XML data:
    <?xml version="1.0" encoding="utf-8"?>
    <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/requestschema/2006"><Request><EMailAddress>firstname.lastname@<my_domain></EMailAddress><AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006</AcceptableResponseSchema></Request></Autodiscover>
    

    Via config.php i used the “AUTODISCOVER_LOGIN_F_NO_DOT_LAST” variable and i get the corret username resolved (“flastname”), which is correct:

    27/07/2020 17:37:34 [23027] [DEBUG] [#unknown] [] BackendKopano using PHP-MAPI version: 8.7.14.0 - PHP version: 5.6.25
    27/07/2020 17:37:34 [23027] [DEBUG] [#unknown] [] ZPushAutodiscover->login(): AUTODISCOVER_LOGIN_TYPE is set to 2
    27/07/2020 17:37:34 [23027] [DEBUG] [#unknown] [] ZPushAutodiscover->login(): Using the username only for login: 'flastname'
    27/07/2020 17:37:34 [23027] [DEBUG] [#unknown] [] KopanoBackend->Logon(): Trying to authenticate user 'flastname'..
    27/07/2020 17:37:34 [23027] [DEBUG] [#unknown] [] KopanoBackend->openMessageStore('flastname'): Found 'DEFAULT' store: 'Resource id #17'
    27/07/2020 17:37:34 [23027] [DEBUG] [#unknown] [] KopanoBackend->Logon(): User 'flastname' is authenticated
    27/07/2020 17:37:34 [23027] [DEBUG] [#unknown] [] Store supports properties containing Unicode characters.
    27/07/2020 17:37:34 [23027] [DEBUG] [#unknown] [] ZPushAutodiscover->login() successfull with 'flastname' as the username.
    27/07/2020 17:37:34 [23027] [WBXML] [#unknown] [] KopanoBackend->GetUserDetails for 'flastname'.
    27/07/2020 17:37:34 [23027] [WBXML] [#unknown] [] Resolved user's 'flastname' fullname to 'Firstname Lastname'
    
    ####  i added this like in my workaround for outlook - further details below  ####
    27/07/2020 17:37:34 [23027] [ INFO] [#unknown] [] Selected Response-Schema:  'http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006'
    #######################################
    
    27/07/2020 17:37:34 [23027] [ INFO] [#unknown] [] ZPushAutodiscover->createResponse(): server URL: 'https://gate01.<my_domain>/Microsoft-Server-ActiveSync'
    

    (the gate01.<my_domain> is correct for external and internal setup.)

    it creates the response:

    <?xml version="1.0" encoding="utf-8"?>
    <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006">
    <Culture>en:us</Culture>
    <User>
    <DisplayName>Firstname Lastname</DisplayName>
    <EMailAddress>firstname.lastname@<my_domain></EMailAddress>
    </User>
    <Action>
    <Settings>
    <Server>
    <Type>MobileSync</Type>
    <Url>https://gate01.<my_domain>/Microsoft-Server-ActiveSync</Url>
    <Name>https://gate01.<my_domain>/Microsoft-Server-ActiveSync</Name>
    </Server>
    </Settings>
    </Action>
    </Response>
    </Autodiscover>
    

    But he client wont take the settings for the url-connection.
    Mobile-clients like my sony xperia with standard mail app or nine tells me, they got a connect but i need to edit the credentials, so the loginname is using the “domain\username” format and i need to edit the connection url.

    i tried to create a workaround for outlook with an additional response.xml-template which is in the format of […]outlook[…]2006a and edit the autodiscover.php so the script will create different responses depending on the asked schema. (the selection is working and i get different responses if i connect with outlook and mobile-app).
    I debugged with:

    curl --user flastname -X POST -d "<?xml version='1.0' encoding='UTF-8'?><Autodiscover xmlns='http://schemas.microsoft.com/exchange/autodiscover/mobilesync/requestschema/2006'><Request><EMailAddress>firstname.lastname@<domain></EMailAddress><AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006</AcceptableResponseSchema></Request></Autodiscover>" https://autodiscover.<domain>/autodiscover/autodiscover.xml
    
    and
    
    curl --user flastname -X POST -d "<?xml version='1.0' encoding='UTF-8'?><Autodiscover xmlns='http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006a'><Request><EMailAddress>firstname.lastname@<domain></EMailAddress><AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema></Request></Autodiscover>" https://autodiscover.<domain>/autodiscover/autodiscover.xml
    

    which gives me the correct responses like discribed above.
    But the clients wont accept this and its driving me crazy

    any suggestions/ideas?

    best regards
    coffee_is_life

  • Kopano

    Hi @Coffee_is_life,

    if Outlook requests “http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006a” schema, it expects Exchange server behind it and the complete response for it. In such case it won’t work with “http://schemas.microsoft.com/exchange/autodiscover/mobilesync/responseschema/2006” schema in the response.

    Did you try to manually select Exchange ActiveSync-compatible (or something similar) in the account types when setting a new Outlook profile? Or doesn’t it exists in Outlook 2016 anymore?

    Manfred


  • Hello @Manfred

    the function to create an outlook activesync profile is available (due to setting a registry key). So this is no problem (but annoying to do this manual aswell vfor every user once in a while when they are switcjing pcs) - but i thought if i create an […]ourlook/[…]2006a response, this should be fine.

    The problem is, that even my mobile devices dont recognize the […]mobilesync/[…]2006 response.

    Maybe i should named the thread “Autodiscovery with Mobile-Clients not working”.
    I tried to solve 2 problems at once.

    coffee_is_life


  • @Coffee_is_life said in Autodiscovery for Outlook 2016:

    (due to setting a registry key)

    Hi @Coffee_is_life!
    Could you please share info about needed registry key?
    I also wonder have you had setup autodiscover record in your domain’s DNS-zone?

  • Kopano

    @Finji said in Autodiscovery for Outlook 2016:

    Could you please share info about needed registry key?

    That key automatically gets set when installing KOE.


  • @Finji like @fbartels says :)

    i got the autodiscovery.<my_domain> running. without this, my z-push instance wouldnt even get the request.

    coffee_is_life

  • Kopano

    Hi @Coffee_is_life,

    if Outlook doesn’t request mobileschema, then it will only be possible to configure account manually in order to set up an ActiveSync account.

    On the mobile devices do you have to edit both username and the server URL? Which devices have you tested with?

    @Coffee_is_life said in Autodiscovery for Outlook 2016:

    i got the autodiscovery.<my_domain> running. without this, my z-push instance wouldnt even get the request.

    Is it a typo? It should be autodiscover.domain.tld.

    Just to clarify the terms - autodiscovery is the process to get the endpoints. The service itself is called autodiscover.

    Manfred


  • @Manfred said in Autodiscovery for Outlook 2016:

    Is it a typo? It should be autodiscover.domain.tld.

    its a typo in my post :) its autodiscover.domain

    i checked with sony xperia ZX “standard mail app” and mail app “nine”
    samsung xcover4 “standard mailapp”

    coffee_is_life


  • @Manfred, BTW whether any size limitation exists for mailbox synced via z-push, doesn’t it?


  • I’ve found this post, the matter is closed :-)