old-www/LDP/LG/issue45/pollman/dns_mail.html

102 lines
4.8 KiB
HTML

<!--startcut ==========================================================-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Mail for the Home Network--DNS for Mail LG #45</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000">
<!--endcut ============================================================-->
<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>
<P> <HR> <P>
<!--===================================================================-->
<center>
<H4><font color="maroon">Mail for the Home Network</font></H4>
<H1><font color="maroon">DNS for Mail</font></H1>
<H4>By <a href="mailto:jpollman@bigfoot.com">JC Pollman</a>
and <a href="mailto:bill.mote@bigfoot.com">Bill Mote</a></H4></center>
</center>
<P> <HR> <P>
<p>In last month's article we set up dns as a name server for network.
Sendmail, and most other mail transport programs, use dns to decide where
to send the mail, but we need to modify it a bit.&nbsp; The name-to-ip
file has to have a MX line for each computer, which essentially says: for
this computer, use this other computer for storing mail.
<p>The file from last month looks like this. Note, the *** are not part
of the file:
<br>**************************************************************
<br><tt>@&nbsp; IN SOA master.kulai.org. jpollman.kulai.org. (</tt>
<br><tt>&nbsp;&nbsp; 1;</tt>
<br><tt>&nbsp;&nbsp; 10800;</tt>
<br><tt>&nbsp;&nbsp; 3600;</tt>
<br><tt>&nbsp;&nbsp; 604800;</tt>
<br><tt>&nbsp;&nbsp; 86400 );</tt>
<p><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN NS&nbsp;&nbsp; master.kulai.org.</tt>
<br><tt>master&nbsp; IN A&nbsp;&nbsp;&nbsp; 192.168.124.10</tt>
<br>&nbsp;
<p><tt>mail&nbsp;&nbsp;&nbsp; IN A 192.168.124.10</tt>
<br><tt>www&nbsp;&nbsp;&nbsp;&nbsp; IN A 192.168.124.10</tt>
<br><tt>news&nbsp;&nbsp;&nbsp; IN A 192.168.124.10</tt>
<p><tt>localhost&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp; 127.0.0.1</tt>
<p><tt>fserver IN A&nbsp; 192.168.124.11</tt>
<br><tt>jc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A&nbsp; 192.168.124.1</tt>
<br><tt>phillip IN A&nbsp; 192.168.124.20</tt>
<p>**************************************************************
<p>We change this to add in the MX lines. Note: the Bold items are explained
below and are not part of the format of the file. It now looks like this:
<p>**************************************************************
<br><tt>@&nbsp; IN SOA master.kulai.org. jpollman.kulai.org. (</tt>
<br><tt>&nbsp;&nbsp; 2</tt>
<br><tt>&nbsp;&nbsp; 10800</tt>
<br><tt>&nbsp;&nbsp; 3600</tt>
<br><tt>&nbsp;&nbsp; 604800</tt>
<br><tt>&nbsp;&nbsp; 86400 )</tt>
<p><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IN NS&nbsp;&nbsp; master</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>
IN MX 10 master</b></tt>
<br><tt>master&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp; 192.168.124.10</tt>
<br><b><tt>master&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN MX 10 master</tt></b>
<p><tt>mail&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A 192.168.124.10</tt>
<br><tt>www&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A 192.168.124.10</tt>
<br><tt>news&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A 192.168.124.10</tt>
<p><tt>localhost&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp; 127.0.0.1</tt>
<p><tt>fserver&nbsp;&nbsp;&nbsp;&nbsp; IN A&nbsp; 192.168.124.11</tt>
<br><b><tt>fserver&nbsp;&nbsp;&nbsp;&nbsp; IN MX 10&nbsp; master</tt></b>
<p><tt>jc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN A&nbsp;
192.168.124.1</tt>
<br><b><tt>jc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IN
MX 10 master</tt></b>
<p><tt>phillip&nbsp;&nbsp;&nbsp;&nbsp; IN A 192.168.124.20</tt>
<br><b><tt>phillip&nbsp;&nbsp;&nbsp;&nbsp; IN MX 10 master</tt></b>
<br>**************************************************************
<br>Now each computer's (master, fserver, jc, phillip) email server is
master.kulai.org (actually it is called a "mail exchanger", but since we
have only one computer server mail, it functions as a email server.) We
also have a line with no name that points to master.kulai.org as the email
server - this is for the domain: kulai.org. You noticed there is a "10"
in each line.&nbsp; The number, 10 in this case, is a relative value, and
is used when you have multiple mail exchangers - something we are not covering
here. Note, failure to put the number in will cause an error in named.
Now, restart named, and check /var/log/messages for any errors.
<p>You have to put a line in for each computer: kulai.org by itself will
not work.
<br>&nbsp;
<br>&nbsp;
<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1999, JC Pollman and Bill Mote <BR>
Published in Issue 45 of <i>Linux Gazette</i>, September 1999</H5></center>
<!--===================================================================-->