From Fedora Project Wiki
m (1 revision(s))
m (Docs/Drafts/AdministrationGuide/Servers/DNSBIND/BINDmail moved to Archive:Docs/Drafts/AdministrationGuide/Servers/DNSBIND/BINDmail: This page references a newer draft version. Archiving old page tree then I'll go back and redirect to the new.)
 
(No difference)

Latest revision as of 17:50, 4 March 2009

DNS and BIND

DNS and Mail

An email address is made up of a user section and a domain section. The user section is in front of the @ and the domain follows after. For local delivery the MTA does not need to perform a DNS query, but when transferring mail to an outside domain it does.

When sending mail outside your own domain the MTA will query for an MX record for the domain specified in the email address. If sending mail to testuser@testdomain.com the MTA will essentially dig MX testdomain.com ­ this will give the MTA the information needed to transfer mail to the testdomain.com domain.

One thing that makes mail different to a normal DNS query is that mail may not be going to the exact machine specified in the address. An example will make this clearer: sending mail to testuser@testdomain.com probably will not send mail to a machine called testdomain.com, but more likely mail.testdomain.com. This is achieved with MX and A records as shown earlier. If the mail server is in your domain you need an A record. A common configuration problem, although providing a working solution, is to have MX records pointing to a CNAME:

IN MX 10 mail.testdomain.com.
mail IN CNAME server1
server1 IN A 192.168.0.1

This configuration works but can result in the CNAME being lost. There is an A record for server1 and a CNAME for the MX record, but nothing to join them. This can cause mail to be lost. The correct configuration would be as follows:

IN MX 10 mail.testdomain.com.
mail IN A 192.168.0.1
server1 IN CNAME mail

A records for mail and server1 both pointing to 192.168.0.1 is also acceptable.

Administration Guide - TOC Previous Page - Cache-only Nameserver Next Page - Security Tips