📄 ch45.htm
字号:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<UL>
<LI><A HREF="#Heading1">- 45 -</A>
<UL>
<LI><A HREF="#Heading2">Mail and News</A>
<UL>
<LI><A HREF="#Heading3">Mail</A>
<UL>
<LI><A HREF="#Heading4">Mail Transport Agents</A>
<LI><A HREF="#Heading5">smail</A>
<LI><A HREF="#Heading6">sendmail</A>
<LI><A HREF="#Heading7">Local Delivery Agents</A>
<LI><A HREF="#Heading8">Mail User Agents</A>
</UL>
<LI><A HREF="#Heading9">News</A>
<UL>
<LI><A HREF="#Heading10">News Transport Software</A>
<LI><A HREF="#Heading11">InterNetNews (INN)</A>
<LI><A HREF="#Heading12">Newsreaders</A>
</UL>
<LI><A HREF="#Heading13">Summary</A>
</UL>
</UL>
</UL>
<P>
<HR SIZE="4">
<H2 ALIGN="CENTER"><A NAME="Heading1<FONT COLOR="#000077">- 45 -</FONT></H2>
<H2 ALIGN="CENTER"><A NAME="Heading2<FONT COLOR="#000077">Mail and News</FONT></H2>
<P><I>by Tim Parker</I></P>
<P>IN THIS CHAPTER</P>
<UL>
<LI>Mail
<P>
<LI>News
</UL>
<P>If you have access to other machines through a local area network or through the
Internet, you will probably want to install the mail and news software. Both offer
a lot of interaction with other users and add a whole new dimension to your Linux
system.</P>
<P>To handle electronic mail, most systems rely on UUCP (UNIX-to-UNIX Copy). Setting
up UUCP is covered in many different online guides and documents, as well as in most
UNIX books and this book. You can exchange e-mail with other users, or with the world
at large, by connecting to an Internet service provider such as UUNET Technologies.</P>
<P>Reading Usenet newsgroups is a little more complicated, because you have to download
the news yourself (100MB per day!) or connect to a site that offers <TT>news</TT>--a
news server. Linux includes the software to connect you, although most users will
find it easier to use an online service such as CompuServe or Delphi for news access.</P>
<P>In this chapter we look at the following:
<UL>
<LI>The types of mail software you can use
<P>
<LI>Simple UUCP-based configuration of e-mail systems
<P>
<LI>Setting your machine to access Usenet newsgroups
</UL>
<H3 ALIGN="CENTER"><A NAME="Heading3<FONT COLOR="#000077">Mail</FONT></H3>
<P>If you installed Linux from a CD-ROM (such as the Slackware distribution included
with this book), one of the installation options was to install the e-mail systems.
Some Linux distributions give you a choice of mail packages, whereas others default
to one particular type.</P>
<P>During the installation, most Linux setup procedures will install the software
properly except for some configuration information about the network. With this kind
of installation, there is little you have to do with the mail system except add your
host name and configure UUCP (if you are using it to connect to other systems to
transfer Mail).</P>
<P>If you didn't get Mail with your Linux system, you will have to pick up one of
the archive libraries from an FTP site, or from a user group or CD-ROM utility disk.
In this case, installation procedures are included as part of the archive.</P>
<P>Mail software for most UNIX systems (including Linux) has two components: a transport
and a mailer. The transport is the low-level software that takes care of delivering
the mail, both locally and across other machines. Users never work with the transport,
although system administrators must configure it and understand the basic principles.
The mailer is the user interface that presents mail to the user and accepts new mail.
Many mailers are available.
<H4 ALIGN="CENTER"><A NAME="Heading4<FONT COLOR="#000077">Mail Transport Agents</FONT></H4>
<P>Transport agents are the underlying software that connects your local machine
to remote systems. Several transport agents are available with Linux, but the most
commonly used are called smail (for send mail) and sendmail. You can find both on
the CD that accompanies this book. The program you use probably will be determined
by the Linux software supplied to you.</P>
<P>The <TT>smail</TT> and <TT>sendmail</TT> programs are ideally suited for sites
that rely on UUCP for mail (either between other machines or to an Internet service
provider), and they can be used with some SMTP (Simple Mail Transfer Protocol) sites.
<TT>smail</TT> and <TT>sendmail</TT> are usually provided as an executable binary
form with most Linux distributions, although only one of the transport agents is
usually supplied.</P>
<P>The configuration changes needed to set up <TT>smail</TT> or <TT>sendmail</TT>
on your Linux system depend on the type of connection you have to the outside world.
<H4 ALIGN="CENTER"><A NAME="Heading5<FONT COLOR="#000077">smail</FONT></H4>
<P>If you are running a UUCP-based mail system and you use a remote system for all
processing to other sites (usually used with local area networks that employ a communications
server), the changes to your system configuration files are minimal.</P>
<P>The changes occur in the files <TT>/usr/local/lib/smail/config</TT> and <TT>/usr/local/lib/smail/paths</TT>.
Look for the lines that have to do with hostname and subdomain names and perform
the following changes:
<UL>
<LI>Replace <TT>subdomain.domain</TT> with your machine's domain name.
<P>
<LI>Replace <TT>myhostname</TT> with your "undomainized" hostname.
<P>
<LI>Replace <TT>my_uucp_neighbor</TT> with the UUCP name of your upstream site.
</UL>
<P>For example, the following extract shows the settings for a machine called <TT>vader</TT>
that attached to the machine <TT>deathstar</TT> in the domain <TT>starwars.com</TT>,
first for the file <TT>/usr/local/lib/smail/config</TT>:</P>
<PRE><FONT COLOR="#0066FF">#/usr/local/lib/smail/config
# domains we belong to
visible_domain=deathstar.starwars:uucp
# who we're known as (fully-qualified-site-name)
visible_name=vader.starwars
# who we go through
smart_path=deathstar
</FONT></PRE>
<P>The changes for <TT>/usr/local/lib/smail/paths</TT> are the machine name only:</P>
<PRE><FONT COLOR="#0066FF">#/usr/local/lib/smail/paths
# we're a domainized site, make sure we accept mail to both names
vader %s
vader.starwars.com %s
</FONT></PRE>
<P>If you want to run the <TT>smail</TT> program as an SMTP daemon, you must add
the following line to the file <TT>/etc/inetd.conf</TT> (or whatever the equivalent
file is called in your distribution):</P>
<PRE><FONT COLOR="#0066FF">smtp stream tcp nowait root /usr/bin/smtpd smtpd
</FONT></PRE>
<P>When this is added, any outgoing mail gets sent automatically when using a mailer
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -