Where to put MX-Record? ISP or My Server? [Solved]

14 posts / 0 new
Last post
#1 Sat, 01/30/2010 - 09:06

Where to put MX-Record? ISP or My Server? [Solved]

Hi need some help again,

could somebody explain how it could work. I have the following situation:

ISP: here I register all domains, here I park all my domains. I also have here a own ns1 and ns2.

My Server: here are all the webcontents of my domains.

Untill here no problems I can send and receive mails.

I have two domains with theire own company mail-server.

Question: where must I put the MX record? At ISP, on my server or on both?

Can somebody help me? Please!

Sat, 01/30/2010 - 09:34

Question: where must I put the MX record? At ISP, on my server or on both?

You'd setup all your DNS records, including the MX records, at where ever your ns1 and ns2 domains are being hosted. So if ns1 and ns2 point to your particular server, you'd be setting up all the DNS goodies on your server then.

If you think the DNS is correct, but things still aren't working, you can get some clues by looking in the email log, which is either /var/log/maillog or /var/log/mail.log.


Sat, 01/30/2010 - 09:52

Hi andreychek,

its you again :) Sorry but I don't understand.

At my old server with plesk I did it this way:

ISP: Normal DNS records entry with mx-record IP to companies mail-server

on my Server: No mailservice

It allways functioned well


Sat, 01/30/2010 - 10:27

its you again :)

Indeed, they work me like a dog around here!

At my old server with plesk I did it this way: ISP: Normal DNS records entry with mx-record IP to companies mail-server

Well, I don't know much about your setup, or why it worked in the past; all I can do is work with you to figure out how things are configured now, and then try to nail down why things aren't working as you'd like :-)

If you're saying that your ISP is hosting your DNS records, and that email currently should be going to your server (but isn't!), then the next step is for us to look into why it's not getting delivered.

It's going to be one of two things, most likely -- a DNS problem, with perhaps the MX record pointing somewhere it shouldn't... or it could a configuration issue on your current server.

To try and tackle those two possibilities --

  1. You may want to go to a site like intodns.com, and put your domain into it. It'll run through your DNS settings, and make sure everything looks right. Also, when it checks your MX record, make sure the IP/name it mentions to you is correct.

  2. You'll need to look in your mail logs to see what kind of errors are showing up there when you try to send yourself an email. And whatever you find, post it here so we can help :-)


