Score:1

Microsoft Outlook Autodiscover With Private Email Server

cn flag

I have a linux based mail server (not Microsoft Exchange) at mail.example.com

I host email for multiple domains at this server: example1.com, example2.com, example3.com, etc

I have a mail client running Outlook 2019. When the user adds a new account with their email, e.g.: [email protected] and then clicks "continue" and then "IMAP/POP", [the incoming and outgoing server fields are blank][1].

Things I have tried to get auto discover working, but don't help:

  1. Hosted an autodiscover.xml file at http://autodiscover.example1.com/autodiscover/autodiscover.xml

  2. Hosted an autodiscover.xml file at http://example1.com/autodiscover/autodiscover.xml

  3. Followed [Thunderbird's instructions][2] and hosted a config.xml file at https://example1.com/mail/config-v1.1.xml

  4. Added the following SRV records for the example1.com domain:

_imaps._tcp             IN SRV   0 1 993 mail.example.com.
_submission._tcp        IN SRV   0 1 587 mail.example.com.

my autodiscover.xml file:

<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
   <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
      <Account>
         <AccountType>email</AccountType>
         <Action>settings</Action>
         <Protocol>
            <Type>IMAP</Type>
            <Server>mail.example.com</Server>
            <Port>993</Port>
            <DomainRequired>off</DomainRequired>
            <LoginName />
            <SPA>off</SPA>
            <SSL>on</SSL>
            <AuthRequired>on</AuthRequired>
         </Protocol>
         <Protocol>
            <Type>POP3</Type>
            <Server>mail.example.com</Server>
            <Port>995</Port>
            <DomainRequired>off</DomainRequired>
            <LoginName />
            <SPA>off</SPA>
            <SSL>on</SSL>
            <AuthRequired>on</AuthRequired>
         </Protocol>
         <Protocol>
            <Type>SMTP</Type>
            <Server>mail.example.com</Server>
            <Port>587</Port>
            <DomainRequired>off</DomainRequired>
            <LoginName />
            <SPA>off</SPA>
            <Encryption>SSL</Encryption>
            <AuthRequired>on</AuthRequired>
            <UsePOPAuth>off</UsePOPAuth>
            <SMTPLast>off</SMTPLast>
         </Protocol>
      </Account>
   </Response>
</Autodiscover>

my config-v1.1.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<clientConfig version="1.1">
    <emailProvider id="example.com">
        <domain>example.com</domain>
        <displayName>Company Name</displayName>
        <displayShortName>Company</displayShortName>
        <incomingServer type="imap">
            <hostname>mail.example.com</hostname>
            <port>993</port>
            <socketType>SSL</socketType>
            <authentication>password-encrypted</authentication>
            <username>%EMAILADDRESS%</username>
        </incomingServer>
        <outgoingServer type="smtp">
            <hostname>mail.example.com</hostname>
            <port>587</port>
            <socketType>STARTTLS</socketType>
            <authentication>password-encrypted</authentication>
            <username>%EMAILADDRESS%</username>
        </outgoingServer>
    </emailProvider>
    <emailProvider id="example1.com">
        <domain>example1.com</domain>
        <displayName>Company 2</displayName>
        <displayShortName>Company</displayShortName>
        <incomingServer type="imap">
            <hostname>mail.example.com</hostname>
            <port>993</port>
            <socketType>SSL</socketType>
            <authentication>password-encrypted</authentication>
            <username>%EMAILADDRESS%</username>
        </incomingServer>
        <outgoingServer type="smtp">
            <hostname>mail.example.com</hostname>
            <port>587</port>
            <socketType>STARTTLS</socketType>
            <authentication>password-encrypted</authentication>
            <username>%EMAILADDRESS%</username>
        </outgoingServer>
    </emailProvider>
</clientConfig>```


  [1]: https://i.stack.imgur.com/HLROe.png
  [2]: https://wiki.mozilla.org/Thunderbird:Autoconfiguration
Score:1
cn flag

from:https://docs.iredmail.org/iredmail-easy.autoconfig.autodiscover.html#setup-dns-record-for-autoconfig

How auto-discover works in Microsoft Outlook Warning

Outlook requires a valid ssl cert, a self-signed ssl cert may fail.

Without Microsoft Exchange, the order of logic that Outlook 2007 and newer releases use when trying to figure out where to get server settings is as follows:

HTTPS root domain query. Outlook uses the domain part of user email address to do this query, so it's https://customer.com/autodiscover/autodiscover.xml. If above failed, try HTTPS autodiscover domain: https://autodiscover.customer.com/autodiscover/autodiscover.xml. If above failed, try same URL but HTTP instead: http://autodiscover.customer.com/autodiscover/autodiscover.xml If all failed, try DNS SRV record: _autodiscover._tcp.customer.com. If it returns a web host name and port number, for example, mail.host.com and port number 443, then try https://mail.host.com:443/autodiscover/autodiscover.xml The ideal solution is setting DNS SRV record _autodiscover._tcp.customer.com and point to your server mail.host.com.

The autodiscover component configured by iRedMail Easy supports URLs:

https://mail.host.com/autodiscover/autodiscover.xml https://autodiscover.host.com/autodiscover/autodiscover.xml (DNS A record of autodiscover.host.com must be pointed to IP of your mail server a.b.c.d.)

Julius avatar
cn flag
Isn't it just insanely silly and retarded that these big players, like Google, Microsoft and Apple, are unable to co-use the mozilla standard for this? I mean, just think of the extra energy and time wasted by those extra files and urls and queries and cached data on a global scale. We could spare ourselves entire datacenters not having to do triple the work for something as simple as email config based on RFCs. Seriously, I know this is getting voted down, but we all know it's true; These big players are destroying the planet with their "we refuse to cooperate, we make our own!" attitude.
Jayce avatar
au flag
Thanks for sharing. Amazing!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.