1829030 Members
2430 Online
109986 Solutions
New Discussion

DNS MX record

 
SOLVED
Go to solution
'chris'
Super Advisor

DNS MX record

hi

I have a public domain and would like to create the correct MX record on my DNS server BIND 9

the MAIL server should run on the same machine like DNS server.

my MX record:

# cat /etc/bind/domain.net.hosts
$ttl 38400
domain.net. IN SOA ns.domain.net. admin.domain.net. (
2006090525
10800
3600
604800
38400 )
IN NS ns.domain.net.
IN NS ns1.isp.net.
IN NS ns3.isp.net.
IN A 202.X.X.10
ns IN A 202.X.X.10
www IN A 202.X.X.10
IN MX 1 202.X.XX.10


but if I do a DNS test at:

http://www.dnsreport.com

I get the following error:

MX Category ERROR: I couldn't find any MX records for domain.net. If you want to receive E-mail on this domain, you should have MX record(s). Without any MX records, mailservers should attempt to deliver mail to the A record for domain.net. I can't continue in a case like this, so I'm assuming you don't receive mail on this domain.

what's wrong and howto solve this problem ?
11 REPLIES 11
ryan_gray
Occasional Advisor

Re: DNS MX record

Hello,
At first glance, the format of the file that you posted looks like a secondary (slave) file for a domain. Are you sure you're modifying the file on the primary (master) server for that domain? Also, make sure you're reloading the zone after incrementing the serial number in the master file. You can do an rndc reload domain.net or restart your named.
Alexander Chuzhoy
Honored Contributor

Re: DNS MX record

Your last line is responsible for DNS.
Since you ommit the first parameter that stands for domain/host, it's copied from a previous one (www in your case).
Add the name of your domain in the beginning of the last line, so it'll look like the following:

domain.net. IN MX 1 202.X.XX.10
Ivan Ferreira
Honored Contributor

Re: DNS MX record

I will suggest the change of the location of the MX records. Theorically, the order should not matter, but in my experience it does. Configure your zone file like this:

# cat /etc/bind/domain.net.hosts
$ttl 38400
domain.net. IN SOA ns.domain.net. admin.domain.net. (
2006090525
10800
3600
604800
38400 )
IN NS ns.domain.net.
IN NS ns1.isp.net.
IN NS ns3.isp.net.
IN MX 1 202.X.XX.10
IN A 202.X.X.10
ns IN A 202.X.X.10
www IN A 202.X.X.10


That is, move your MX record below NS records. You don't need dnsreport.com to test it, just use:

dig @localhost ns.domain.net MX

You should get the MX address in the ANSWER SECTION.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
'chris'
Super Advisor

Re: DNS MX record

@ryan_gray

yep,
this is master zone file and I'm 100% sure.





'chris'
Super Advisor

Re: DNS MX record

I changed to:

mail IN A 202.X.X.10
domain.net. IN MX 1 mail.domain.net.

and if I do a test now, then I'm getting:

SPF record
Your domain does not have an SPF record. This means that spammers can easily send out E-mail that looks like it came from your domain, which can make your domain look bad (if the recipient thinks you really sent it), and can cost you money (when people complain to you, rather than the spammer). You may want to add an SPF record ASAP, as 01 Oct 2004 was the target date for domains to have SPF records in place (Hotmail, for example, started checking SPF records on 01 Oct 2004).

howto create SPF record ?
Alexander Chuzhoy
Honored Contributor

Re: DNS MX record

link with examples followed by explanations:
http://www.openspf.org/dns.html
Steven E. Protter
Exalted Contributor

Re: DNS MX record

Shalom,

named-checkconf named-checkzone

Don't use dndsreport.com to check your work, use OS utilities. There is a very common delay in data getting to the checksites.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vitaly Karasik_1
Honored Contributor
Solution

Re: DNS MX record

I'll vote for using online Internet tools for verifying public services (DNS, mail, etc.) instead of local tests because there are many configuration errors that you cannot detect using local tools - like slave DNS server out of sync, mail open relays, routing problems, etc.
'chris'
Super Advisor

Re: DNS MX record

yep, that's true

in my case named-checkzone showed evrytime OK, but was not OK.
Al Licause
Trusted Contributor

Re: DNS MX record

Don't know if you have this working yet, but I took what you had and got it working in this form:

$ttl 38400
$ORIGIN domain.net.
domain.net. IN SOA ns.domain.net. admin.domain.net. (
2006090525
10800
3600
604800
38400 )
IN NS ns.domain.net.
IN NS ns1.isp.net.
IN NS ns3.isp.net.
IN MX 1 202.0.0.10

$ORIGIN domain.net.
IN A 202.0.0.10
ns IN A 202.0.0.10
www IN A 202.0.0.10

That first A record is incomplete.


'chris'
Super Advisor

Re: DNS MX record

yep, this problem was already solved !

there are my zone entries:

# cat /etc/bind/domain.net.hosts
$ttl 38400
domain.net. IN SOA ns.domain.net. admin.domain.net. (
2006090525
10800
3600
604800
38400 )
IN NS ns.domain.net.
IN NS ns1.isp.net.
IN NS ns3.isp.net.
IN A 202.X.X.10
ns IN A 202.X.X.10
www IN A 202.X.X.10

mail IN A 202.X.X.10
IN MX 1 mail.domain.net.