[lug] MX records in DNS

David Morris lists at morris-clan.net
Tue Dec 18 16:35:22 MST 2001


First, I should clear up some mis-information in previous replies:

1) If a host name is not provided, the previous host *is* inherited.  I do
this for my DNS records, so I guarantee it works.  That is simply the way
the DNS system is designed, at least assuming a properly functioning
DNS server...

2) the host "web.host.dom" does not need a SMTP server.  What is happening,
however, is that an MX record does *not* change the host name on email,
merely the server the email is sent to.  Thus, your mail server at
"mail.host.dom" must accept email directed to the domain "web.host.dom",
frequently also including virtual address mappings from the domain
"web.host.dom" to local users.  In your specific examply, any email sent to
"hugh at web.host.dom" will still go to "hugh at web.host.dom", but it will be
*received* by the *server* "mail.host.dom", which will accept or reject the
message depending on if the mail server is setup to accept or reject that
particular domain name.

Number 2 above might be your problem....you would receive an error out of
email if your mail server is rejecting mail for "web.host.dom".

In your DNS record, I do see one discrepancy....don't know it is exactly a
problem, but possibly.  Usually, the MX record priority is a number above
zero, normally an multiple of 10.  This simply allows for flexibility in
future changes.  For instance,  my MX records for one domain:

---

; Mail Server Defaults
            IN  MX      10 mail
            IN  MX      20 mail2

---

In the above, note also that I use these settings as defaults for the
entire record.  They appear just after NS records, which in turn are just
after the SOA record in my file.  Again, I don't know if this is a problem,
might just a violation of common convention.

If you are still having problems after taking all of the above into
account, send log files from (a) your mail server when you send a message
(if it shows any entries in the log), (b) your mail client (the exact reply
you get from a mail server, or the error message given), and (c) your DNS
server when it is first started.  These should show where the problem is
occuring.

Also, be certain you are remembering to update the serial number each time
you make a change to the DNS record...can't tell you how many times I've
been bitten by this! :)

--David

(BTW, while I am fairly certain of the above, there is -- as always -- a
possibility I am sitting out in the middle of nowhere babbling
incoherantly.  If this is the case, please someone slap me and correct the
above)

On Tue, Dec 18, 2001 at 04:59:03PM -0500, Hugh Brown wrote:
> I am having some troubles with MX records for a web server.
> 
> I have a host named web.host.dom and a host named mail.host.dom
> 
> In dns I have the following
> 
> 
> host.dom.      IN      SOA     ns.host.dom.     hostmaster.ns.host.dom.
> (
>                         2001090912 ; serial
>                         3600 ; refresh after 1 hour
>                         900 ; retry after 15 minutes
>                         604800 ; expire after 1 week
>                         1800 ; default_ttl is 1 hour
>                         )
> 
> web                     IN      A       xxx.xxx.xxx.xxx
>                         IN      MX 0    mail
> 
> 
> 
> mail                    IN      A       xxx.xxx.xxx.xxx
>                         IN      MX 0    mail
> 
> 
> I assumed this meant that if I sent an email to hugh at web.host.dom that
> it should get sent to hugh at mail.host.dom
> 
> I tried it and got a bounced message back saying undeliverable.
> 
> Help.
> 
> Hugh
> 
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug



More information about the LUG mailing list