Make all accounts use the registrar's nameservers (not the local service)

webbasica

Verified User
Joined
Feb 21, 2005
Messages
73
Today I found out some sites are not delivering their form-to-mail messages because I never bothered to change the default DNS settings when setting up the accounts. So now I want to reset every account so that each will use the registrar's nameservers, instead of the local DNS service (on Directadmin).

I found this help doc that will help me disable Directadmin's DNS service. However, I want to make sure that once I do that, every account (domain) will default back to the nameservers set on the registrar.

I remember Cpanel had an option for exactly that (and also a setting called "Remote Mail Exchanger", which seemed redundant). Does Directadmin have an equivalent?

Thanks
 
Since the problem I'm having is forms (on websites) not delivering mail, because they check their local DNS service and it says that the same server is handling everything, disabling their mail is not really a solution. Or is it?

Here is the scenario I'm trying to fix:
- User fills up a form on a web page.
- WordPress (PHP) takes the data and tries to mail it to an address with the same domain name as the website.
- Exim seems to lose that mail because "R=virtual_aliases:"

After some investigating, I figured that that happens because the server has a local DNS service which includes MX records for the domain. These are set up by Directadmin by default and are not accurate (all my DNS is handled by Cloudflare). So what I need is to make Directadmin use the nameservers set on the registrar of each domain, and ignore their local DNS records.

Sorry if that didn't make sense.
 
PHP scripts won't check your local DNS when sending emails unless you have
Code:
nameserver 127.0.0.1
in your /etc/resolv.conf. That's the only case when your local DNS might overwrite records from remote name servers.

I believe your use case is the following. You host sites with domains which use remote name server and handle emails outside your server. But emails from your PHP scripts are routed locally, when you expect them to be routed to an external mail service. And if this is the case then you should check the link from my previous reply.
 
The method you linked assumes I manage the DNS locally (the 2nd step tells you how to configure the MX record). How do I do both, in bulk?
Tell Directadmin that mail and dns is managed somewhere else, but keep phpmail working.
 
In your case you can ignore the step#2 and do only one, i.e. disable "Local Mail Server". You can achieve the same result by removing domains from /etc/virtual/domains file as root in SSH.

None service running on the server will check your local DNS unless you make them to do it so in the file /etc/resolv.conf. But if you still want to hide your local DNS records check the method here: https://forum.directadmin.com/threa...g-mydnsserver-my-domain-ns.67297/#post-354244
 
Back
Top