⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 706-708.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Linux Unleashed, Third Edition:Configuring Linux for Mail</TITLE>

<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0672313723//-->

<!--TITLE=Linux Unleashed, Third Edition//-->

<!--AUTHOR=Tim Parker//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Sams//-->

<!--CHAPTER=40//-->

<!--PAGES=706-708//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="704-706.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="708-711.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H4 ALIGN="LEFT"><A NAME="Heading5"></A><FONT COLOR="#000077">Configuration Table Locations</FONT></H4>

<P>There are several lines in the <TT>sendmail.m4</TT> file that define configuration tables. For the most part, these configuration files are under the directory defined by <TT>LIBDIR</TT>. This section of the <TT>sendmail.m4</TT> file has several lines that look like</P>

<!-- CODE SNIP //-->

<PRE>

define(ALIASES, LIBDIR/aliases)dnl

define(DOMAINTABLE, LIBDIR/domaintable)dnl

</PRE>

<!-- END CODE SNIP //-->

<P>and so on for about seven configuration file definitions in total. You can change any of these values if you want, but be sure to move the files themselves to the specified location. On the whole, it is best to leave the files in their default location.

</P>

<P>The file <TT>decnetxtable</TT> is used to translate domain names into DECnet style names. This is a holdover from earlier versions of <TT>sendmail</TT> and will probably never be necessary for Linux users (unless your Linux machine is on a DECnet system).</P>

<P>The <TT>domaintable</TT> file is used to force <TT>sendmail</TT> to perform specific instructions after using DNS. The file, which is almost never used on Linux systems, allows you to provide expansion of short-form names. For example, suppose you often send mail to the host <TT>reallylongname.reallybignet.com</TT> but don&#146;t want to type that entry each time. You can place an entry in the domaintable file that looks like</P>

<!-- CODE SNIP //-->

<PRE>

reallylongname.reallybignet.com    big.com

</PRE>

<!-- END CODE SNIP //-->

<P>so that whenever you send mail to <TT>bill&#64;big.com</TT> it is expanded by <TT>sendmail</TT> to <TT>bill&#64;reallylongname.reallybignet.com</TT>. The <TT>domaintable</TT> file can also be used to correct common typographic mistakes. For example, if you find many users sending mail to <TT>abcdef.com</TT> instead of <TT>abcdfe.com,</TT> you can add a line to the <TT>domaintable</TT> file that corrects the domain name. Such a line looks like this:</P>

<!-- CODE SNIP //-->

<PRE>

abcdfe.com    abcdef.com

</PRE>

<!-- END CODE SNIP //-->

<P>The format of the file is always correct domain followed by the incorrect (or shortened) domain name.

</P>

<P>The <TT>genericfrom</TT> table is used to hide local usernames and machine addresses by converting local usernames to a generic ID that has no obvious connection to the username. It is seldom used by Linux systems because the general convention is to use real names on email and similar data. The companion file, <TT>xaliases</TT>, performs the generic to real conversion when mail comes back from the outside world.</P>

<P>The <TT>mailertable</TT> table is used to define any special handling for hosts or domains. Most often, <TT>mailertable</TT> is used to specify how certain domains or hosts are accessed and which protocol to use for them. This file doesn&#146;t have to be modified if your system only uses UUCP, but if you use SMTP or DNS, you should verify its contents.</P>

<P>The <TT>mailertable</TT> file is read from the first line down, and <TT>sendmail</TT> processes mail based on each line in the file. For this reason, place the most specific rules at the top of the file, with more general rules after. Rules are specified in a format that gives the method of connection, then the remote system or domain. The syntax is</P>

<!-- CODE SNIP //-->

<PRE>

mailer delimiter relayname  remote

</PRE>

<!-- END CODE SNIP //-->

<P>where <TT>mailer</TT> is the transport to use, <TT>delimiter</TT> is a special character, <TT>relayname</TT> is the name of the system to pass the mail to, and <TT>remote</TT> is the remote host or domain name. The <TT>mailer</TT> can be one of the following values:</P>

<DL>

<DD><B>&#149;</B>&nbsp;&nbsp;TCP-A TCP with Internet-style addresses

<DD><B>&#149;</B>&nbsp;&nbsp;TCP-U TCP with UUCP-style addresses

<DD><B>&#149;</B>&nbsp;&nbsp;UUCP-A UUCP with Internet-style addresses

</DL>

<P>The <TT>delimiter</TT> has a special meaning and must be one of the following characters:</P>

<DL>

<DD><B>&#149;</B>&nbsp;&nbsp;! strips the hostname from the address before forwarding

<DD><B>&#149;</B>&nbsp;&nbsp;, doesn&#146;t modify the address at all

<DD><B>&#149;</B>&nbsp;&nbsp;: removes the hostname only if there are intermediate hosts specified

</DL>

<P>The <TT>mailertable</TT> rules can be built quite easily when you are forwarding mail to a remote mail server. For example, to force <TT>sendmail</TT> to use UUCP through a remote mail server called <TT>wizard</TT> to connect to the remote system <TT>roy.sailing.org</TT>, add a rule like this to the mailertable file:</P>

<!-- CODE SNIP //-->

<PRE>

UUCP-A,wizard  roy.sailing.org

</PRE>

<!-- END CODE SNIP //-->

<P>On a more general level, you can have a rule like this one

</P>

<!-- CODE SNIP //-->

<PRE>

TCP-A,wizard  chatton.com

</PRE>

<!-- END CODE SNIP //-->

<P>which forwards any mail destined for the remote network <TT>chatton.com</TT> to the local mail server wizard via TCP.</P>

<P>The <TT>pathtable</TT> table is used to define explicit routing to remote hosts and networks. The format of each line in the <TT>pathtable</TT> file uses a syntax similar to a UUCP path alias, with entries appearing alphabetically in the file. The use of the <TT>pathtable</TT> file is rare because most Linux systems can handle the routing without explicit instructions.</P>

<P>The <TT>uucprelays</TT> file is used to short-circuit the UUCP path to a remote site when there is a better path. For example, if your users often use the path <TT>wizard!bignet!merlin!tpci</TT> and you create a direct link to <TT>tpci</TT>, you can use <TT>uucprelays</TT> to redirect the mail. This file is seldom used by Linux system users.</P>

<P>The <TT>uucpxtable</TT> file is used when a UUCP-style address must be used for mail delivery. The file provides the instructions for converting a DNS format address to a UUCP format address. If you are using a mail server other than your current machine or want to use UUCP to connect to specific machines because of reliability factors, this table is necessary.</P>

<P>This file contains a number of entries that has a format that gives the UUCP style name followed by the domain name, such as this one:</P>

<!-- CODE SNIP //-->

<PRE>

chatton    chatton.com

</PRE>

<!-- END CODE SNIP //-->

<P>This tells <TT>sendmail</TT> that any mail for <TT>chatton.com</TT> should be rerouted via UUCP to <TT>chatton</TT> (UUCP-style addressing). This forces mail addresses to let&#146;s say, <TT>yvonne&#64;chatton.com</TT> to be rewritten as <TT>chatton!yvonne</TT>, which can be handled by UUCP.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="704-706.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="708-711.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -