Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Failing to configure autodiscover

    Synchronising (mobile) devices via Z-Push
    4
    7
    975
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • itserv
      itserv last edited by

      I fail to configure autodiscover.

      The goal is to have Outlook 365 users and other autoconfigure-aware devices connect to kopano without having to do special config (Q1: is this for Outlook 365 possible, or do I always need the KOE installed for EAS?)

      The official mail addresses of my users are first.last@domain.com, the login is flast.

      The two most important settings in /etc/z-push/autodiscover.conf.php are

          define('USE_FULLEMAIL_FOR_LOGIN', false);
          define('AUTODISCOVER_LOGIN_TYPE', AUTODISCOVER_LOGIN_F_NO_DOT_LAST);
      
      

      Having set up autoconfigure on my Kopano server and connecting to https://server/autodiscover/autodiscover.xml requests a users login name (HTTP Basic authentication).

      When I enter my email address there (the client does not know anything else), autodiscover tries to contact the Kopano backend using the local part of the e-mail adress (first.last), but does not further process and cut down the login name to the required flast. For that reason, the Kopano backend blocks access to Autodiscover immediatly.

      The code responsible is:

          private function getLogin() {
              if (!isset($_SERVER['PHP_AUTH_PW'], $_SERVER['PHP_AUTH_USER'])) {
                  throw new AuthenticationRequiredException("Access denied. No username or password provided.");
              }
              list($username,) = Utils::SplitDomainUser($_SERVER['PHP_AUTH_USER']);
              if(! USE_FULLEMAIL_FOR_LOGIN) {
                  $username = Utils::GetLocalPartFromEmail($username);
              }
      /*
      HERE NEEDS TO BE THE CONVERSION FROM FIRST.LAST to FLAST, BUT IT'S MISSING
      */
      
              $backend = ZPush::GetBackend();
              if ($backend->Logon($username, "", $_SERVER['PHP_AUTH_PW']) == false) {
                  ZLog::Write(LOGLEVEL_ERROR, sprintf("ZPushAutodiscover->getLogin(): Login failed for user '%s' from IP %s.", $username, $_SERVER["REMOTE_ADDR"]));
                  throw new AuthenticationRequiredException("Access denied. Username or password incorrect.");
              }
          }
      
      

      Or do I miss something? The conversion routine

          private function login($backend, $incomingXml) {
      

      seens never to be called …

      Please give me some advice. Thank you.

      Manfred 1 Reply Last reply Reply Quote 0
      • Manfred
        Manfred Kopano @itserv last edited by

        Hi itserv,

        login() is called in DoAutodiscover function.

        getLogin() you’re referring is only used in GET requests which are not usually issued by clients. It’s there e.g. for testing autodiscover in browser.

        Did you check the autodiscover.log for errors?

        Manfred

        @itserv said in Failing to configure autodiscover:

        The goal is to have Outlook 365 users and other autoconfigure-aware devices connect to kopano without having to do special config (Q1: is this for Outlook 365 possible, or do I always need the KOE installed for EAS?)

        What exactly do you mean by Outlook 365?
        Outlook with an EAS account will sync with Z-Push/Kopano without KOE as well, but some functionality won’t be available (see https://kb.kopano.io/display/WIKI/Setting+up+the+Kopano+OL+Extension and https://documentation.kopano.io/kopano_changelog/koe.html what it provides).

        Manfred

        itserv 1 Reply Last reply Reply Quote 0
        • itserv
          itserv @Manfred last edited by

          Ah, you mean this is a test-only GET-problem? So I’m absolutely fine with it, and that explains why I seem to get further when I actually try to connect a device.

          I wrote Outlook 365, but ment Outlook which is part of Office 365. And yes, of course I checked the logs, and found something worrying:

          05/10/2018 08:42:41 [24583] [DEBUG] [#unknown] -------- Start ZPushAutodiscover
          05/10/2018 08:42:41 [24583] [ INFO] [#unknown] Z-Push version='2.4.4+0-0'
          05/10/2018 08:42:41 [24583] [FATAL] [#unknown] FatalException: Request for a responseschema that is not supported (only mobilesync is supported): http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a - code: 0 - file: /usr/share/z-push/autodiscover/autodiscover.php:177
          05/10/2018 08:42:41 [24583] [FATAL] [#unknown] Exception: (FatalException) - Request for a responseschema that is not supported (only mobilesync is supported): http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a
          05/10/2018 08:42:41 [24583] [ERROR] [#unknown] Unable to complete autodiscover because of ZPushException. Error: Request for a responseschema that is not supported (only mobilesync is supported): http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a
          05/10/2018 08:42:41 [24583] [DEBUG] [#unknown] ZPushAutodiscover->sendResponse() sending response...
          05/10/2018 08:42:41 [24583] [DEBUG] [#unknown] ZPushAutodiscover->sendResponse() response sent.
          05/10/2018 08:42:41 [24583] [DEBUG] [#unknown] -------- End ZPushAutodiscover
          
          

          The point that worries me is Request for a responseschema that is not supported. If I get the message right, Oulook from Office 365 tries to autodiscover with a schema that is not provided by autodiscover, which means to me that I cannot use autodiscover to connect such an Outlook.

          Using 9folders Nine as a client, I get further - but fail at other places (still troubleshooting this)

          fbartels 1 Reply Last reply Reply Quote 0
          • fbartels
            fbartels Kopano @itserv last edited by

            @itserv said in Failing to configure autodiscover:

            Oulook from Office 365 tries to autodiscover with a schema that is not provided by autodiscover

            Yes, it has been reported in the past that “Click to run Outlook” and “Outlook from Office 365” don’t do the correct discovery call.

            Regards Felix

            Resources:
            https://kopano.com/blog/how-to-get-kopano/
            https://documentation.kopano.io/
            https://kb.kopano.io/

            Support overview:
            https://kopano.com/support/

            1 Reply Last reply Reply Quote 0
            • itserv
              itserv last edited by

              Great.
              Microsoft. Again.

              They seem to do a lot of stupid errors.

              OK, in that case I can stop my hunt,. Thank you.

              1 Reply Last reply Reply Quote 0
              • rseir
                rseir last edited by

                I’ve the same trouble at all…

                When I enter my email address there (the client does not know anything else), autodiscover tries to contact the Kopano backend using the local part of the e-mail adress (first.last), but does not further process and cut down the login name to the required flast.

                AUTODISCOVER_LOGIN_TYPE

                Manfred 1 Reply Last reply Reply Quote 0
                • Manfred
                  Manfred Kopano @rseir last edited by

                  Hi rseir,

                  @rseir said in Failing to configure autodiscover:

                  I’ve the same trouble at all…

                  When I enter my email address there (the client does not know anything else), autodiscover tries to contact the Kopano backend using the local part of the e-mail adress (first.last), but does not further process and cut down the login name to the required flast.

                  AUTODISCOVER_LOGIN_TYPE

                  it would helpful to understand your issue if you would provide more information about your setup and what you tried.

                  What do you enter when configuring the mobile device? first.last@domain.com - is this correct?
                  What is the login name of the user on your system? flast - is this correct?

                  What are your autodiscover config settings for USE_FULLEMAIL_FOR_LOGIN and AUTODISCOVER_LOGIN_TYPE?

                  Set the LOGLEVEL to LOGLEVEL_WBXML in the autodiscover config and post the autodiscover.log contents.

                  Manfred

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post