724-726.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 96 行

HTML
96
字号
<HTML>

<HEAD>

<TITLE>Linux Unleashed, Third Edition:Configuring Linux for News</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=41//-->

<!--PAGES=724-726//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="722-724.html">Previous</A></TD>

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

<TD><A HREF="726-728.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H4 ALIGN="LEFT"><A NAME="Heading5"></A><FONT COLOR="#000077">Configuring nntpd</FONT></H4>

<P>Once the <TT>nntpd</TT> binaries have been created by running the <TT>conf.h</TT> file, you can configure the file <TT>/usr/lib/news/nntp_access</TT> to control which remote machines can use NNTP on your system. The file is organized in a set of lines, one for each remote, using this format</P>

<!-- CODE SNIP //-->

<PRE>

sitename    read|xfer|both|no  post|no    except

</PRE>

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

<P>where <TT>sitename</TT> is the name of the remote machine that can be identified by its site name, a fully qualified domain name, or the IP address. NNTP allows for partial matches of the domain name and IP address, which are useful to providing multiple lines of information about newsgroups. If the remote machine&#146;s name or IP address matches the sitename exactly, only that one line is read (the rest of the file is ignored). If the match is only partial, that line is read, then the rest of the file is examined to find further matches. If you want to match all remote machines, you can use the sitename <TT>default</TT>.</P>

<P>The access permissions for the site are defined in the second field. There are four legal values, which have these meanings:</P>

<DL>

<DD><B>&#149;</B>&nbsp;&nbsp;<TT>read</TT> the remote can retrieve articles (pulling)

<DD><B>&#149;</B>&nbsp;&nbsp;<TT>xfer</TT> the remote can send articles (pushing)

<DD><B>&#149;</B>&nbsp;&nbsp;<TT>both</TT> allows both sending and receiving of articles

<DD><B>&#149;</B>&nbsp;&nbsp;<TT>no</TT> no access to articles

</DL>

<P>The third field indicates whether the remote site can post articles. If the keyword <TT>post</TT> is used, the remote can send articles and the local NNTP system will complete the header information. If the keyword <TT>no</TT> appears in the second or third field, the remote cannot post articles.</P>

<P>The last field identifies any newsgroups the remote is denied access to. The field is comma-separated and preceded by an exclamation mark (you will see this format frequently in C News). For example, the entry</P>

<!-- CODE SNIP //-->

<PRE>

chatton.bignet.com  both  post  !alt,local

</PRE>

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

<P>allows the remote machine <TT>chatton.bignet.com</TT> to send and receive all articles except those in the <TT>alt</TT> and <TT>local</TT> newsgroup hierarchies. The remote may also post articles.</P>

<P>You will probably want to set up the <TT>/usr/lib/news/nntp_access</TT> so there is a default value for all machines, then specific entries for machines you want to work with. For example, follow this <TT>/usr/lib/news/nntp_access</TT> file</P>

<!-- CODE SNIP //-->

<PRE>

# default entry

default        xfer    no

# allow chatton full access

chatton.bignet.com    both    post

# allow brutus to read but not post

brutus.bignet.com    read    no

</PRE>

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

<P>This lets any machine other than those explicitly specified transfer articles to your machine but not post them, while <TT>chatton</TT>and <TT>brutus</TT> have explicit instructions allowing them to read and post, and read-only, respectively.</P>

<P>Some versions of NNTP have implemented authorization systems to ensure that your machine does not get fooled into thinking another machine is at the other end of a connection. The authorization system has not been working well for most versions of <TT>nntpd</TT>, so it is best left alone at this point. Check future releases of <TT>nntpd</TT> for more information about the authorization process.</P>

<H3><A NAME="Heading6"></A><FONT COLOR="#000077">Configuring Newsreaders</FONT></H3>

<P>A newsreader is a user interface to the newsgroups stored by a news download program such as NNTP or CNews. Newsreaders let users read, print, save, and perform many other actions on newsgroups, including replying to an article. At the newsgroup level, newsreaders let users examine a newsgroup&#146;s lists and subjects, subscribe or unsubscribe to newsgroups, and generally manage their news access.

</P>

<P>Newsreaders vary considerably from the simple to the very complex, from character-based to graphical, and from useful to atrocious. There are many newsreaders currently available with Linux distributions, and more newsreaders are appearing as programmers convert their favorite UNIX or DOS-based newsreaders to work under Linux.</P>

<P>While we can&#146;t look at every newsreader currently available, we can show you the basic configuration requirements for the most commonly used newsreaders. This information, coupled with the documentation that accompanies new newsreaders, should help you set up your Linux system for optimum behavior of the news system. Since most Linux systems are supplied with <TT>trn</TT> and <TT>tin</TT> (both threaded newsreaders), they are the primary packages that we will look at in this chapter.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="722-724.html">Previous</A></TD>

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

<TD><A HREF="726-728.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





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

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

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