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

📄 lsg35.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<BR>







<PRE>







<FONT COLOR="#000080">define(DEFAULT_HOST, merlin.tpci.com)dnl</FONT></PRE>







<P>If you do not set a valid name for the DEFAULT_HOST variable, no mail will be returned properly to your system.







<BR>







<P>If your system is not a mail gateway to the Internet (or other networks that are accessible from your LAN), you can set your Linux system to send mail on to another machine for processing by setting the RELAY_HOST and RELAY_MAILER variables in sendmail.c4. These variables set the name of the mail server that all mail should be passed on to. For example, to set your local system to route all outbound mail to a machine called wizard, you set the following two lines as shown:







<BR>







<PRE>







<FONT COLOR="#000080">define(RELAY_HOST, wizard)dnl







define(RELAY_MAILER, UUCP=A)dnl</FONT></PRE>







<P>The RELAY_MAILER line specifies the mailer to use to send messages on to the RELAY_HOST.







<BR>







<BR>







<A NAME="E69E220"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>UUCP-Specific Modifications</B></FONT></CENTER></H4>







<BR>







<P>If you are working with a UUCP-based mail system, you should modify a few more entries in the sendmail.m4 file. These modifications are necessary because a UUCP mail system is often addressed differently than a DNS-based system. The UUCP-specific entries in the sendmail.m4 file usually look like the following:







<BR>







<PRE>







<FONT COLOR="#000080">define(UUCPNAME, tpci)dnl







define(UUCPNODES, |uuname|sort|uniq)dnl







define(BANGIMPLIESUUCP)dnl







define(BANGONLYUUCP)dnl</FONT></PRE>







<P>The first line defining UUCPNAMES specifies the name of the local system in UUCP terms. This name can be different than the name used in DNS, although usually these names will be similar. The UUCPNODES variable defines the commands that are used to produce a list of hostnames for systems you connect to via UUCP.







<BR>







<P>The BANGIMPLIESUUCP variable tells sendmail to assume that any address containing an exclamation mark (called a bang) is UUCP style. The BANGONLYUUCP variable does the same thing. Both variables are usually set to on (not commented out) because few DNS users use the bang addressing method.







<BR>







<BR>







<A NAME="E69E221"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Configuration Table Locations</B></FONT></CENTER></H4>







<BR>







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







<BR>







<PRE>







<FONT COLOR="#000080">define(ALIASES, LIBDIR/aliases)dnl







define(DOMAINTABLE, LIBDIR/domaintable)dnl</FONT></PRE>







<P>There are 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 locations.







<BR>







<BR>







<A NAME="E69E222"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Configuring decnetxtable</B></FONT></CENTER></H4>







<BR>







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







<BR>







<BR>







<A NAME="E69E223"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Configuring domaintable</B></FONT></CENTER></H4>







<BR>







<P>The domaintable file forces sendmail 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. Suppose you often send mail to the host reallylongname.reallybignet.com, but you don't want to type that entry each time. You could place the following entry in the domaintable file







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">reallylongname.reallybignet.com big.com</FONT></PRE>







<P>so that whenever you send mail to bill@big.com sendmail expands the address to bill@reallylongname.reallybignet.com. You also can use the domaintable file to correct common typographic mistakes. For example, if many users accidently send mail to abcdef.com instead of abcdfe.com, you could add a line to the domaintable file that corrects the domain name:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">abcdfe.com abcdef.com</FONT></PRE>







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







<BR>







<BR>







<A NAME="E69E224"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Configuring genericfrom</B></FONT></CENTER></H4>







<BR>







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







<BR>







<BR>







<A NAME="E69E225"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Configuring mailertable</B></FONT></CENTER></H4>







<BR>







<P>The mailertable table defines any special handling for hosts or domains. Most often, mailertable specifies how certain domains or hosts are accessed and which protocol to use for these domains and hosts. You don't have to modify this file if your system only uses UUCP, but you should verify its contents if you use SMTP or DNS.







<BR>







<P>The mailertable file is read from the first line down, and sendmail processes mail based on each line in the file. For this reason, place the most specific rules at the top of the file, followed by more general rules. Rules give the method of connection first and then list the remote system or domain:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">mailer delimiter relayname remote</FONT></PRE>







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







<BR>















<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







TCP-A







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







TCP with Internet-style addresses</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







TCP-U







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







TCP with UUCP-style addresses</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







UUCP-A







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







UUCP with Internet-style addresses</FONT>







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







<BR>















<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







!







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Strips the hostname from the address before forwarding</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







,







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Doesn't modify the address at all</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







:







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Removes the hostname only if intermediate hosts are specified</FONT>







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







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">UUCP-A,wizard roy.sailing.org</FONT></PRE>







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







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">TCP-A,wizard chatton.com</FONT></PRE>







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







<BR>







<BR>







<A NAME="E69E226"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Configuring pathtable</B></FONT></CENTER></H4>







<BR>







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







<BR>







<BR>







<A NAME="E69E227"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Configuring uucprelays</B></FONT></CENTER></H4>







<BR>







<P>The uucprelays file short-circuits the UUCP path to a remote site when a better path exists. For example, if your users often use the path wizard!bignet!merlin!tpci and you create a direct link to tpci, you could use the uucprelays file to redirect the mail.







<BR>







<BR>







<A NAME="E69E228"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B> Configuring uucpxtable</B></FONT></CENTER></H4>







<BR>







<P>The uucpxtable file is used when a UUCP style address has to 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.







<BR>







<P>This file contains entries that lists the UUCP style name followed by the domain name, as follows:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">chatton chatton.com</FONT></PRE>







<P>This entry tells sendmail that any mail for chatton.com should be rerouted via UUCP to chatton (UUCP style addressing). This entry forces mail addresses to yvonne@chatton.com to be rewritten as chatton!yvonne, an address that UUCP can handle.







<BR>







<BR>







<A NAME="E69E229"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Building sendmail.cf from sendmail.m4</B></FONT></CENTER></H4>







<BR>







<P>Now that you have configured the sendmail.m4 file and its dependent files, you can use the m4 processor to generate the sendmail.cf file. When the sendmail.m4 file is ready to be processed, issue the command







<BR>







<BR>







⌨️ 快捷键说明

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