New SRV record not getting added to new domains

MopeyGecko

Verified User
Joined
Apr 6, 2022
Messages
42
I'm trying to set up autodiscover for emails and have almost everything working except adding the SRV record to new domains.

I have created a dns_srv.conf file in /usr/local/directadmin/data/templates/custom with the contents...

Code:
_autodiscover._tcp.|DOMAIN|. 3600 IN SRV 0 0 443 autodiscover.server.uk.

But when I create a new domain the record isn't added.

I have also tried editing the parent dns_srv.conf file in /usr/local/directadmin/data/templates/ and that doesn't work either.

Interestingly if I edit the spf record in /usr/local/directadmin/data/templates/dns_txt.conf this *does* work.

Can anybody help?

Thanks!
 
I was able to get this working using a post domain script so the srv record is now getting added. I can't get Apple Mail to work with autodiscover however. I've tested the htaccess redirect from autodiscover.server.co.uk, the DNS records are resolving and the PHP script is returning correct values but it doesn't seem like autodiscover is being called at all. I've even tried with static XML files with no success. Does anybody else have autodiscover set up successfully using Apple Mail as client?

Thanks!
 
_autodiscover._tcp.|DOMAIN|. 3600 IN SRV 0 0 443 autodiscover.server.uk.
This is incorrect anyway because your hostname should not be server.uk but an fqdn hostname, so autodiscover.server.something.uk.
If you fill in the examples with your real domain and hostname on top of the page I linked to, then things should give the correct examples for your real credentials.
 
Thanks, that's just a placeholder The DNS SRV record is set up correctly but autodiscover still isn't working unfortunately.

I added some logging to the autodiscover.php file and the request from outlook is actually a GET request and doesn't have any other request variables so is no good. I tried using the Microsoft Remote Connectivity Analyzer and for the SRV method and get so far but it says the response is null.

It really isn't though :(

Code:
<?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">
       <Account>
           <AccountType>email</AccountType>
           <Action>settings</Action>
           <Protocol>
               <Type>IMAP</Type>
               <Server>mail.co22.uk</Server>
               <Port>993</Port>
               <DomainRequired>off</DomainRequired>
               <LoginName>[email protected]</LoginName>
               <SPA>off</SPA>
               <SSL>on</SSL>
               <AuthRequired>on</AuthRequired>
           </Protocol>
           <Protocol>
               <Type>POP3</Type>
               <Server>mail.co22.uk</Server>
               <Port>995</Port>
               <DomainRequired>off</DomainRequired>
               <LoginName>[email protected]</LoginName>
               <SPA>off</SPA>
               <SSL>on</SSL>
               <AuthRequired>on</AuthRequired>
           </Protocol>
           <Protocol>
               <Type>SMTP</Type>
               <Server>mail.co22.uk</Server>
               <Port>587</Port>
               <DomainRequired>off</DomainRequired>
               <LoginName>[email protected]</LoginName>
               <SPA>off</SPA>
               <Encryption>TLS</Encryption>
               <AuthRequired>on</AuthRequired>
               <UsePOPAuth>off</UsePOPAuth>
               <SMTPLast>off</SMTPLast>
           </Protocol>
       </Account>
   </Response>
</Autodiscover>

1751737161604.png

You can see a sample response at https://autodiscover.co22.uk/AutoDiscover/AutoDiscover.xml
 
OK, all set up and working now. I had a an htaccess error (doh!). Everything is working on the server domain now for both Outlook and Thunderbird.

For Thunderbird it calls /autodiscover/autodiscover.xml on the email domain so as this is the same as the server domain it works fine. Other domains I don't have configured yet. I understand the Thunderbird specific instructions in the DA docs but I'd like to adapt this so it works by default for any new domains added so I'm working on that now. Hopefully I can set up some kind of global redirect from http://autoconfig.clientdomain.com/mail/[email protected] to http://autoconfig.serverdomain.com/mail/[email protected] and set up another php script as I don't really want to have to create actual subdomains on every domain
 
Back
Top