Sat, 01/30/2010 - 10:47 (Reply to #4)

So I have several domains at my ISP. I have several domains on my server with virtualmin. On these domains I don't use a external mail server. I use my server as the mail server. On these domains email works great.

What I don't know is:

The two domains who don't work have companies mail-server. When I put the MX record at the ISP pointing to the companies mail-server, must in virtualmin Mail for domain be enabled or disabled?

Sat, 01/30/2010 - 10:56

When I put the MX record at the ISP pointing to the companies mail-server, must in virtualmin Mail for domain be enabled or disabled?

Aha, in that case, the mail feature in Virtualmin would be disabled. You'd only enable the mail feature for a given domain if you intend to accept email for that domain on your Virtualmin server.

Also, remember that if an IP address in your DNS changes, other DNS servers on the Internet may cache the old value for a day or two. So some things might not work right away.


Sat, 01/30/2010 - 11:09


And what do I do with the DNS records in virtualmin:

mail.domain.tld. IN A 1xx.2xx.3xx.4xx

domain.tld. IN MX 5 mail.domain.tld.

domain.tld. IN TXT "v=spf1 a mx a:domain.tld. ip4:1xx.2xx.3xx.4xx ?all"

do they stay? Or do I erase them?

Sat, 01/30/2010 - 11:11

Well, from what you've mentioned above, it sounds like you're not using Virtualmin as your DNS server; it sounds like you're using your ISP as your DNS server?

If Virtualmin isn't hosting this domains DNS, you'd want to disable the DNS feature.

Don't just erase the records, but you'd disable the feature altogether.


Sat, 01/30/2010 - 11:19 (Reply to #8)

Hi, I can't I'm hosting the websites from these domains on it.

In case of a problem with the server i can play a backup back on a second server and change the ip's on the ISP dns. So that the pages are fast online again.

Sun, 01/31/2010 - 07:14

I've noticed that wenn I Stop Bind on My Server the mails will be deliverd to the companies mail-server like I wanted. ???

I don't understand

Sun, 01/31/2010 - 10:26

So, you have a domain... let's say, example.com... at your domain name registrar. And that domain has two (or more) nameservers setup for example.com... perhaps something like ns1.domain.com and ns2.domain.com.

If ns1.domain.com and ns2.domain.com isn't a DNS server that you host... if ns1.domain.com and ns2.domain.com doesn't reside on your Virtualmin server -- that means someone else is hosting them.

And if someone else is hosting the DNS for example.com, that means you should not be using the DNS feature in Virtualmin for example.com.

So my recommendation would be to disable the DNS feature for the domain in question -- if your server is not the nameserver for this domain.


Wed, 02/03/2010 - 03:58

Hi Andreychek,

thank you for not giving me up. :)

Lets see if I understand you?

lets say I have a domain called blabla.com. I have a provider where I can register this domain blabla.com and where I can park blabla.com. At this Provider I can manage the dns records of blabla.com and I also have ns1.bubu.net and ns2.bubu.net which I don't manage.

domain: blabla.com

primary: ns1.bubu.net

mailbox: dns@bubu.net

namesrv: ns1.bubu.net

namesrv: ns2.bubu.net

mailsrv: mail.blabla.com 10

arecord: ns2

arecord: ns1

arecord: www

arecord: @

arecord: *

arecord: mail (IP Mail-Server at Company)

crecord: ftp www

crecord: pop mail

crecord: smtp mail

At MY SERVER (Virtualmin) I have the webcontent of blabla.com. I also can manage DNS.

$ttl 38400 @ IN SOA rs1.tata.net. root.rs1.tata.net. (

        38400 )

@ IN NS rs1.tata.net.

blabla.com. IN A

www.blabla.com. IN A

ftp.blabla.com. IN A

m.blabla.com. IN A

localhost.blabla.com. IN A

webmail.blabla.com. IN A

admin.blabla.com. IN A

ns.blabla.com. IN A

mail.blabla.com. IN A (IP Mail-Server at Company)

blabla.com. IN TXT "v=spf1 a mx a:blabla.eu. ip4: ?all"

Is this the part that is to much? If I disable dns will the content site still be online? DNS domain enabled off?

Greetings swingkid

Wed, 02/03/2010 - 11:40


So your domain, blabla.com, has two nameservers, as you expressed above. Those are ns1.bubu.net and ns2.bubu.net.

If you aren't the one hosting ns1.bubu.net and ns2.bubu.net... if those aren't nameservers running on your Virtualmin server that you manage -- then you don't want Virtualmin's DNS feature enabled.

Virtualmin's DNS feature means "Hey, I'm hosting DNS for this domain".

But it sounds like in your case, you aren't. DNS for your domain is hosted over at bubu.net.

What DNS does is provide a way for browsers to get your server's IP address when someone browses to blabla.com.

Since that IP address is being given out by ns1.bubu.net and ns2.bubu.net, the only thing running the DNS feature on your server will do is cause trouble :-)

Now, you asked, "will disabling DNS cause the content of your site to be offline?"

When you stopped the BIND service, did your web content still work?

Disabling the DNS feature simply removes the blabla.com zone from your DNS server... which is certainly no worse than turning off the daemon :-)

So if ns1.bubu.net and ns2.bubu.net are DNS servers hosted at some other site, I really would recommend going into Edit Virtual Server for blabla.com, and disabling the DNS feature -- it's not actually doing anything.

You can always re-enable it afterwards if you don't like the results :-)

And if you're really worried, just do a full backup of your Virtual Server before making any changes (though, of course, you should be making backups for your Virtual Servers every night ;-)


Thu, 02/11/2010 - 16:09

Hi andreychek,

I thank you very much for your help. I disabled Bind and indeed it worked for almost all domains. The Domains I imported from Plesk 8 had stil the same problem. After deleting and creating them again (No Import) it also worked for these. ??

Thanks again :)

Topic locked