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

📄 714-716.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=714-716//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="711-714.html">Previous</A></TD>

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

<TD><A HREF="716-718.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<P><FONT SIZE="+1"><B>Configuring smail for TCP Use</B></FONT></P>

<P>If you are going to use a network connection to transfer mail, you need to make modifications to the <TT>/usr/lib/smail/config</TT> file that specify the types of connections and host names. There are several different methods of configuring mail systems for a network, including using NFS (Network File System) to allow a single configuration file that is shared by all machines, using POP (Post Office Protocol) or IMAP (Interactive Mail Access Protocol) to handle mail on a central site, and setting up each machine as an independent mail handler. The configuration process for all these methods is much the same, the difference being whether the configuration files reside on each machine in the network or on a single machine that is then accessed by NFS or SMTP by other machines.</P>

<P>Start the configuration process by establishing the local domain names using the variables <TT>visible_domain</TT> and <TT>visible_name</TT>. These were discussed in detail in the previous section on configuring <TT>smail</TT> for UUCP, so we&#146;ll limit the explanation to showing final examples of these two variables. An example of these variable definitions looks like this:</P>

<!-- CODE SNIP //-->

<PRE>

# Our domain name

visible_domain=tpci.com

# Our domain name for outgoing mail

visible_name=tpci.com

</PRE>

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

<P>This sets the local domain name and domain resolution names. The entry for <TT>visible_domain</TT> is used by <TT>smail</TT> to attach to all outgoing mail packages (instead of whatever name is generated by the hostname command). Both <TT>visible_domain</TT> and <TT>visible_name</TT> are often the same.</P>

<P>The next configuration step is to set the name of a smart host that handles out-of-network messages. If you are not using a smart host or your machine handles the network connections itself, you won&#146;t need to enter these values. The variables involved in setting up a smart host are <TT>smart_path</TT> and <TT>smart_transport</TT>. The <TT>smart_path</TT> sets the machine name of the smart host (which must be resolvable with the domain name given in <TT>visible_domain</TT>). The <TT>smart_transport</TT> specifies the type of protocol to be used to connect to the smart host. Since most smart hosts communicate (for mail purposes, at least) with SMTP, that is the most often used value, as shown in this extract from a <TT>/usr/lib/smail/config file</TT>:</P>

<!-- CODE SNIP //-->

<PRE>

# smart host routing

# smart host name

smart_host=merlin

# communications protocol to smart host

smart_transport=smtp

</PRE>

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

<P>The <TT>smart_transport</TT> value of &#147;<TT>smtp</TT>&#148; (lowercase letters only) is used to identify the SMTP connection protocol.</P>

<H3><A NAME="Heading11"></A><FONT COLOR="#000077">Modifying Behavior of smail</FONT></H3>

<P>The configuration files and processes previously mentioned apply to most Linux systems, and many systems require no further actions than those already covered. However, as mentioned earlier in this chapter, three components in <TT>smail</TT> (router, director, and transport) can each be further configured to modify their behavior. This can help you fine-tune or modify your <TT>smail</TT> installation to meet particular network needs. The only component we really need to examine in detail is the router because the director and transport seldom need customization for a typical Linux installation.</P>

<P>In most cases, the behavior of each <TT>smail</TT> component is handled by a file (or several files) based in the <TT>smail</TT> configuration directory (usually <TT>/usr/lib/smail</TT>). There are many sample configuration files available from Linux distribution CD-ROMs and FTP sites that show different configurations, and to obtain one of these sample files and then modify it to your host-specific details is easier than building the files from scratch. The number of options and details change with the release of <TT>smail</TT>, so check to see whether you have a complete version.</P>

<P>The router component of <TT>smail</TT> handles the resolution of destination addresses, routing to the next mail host for further forwarding, and determination of which transport should be used to send the message on. The router component performs a number of tasks, first determining whether the message is for a local or remote machine (using the variable values defined in <TT>/usr/lib/smail/config</TT>). If the message is for a local machine, the message is handed off to the director.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="711-714.html">Previous</A></TD>

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

<TD><A HREF="716-718.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 + -