📄 lsg40.htm
字号:
<P>The newsgroups file is a list of all newsgroups with a one-line description of its purpose. The descriptions are used by many newsreader applications to display groups users subscribe to. You may have to update this file occasionally to ensure that it is accurate, especially as newsgroups change frequently. For an initial configuration, you can leave the file as it was sent from your news feed.
<BR>
<P>A number of configuration files are usually maintained in the C News directory, usually /usr/lib/news. Each file shown in the following list needs to be checked for the proper entries that work with your site. You can edit each file with any ASCII editor.
<BR>
<P>Check and modify the following C News configuration files:
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
explist
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This file specifies expiration times of some newsgroups.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
mailname
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This file is your machine's name as it should appear on outgoing mail, usually as your full domain name (such as tpci.com).</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
organization
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This file is your organization's name used to identify the originating site on outgoing articles.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
sys
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
For most installations, modify the ME line to contain all/all. The sys file is discussed in more detail in the section "The sys File" later in this chapter.</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
whoami
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
This file is your machine's name in UUCP format (such as tpci).</FONT>
</TABLE><BR>
<A NAME="E69E239"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>C News Directories</B></FONT></CENTER></H4>
<BR>
<P>After you have made these configuration changes, you should check that the necessary C News directories exist, or create them if they do not. The in.coming and out.going directories should exist below the spool directory, which may be /usr/spool or /var/spool depending on your directory structure. To create these two directories, issue the command (assuming /usr/spool is the spool directory):
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">mkdir /usr/spool/news/in.coming /usr/spool/news/out.going</FONT></PRE>
<P>If the /usr/spool/news directory doesn't already exist when you issue these commands, you may have to create it first. More recent versions of C News also require a directory called /usr/spool/news/out.master (or the /var equivalent). You don't need to create separate spool directories for each of the newsgroups you intend to receive because C News will create directories when necessary.
<BR>
<P>Once these directories have been created, or you have checked for their existence, you should also check their ownerships. For security reasons, the directories should all be owned by the user news in the group news. The file permissions should be set to mode 755. You can set the ownerships and permissions with the commands:
<BR>
<PRE>
<FONT COLOR="#000080">cd /usr/spool
chown -R news.news news
chmod -R 755 news</FONT></PRE>
<P>These commands assume that your versions of chown and chmod accept the recursive -R option (which most Linux versions do). If not, issue the chown and chmod commands for each directory mentioned above.
<BR>
<BR>
<A NAME="E69E240"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>The sys File</B></FONT></CENTER></H4>
<BR>
<P>As mentioned earlier, the /usr/lib/news/sys file is one of the configuration files that needs to be tailored for your system. Because the sys file has several important aspects, this section looks at the file in more detail. The sys file controls the hierarchies of newsgroups that are downloaded to your site and forwarded on to other sites, depending on the configuration.
<BR>
<P>The sys file is composed of a set of entries for each site that you forward news to. It also lists the newsgroups that you will accept from other sites. The sys file uses a particular format for each entry, which follows this general syntax:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">site/exclusions:groups/distribution_list:flags:cmds</FONT></PRE>
<P>All of the parameters of the entry are optional except the sitename, although the colons must be left in place. The parameters have the following meaning:
<BR>
<UL>
<LI>The site parameter is the name of the site the entry refers to (usually its UUCP name). You need an entry for each remote site you connect to, as well as for your site (designated by the special sitename ME).
<BR>
<BR>
<LI>The exclusions parameter defines newsgroups that are not returned to the remote site (because you probably downloaded them from that site). This field is optional. If you are a leaf site (only downloading and uploading to a news server), this entry can be all.
<BR>
<BR>
<LI>The groups parameter is a list of newsgroups and hierarchies that are downloaded or uploaded. Multiple entries are separated by commas.
<BR>
<BR>
<LI>The distribution_list parameter specifies newsgroups to be forwarded. This optional addendum to the groups entry is set apart with a slash. You can use this field to prevent some newsgroups from being sent on to another site.
<BR>
<BR>
<LI>The flags parameter sets optional flags to control transfer parameters. Valid values of the flags are listed later in this section.
<BR>
<BR>
<LI>The cmds parameter is a command to be executed for each article if batching is not enabled with a flag or command line parameter. See later in this section for a description of the use of this field.
<BR>
<BR>
</UL>
<P>When specifying remote machine names in the site field of a sys entry, make sure you account for possible variations in the Path header of articles. This usually means providing both the UUCP and full domain name formats for the site, as well as any aliases that may be used. Separate multiple entries in the site specification with a slash. For example, your entry for a machine called brutus may look like this:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">brutus/brutus.bignet.com</FONT></PRE>
<P>The sys file entry for your own machine is important. Any newsgroups next to the ME name are handled as newsgroups you specifically want to keep track of, while all others are sent to the junk newsgroup.
<BR>
<P>You have to add a line for each site that connects to your machine for their news feed (if there are any). If you are at the end of a newsfeed, you can enter the name of your newsfeed (as all locally generated articles are sent back to that machine only).
<BR>
<P>The newsgroups that are to be transferred to and from the remote site are specified in the groups field. You can set this to transfer several specific newsgroups by separating them with commas. For example, the following entry transfers only the three newsgroups specified:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">rec.audio.high-end,rec.video.laserdisk,rec.bicyles.tech</FONT></PRE>
<P>If you want to transfer all the newsgroups that are available, use the keyword all.
<BR>
<P>To specify a specific hierarchy to be transferred in the group field, use the prefix that you want followed by the keyword all (such as rec.audio.all to transfer all newsgroups starting with rec.audio).
<BR>
<P>To prevent a hierarchy from being transferred, precede the name with an exclamation mark. For example, !sci.biology rejects any newsgroups with the sci.biology prefix. You can use the formats interchangeably in the list, such as this entry:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">!rec.audio,rec.audio.high-end,!sci,sci.biology.all,comp.os.all</FONT></PRE>
<P>This entry does not transfer any newsgroups starting with rec.audio except rec.audio.high-end. It also prevents all sci. newsgroups except those starting with sci.biology. In addition, all comp.os newsgroups are transferred.
<BR>
<P>You can use this field as a handy filter to suppress major hierarchies. For example, if you want to accept or transfer all newsgroups except those starting with alt (which can be the most amusing and controversial newsgroups on USENET), you would enter the following in the field:
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">all,!alt</FONT></PRE>
<P>This field is often used by sites to suppress not only the alt groups, but also all sex-oriented groups.
<BR>
<P>If you are forwarding newsgroups on to other machines, you can specify the newsgroups that are to be sent with the optional distribution list entry, which is separated from the groups list by a slash. Again, this is a command-separated list that uses the same format as the groups field. For example, this entry forwards all newsgroups to the remote machine except those starting with alt and those starting with tpci (which are local newsgroups specific to the tpci network):
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">all,!alt,!tpci</FONT></PRE>
<P>The flags that are allowed in the flag field of the sys file can be any combination of the following (or none at all):
<BR>
<TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
F
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Enables batching</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
f
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Enables batching (functions almost the same as the F flag)</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
I
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Forces C News to produce an article list for use by ihave/sendme</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
L
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Transmits only articles posted in your machine (or when followed by a number, limits transfers to articles posted within that number of hops of your machine, based on the Path field in the article header)</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
m
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -