create autodiscover when mail is on mail01 and sites on web01

DAForum

Verified User
Joined
Nov 29, 2017
Messages
11
Goodday,


Some time ago we started managing our VPSen ourselves.
This is all still going pretty well.

Now I was wondering if I could solve the following problem. Namely working with autodiscover.
We have always had our VPSen set up as followed by our previous hosting provider.
We have a VPS for handling the mail and a VPS for the websites.
The address of our mail server is therefore mail01.ourwebsite.nl
The websites run on web01.ourwebsite.nl
If there are problems with a web server, customers can continue to use their mail. That was the idea.

But that means that autodiscover will not work for our customers.
Because client softwere like outlook (the most commonly used software by our customers) immediately auto-fill the incoming and outgoing mail server as smtp.theiredomainname.nl or mail.theiredomainname.nl and this won't work because we have our mail01.ourwebsite.nl for incoming and outgoing mail server address.
so our customers must set up their mail account manually. That works but is not the easiest way to work with.

Now I came across this post last week.
Autodiscover information for mail clients to setup pop / imap / smtp settings automatically
https://help.directadmin.com/item.php?id=661
And my thought is can that also work for us?

I've tried it.
I have created a subdirectory: autodiscover.ourwebsite.nl.
Made the php and htacces file
And placed an SRV record in the DNS of one of my test domain names.
_autodiscover._tcp.testdomainname.nl 3600 IN SRV 10 10 443 autodiscover.ourwebsite.nl.

In my first test the following happened.
Nothing!!
The SRV record did not seem to work. (i think)
So I made a different DNS record.
autodiscover CNAME autodiscover.ourwebsite.nl.

In my second test the following happened.
I received an error message in Outlook because the SSL was seen from my webserver and not the mailserver.
That makes sense because the autodiscover script is on the webserver and not on the mailserver.

So to continue my test I have to create a subdirectory on my mailserver.
Now this may sound stupid but I am not sure how to handle this.
How do I create a subdirectory on a VPS that is configured for mail only.
Does it necessarily have to be a subdirectory?


Maybe someone has experience with setting up autodicover on 2 separate VPSs.
Or it might not even be possible?

I'm curious about the responses.

Thanks in advance
R.Hellemons
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,853
Location
GMT +7.00
Hello,

Yes, I have experience with it.

If it's not a typo:

Code:
_autodiscover._tcp.testdomainname.nl 3600 IN SRV 10 10 443 autodiscover.ourwebsite.nl.
you are missing a final dot, it should be
_autodiscover._tcp.testdomainname.nl.


In this example the name
autodiscover.ourwebsite.nl points to a web-server where you host autodiscover XML file, you can replace the name with web01.ourwebsite.nl or mail01.ourwebsite.nl, and put your content under a proper location under /var/www/html/

Feel free to ask questions, or contact me privately if you want me to install and configure it for you.
 

DAForum

Verified User
Joined
Nov 29, 2017
Messages
11
Hello there,
Thanks for your quick reply
Yes, that is a typo in my post. And probably also on my first attempt to create the DNS record, because I tried again and then checked it in MXToolbox and it works fine now. So that problem has been solved.

Now the hard part. Creating the subdirectory for the xml files.
Now I don't want to make my post any more difficult with all sorts of synonyms for my domain names, but I have always been told not to post that kind of info across the internet because it will stick on the internet forever. So I will post the real domains by private message to you so that you get a better idea what i'm talking about.

And thanks very much for your offer to fix this issue. I will keep this in mind. But I especially like doing it myself. Because thats the best way for me to learn about these issues.And believe me i have learned a lot these last few weeks.

Posting some more info to you thrue PM now.
 
Last edited:

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,853
Location
GMT +7.00
You're welcome.

An autodiscover XML file can be hosted under any domain, it can be web01.ourwebsite.nl or ourwebsite.nl, or anything.ourwebsite.nl.

If you need to create a subdomain, you can do it in Directadmin the same way as for other domains/subdomains. There are no restrictions on it.

And a content of a XML file can be automatically generated by a PHP script, with a help of mod_rewrite you make all requests to XML to be processed by your PHP script. This way it can be hosted in one place for all your existing domains, you can even use 3rd party services (paid or free), which will announce your settings.
 

DAForum

Verified User
Joined
Nov 29, 2017
Messages
11
OK zEITEr

The weekend is near.
I'm going to try to get it working before monday.
I'll keep you informed.

Thanks again.
 

DAForum

Verified User
Joined
Nov 29, 2017
Messages
11
Hi.

I did my best but its not working.

zEITEr, i just send you a PM.
 
Top