[automail] Autodiscover doesn't use specified servers

Discussion in 'Plugins/Modules/Addons' started by Tuumke, Mar 22, 2020.

  1. Tuumke

    Tuumke Active Member

    I followed the tutorial on @florian030 's website: https://schaal-it.com/ispconfig-automail/
    (at least, i think its his ;)

    So, autoconfig is working fine for things like Thunderbird.
    But Autodiscover, something is wrong. It doesnt use the servers setup but the defaults it finds in the dns?!
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  3. Tuumke

    Tuumke Active Member

    Well, the plugin for automail gives you an extra tab. There fill out your mail hosts, mail.example.com
    But Autodiscover doesnt use those fields somehow. It just uses imap.client.com and smtp.client.com instead of mail.example.com

    The analyzer shows wrong certificates and uses imap.client.com and smtp.client.com instead of mail.exampe.com
  4. nhybgtvfr

    nhybgtvfr Active Member

    mailserver FQDN: mail.myhostdomain.com
    client domain: myclientdomain.com

    in myclientdomain.com dns:
    autoconfig cname
    hostname: autoconfig
    target hostname: autoconfig.myhostdomain.com.
    ttl: 3600

    autodiscover SRV
    hostname: _autodiscover._tcp
    target: autodiscover.myhostdomain.com.
    weight: 0
    port: 443
    priority: 0
    ttl: 3600

    in myhostdomain.com dns:

    autoconfig A record
    hostname: autoconfig
    ip: <ip of mailserver>
    ttl: 3600

    autodiscover A record
    hostname: autodiscover
    ip: <ip of mailserver>

    mailserver A Record
    hostname: mail
    ip: <ip of mailserver>
    ttl: 3600

    mailserver MX record
    hostname : myhostdomain.com.
    mailserver hostname: mail.myhostdomain.com.
    priority: 10
    ttl: 3600

    in automail ispconfig tab
    mailserver: mail.myhostdomain.com
    hostname imap/pop3: mail.myhostdomain.com
    hostname smtp: mail.myhostdomain.com

    make sure the autodiscover web files are uploaded, and served by a webserver, on the mailserver at /var/www/html/autodiscover
    Tuumke likes this.
  5. Tuumke

    Tuumke Active Member

    I had also made autoconfig.client.com as cname. Removed those, will test tomorrow morning with these settings
  6. Tuumke

    Tuumke Active Member

    When setting up the new mail accout, it still tries to use:
    Instead of mail.server.com

    Did you make a aliasdomain for website or a aliasdomain (vhost)?
    I dont understand why.. i removed the imap.client.com and smtp.client.com, i want autodiscover to use mail.server.com
    That is also what i filled in the automail tab.
  7. nhybgtvfr

    nhybgtvfr Active Member

    hmm. not actually looked through the script files themselves to see what checks what and where.
    I didn't create any aliasdomains or vhost aliasdomains. shouldn't be necessary, and would just be an extra complication/distraction.

    only other thing I can think of, is the autodiscover website part isn't getting the correct/any information from ispconfig. have you configured the correct remote user details in config.php in the autodiscover website files? and have you create this remote user, with the required permissions in ispconfig? I would suggest testing that remote user login is working ok. possibly a self-signed cert is waiting for you to trust it, which never happens, so the api query doesn't complete....
  8. Tuumke

    Tuumke Active Member

    Yes, the correct remote api user is present, since autoconfig works, just not autodiscover
    And it's all on the same host.. with a valid LE certs as well for the config panel..
  9. Tuumke

    Tuumke Active Member

    Looking in the php source coude, i turned on debugging....
    That looks just fine..

    <?xml version="1.0" encoding="utf-8"?>
            <Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/mobilesync/requestschema/2006">
                <EMailAddress>[email protected]</EMailAddress>
            </Autodiscover><?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/outlook/responseschema/2006a">
            <LoginName>[email protected]</LoginName>
            <LoginName>[email protected]</LoginName>
            <LoginName>[email protected]</LoginName>

    Still, outlook and w10-mail use imap.client.com and smtp.client.com.
    Last edited: Mar 28, 2020
  10. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Could you share a screenshot of your DNS settings for the domain(s) and the domain name (eventually in a PM) so I can look into it with the Outlook tool?
  11. Tuumke

    Tuumke Active Member

    I feel sooo f-ing stupid... i have the dns of server.com at the registar... not in my ispconfig panel.. how can i be so stupid..
    Though, that didnt help anything :)
    This is my server.com dns settings. I did just change the SRV record to autodiscover but i dont think that wil change anything:


    And this is my client.com dns:
  12. nhybgtvfr

    nhybgtvfr Active Member

    ok, one thing, that I suspect you're already doing as you say autoconfig works, but isn't clear or just isn't shown on those edited screenshots.

    for the A and AAAA records, name fields, if you're using the domain name, add a trailing . at the end.
    same for the data fields for the autoconfig cname and the autodiscover srv records.
  13. Tuumke

    Tuumke Active Member

    Okai, we can stop looking (for now). Heard back from Florian..

    "this plugin does not work with newer outlook version. ms changed the way for the config-request and i have no time to find out what they changed"
  14. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    In the DNS of server.com you have the SRV record data 0 0 443 autoconfig.server.com, this should be 0 0 443 autodiscover.server.com
  15. Tuumke

    Tuumke Active Member

    "I did just change the SRV record to autodiscover but i dont think that wil change anything"

  16. progressed36

    progressed36 Member

  17. Stelios

    Stelios Member

    Now that we know that doesn't work with the latest Outlook how it would be possible to uninstall it?
    There isn't any information about what to delete to complete uninstall it.

  18. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Remove the DNS records, remove the folder automail from /usr/local/interface/web, remove the remote user, remove the website from your webs (and the alias you made)
  19. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I think the table mail_config can be dropped from your DB aswell, but didn't look into it.
  20. Stelios

    Stelios Member

    Thanks, i reverted everything on the install.php just to be sure.

Share This Page