old-www/LDP/nag2/x-087-2-cnews.sys.html

799 lines
13 KiB
HTML

<HTML
><HEAD
><TITLE
>The sys File</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
REL="HOME"
TITLE="Linux Network Administrators Guide"
HREF="index.html"><LINK
REL="UP"
TITLE="C News"
HREF="x-087-2-cnews.html"><LINK
REL="PREVIOUS"
TITLE="Installation"
HREF="x16700.html"><LINK
REL="NEXT"
TITLE="The active File"
HREF="x-087-2-cnews.active.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Network Administrators Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x16700.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 21. C News</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x-087-2-cnews.active.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="X-087-2-CNEWS.SYS"
>21.3. The sys File</A
></H1
><P
>&#13;
The <TT
CLASS="FILENAME"
>sys</TT
> file, located in
<TT
CLASS="FILENAME"
>/etc/news</TT
>, controls which hierarchies you receive
and forward to other sites. Although there are maintenance tools named
<B
CLASS="COMMAND"
>addfeed</B
> and <B
CLASS="COMMAND"
>delfeed</B
>, we think
it's better to maintain this file by hand.</P
><P
>The <TT
CLASS="FILENAME"
>sys</TT
> file contains entries for each site to
which you forward news, as well as a description of the groups you
will accept. The first line is a
<SPAN
CLASS="SYSTEMITEM"
>ME</SPAN
> entry that describes your
system. It's a safe bet to use the following:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
>ME:all/all::</PRE
></TD
></TR
></TABLE
>
You also have to add a line for each site to which you feed news.
Each line looks like this:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
><TT
CLASS="REPLACEABLE"
><I
>site</I
></TT
>[/<TT
CLASS="REPLACEABLE"
><I
>exclusions</I
></TT
>]:<TT
CLASS="REPLACEABLE"
><I
>grouplist</I
></TT
>[/<TT
CLASS="REPLACEABLE"
><I
>distlist</I
></TT
>][:<TT
CLASS="REPLACEABLE"
><I
>flags</I
></TT
>[:<TT
CLASS="REPLACEABLE"
><I
>cmds</I
></TT
>]]</PRE
></TD
></TR
></TABLE
></P
><P
>Entries may be continued across newlines using a backslash
(<SPAN
CLASS="SYSTEMITEM"
>\</SPAN
>) at the end of the line to be
continued. A hash sign (<SPAN
CLASS="SYSTEMITEM"
>#</SPAN
>) denotes a
comment.</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="REPLACEABLE"
><I
>site</I
></TT
></DT
><DD
><P
>This is the name of the site the entry applies to. One usually
chooses the site's UUCP name for this. There has to be an entry
for your site in the <TT
CLASS="FILENAME"
>sys</TT
> file too, or you will not
receive any articles yourself.</P
><P
>&#13;
The special site name <SPAN
CLASS="SYSTEMITEM"
>ME</SPAN
> denotes your
site. The <SPAN
CLASS="SYSTEMITEM"
>ME</SPAN
> entry defines all groups
you are willing to store locally. Articles that aren't matched by the
<SPAN
CLASS="SYSTEMITEM"
>ME</SPAN
> line will go to the
<SPAN
CLASS="SYSTEMITEM"
>junk</SPAN
> group.</P
><P
>&#13;
C News rejects any articles that have already passed through this site to
prevent loops. C News does this by ensuring that the local site name does not
appear in the <TT
CLASS="LITERAL"
>Path:</TT
> of the article. Some sites may be known
by a number of valid names. For example, some sites use their fully qualified
domain name in this field, or an alias like
<TT
CLASS="LITERAL"
>news.</TT
><TT
CLASS="REPLACEABLE"
><I
>site.domain</I
></TT
>. To ensure the
loop prevention mechanism works, it is important to add all aliases to the
exclusion list, separating them by commas.</P
><P
>For the entry applying to site <SPAN
CLASS="SYSTEMITEM"
>moria</SPAN
>,
for instance, the <TT
CLASS="REPLACEABLE"
><I
>site</I
></TT
> field would contain
<SPAN
CLASS="SYSTEMITEM"
>moria/moria.orcnet.org</SPAN
>. If
<SPAN
CLASS="SYSTEMITEM"
>moria</SPAN
> were also by an alias of
<SPAN
CLASS="SYSTEMITEM"
>news.orcnet.org</SPAN
>, then our
<TT
CLASS="REPLACEABLE"
><I
>site</I
></TT
> field would contain
<SPAN
CLASS="SYSTEMITEM"
>moria/moria.orcnet.org,news.orcnet.org</SPAN
>.</P
></DD
><DT
><TT
CLASS="REPLACEABLE"
><I
>grouplist</I
></TT
></DT
><DD
><P
>&#13;
This is a comma-separated subscription list of groups and hierarchies
for this particular site. A hierarchy may be specified by giving the
hierarchy's prefix (such as <SPAN
CLASS="SYSTEMITEM"
>comp.os</SPAN
> for all groups whose names start
with this prefix), optionally followed by the keyword <SPAN
CLASS="SYSTEMITEM"
>all</SPAN
> (e.g., <SPAN
CLASS="SYSTEMITEM"
>comp.os.all</SPAN
>&#8201;).</P
><P
>You can exclude a hierarchy or group from forwarding by preceding it with an
exclamation mark. If a newsgroup is checked against the list, the longest
match applies. For example, if <TT
CLASS="REPLACEABLE"
><I
>grouplist</I
></TT
>
contains this list:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><PRE
CLASS="SCREEN"
>!comp,comp.os.linux,comp.folklore.computers</PRE
></TD
></TR
></TABLE
>
no groups from the <SPAN
CLASS="SYSTEMITEM"
>comp</SPAN
> hierarchy
except <SPAN
CLASS="SYSTEMITEM"
>comp.folklore.computers</SPAN
> and
all groups below <SPAN
CLASS="SYSTEMITEM"
>comp.os.linux</SPAN
> will
be fed to that site.</P
><P
>If the site requests to be forwarded all news you receive yourself, enter
<SPAN
CLASS="SYSTEMITEM"
>all</SPAN
> as
<TT
CLASS="REPLACEABLE"
><I
>grouplist</I
></TT
>.</P
></DD
><DT
><TT
CLASS="REPLACEABLE"
><I
>distlist</I
></TT
></DT
><DD
><P
>&#13;
This value is offset from the <TT
CLASS="REPLACEABLE"
><I
>grouplist</I
></TT
> by
a slash and contains a list of distributions to be forwarded. Again,
you may exclude certain distributions by preceding them with an
exclamation mark. All distributions are denoted by <SPAN
CLASS="SYSTEMITEM"
>all</SPAN
>. Omitting
<TT
CLASS="REPLACEABLE"
><I
>distlist</I
></TT
> implies a list of <SPAN
CLASS="SYSTEMITEM"
>all</SPAN
>.</P
><P
>For example, you may use a distribution list of
<SPAN
CLASS="SYSTEMITEM"
>all,!local</SPAN
> to prevent news meant only
for local use from being sent to remote sites.</P
><P
>There are usually at least two distributions:
<SPAN
CLASS="SYSTEMITEM"
>world</SPAN
>, which is often the default
distribution used when none is specified by the user, and
<SPAN
CLASS="SYSTEMITEM"
>local</SPAN
>. There may be other
distributions that apply to a certain region, state, country,
etc. Finally, there are two distributions used by C News only;
these are <SPAN
CLASS="SYSTEMITEM"
>sendme</SPAN
> and
<SPAN
CLASS="SYSTEMITEM"
>ihave</SPAN
>, and are used for
the sendme/ihave protocol.</P
><P
>The use of distributions is a subject of debate. The distribution
field in a news article can be created arbitrarily, but for a
distribution to be effective, the news servers in the network must
know it. Some misbehaving newsreaders create bogus distributions by
simply assuming the top-level newsgroup hierarchy of the article
destination is a reasonable distribution. For example, one might
assume <SPAN
CLASS="SYSTEMITEM"
>comp</SPAN
> to be a
reasonable distribution to use when posting to the <SPAN
CLASS="SYSTEMITEM"
>comp.os.linux.networking</SPAN
>
newsgroup. Distributions that apply to regions are often questionable,
too, because news may travel outside of your region when sent across
the Internet.<A
NAME="X-087-2-FNCN04"
HREF="#FTN.X-087-2-FNCN04"
>[1]</A
>
Distributions applying to an organization, however, are
very meaningful; e.g., to prevent confidential information from
leaving the company network. This purpose, however, is generally
served better by creating a separate newsgroup or hierarchy.</P
></DD
><DT
><TT
CLASS="REPLACEABLE"
><I
>flags</I
></TT
></DT
><DD
><P
>This option describes certain parameters for the feed. It may be
empty or a combination of the following:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="LITERAL"
>F</TT
></DT
><DD
><P
>&#13; This flag enables batching.
</P
></DD
><DT
><TT
CLASS="LITERAL"
>f</TT
></DT
><DD
><P
>&#13; This is almost identical to the <TT
CLASS="LITERAL"
>F</TT
> flag,
but allows C News to calculate the size of outgoing batches more precisely,
and should probably be used in preference.
</P
></DD
><DT
><TT
CLASS="LITERAL"
>I</TT
></DT
><DD
><P
>&#13; This flag makes C News produce an article list suitable
for use by ihave/sendme. Additional modifications to the
<TT
CLASS="FILENAME"
>sys</TT
> and the <TT
CLASS="FILENAME"
>batchparms</TT
> file are
required to enable ihave/sendme.
</P
></DD
><DT
><TT
CLASS="LITERAL"
>n</TT
></DT
><DD
><P
>&#13; This creates batch files for active NNTP transfer clients like
<B
CLASS="COMMAND"
>nntpxmit</B
> (see <A
HREF="x-087-2-nntp.html"
>Chapter 22</A
>).
The batch files contain the article's filename along with its message ID.
</P
></DD
><DT
><TT
CLASS="LITERAL"
>L</TT
></DT
><DD
><P
> This tells C News to transmit only articles posted at your site. This flag
may be followed by a decimal number <TT
CLASS="REPLACEABLE"
><I
>n</I
></TT
>, which
makes C News transfer articles posted only within <TT
CLASS="REPLACEABLE"
><I
>n</I
></TT
>
hops from your site. C News determines the number of hops from the
<TT
CLASS="REPLACEABLE"
><I
>Path:</I
></TT
> field.
</P
></DD
><DT
><TT
CLASS="LITERAL"
>u</TT
></DT
><DD
><P
> This tells C News to batch only articles from unmoderated groups.
</P
></DD
><DT
><TT
CLASS="LITERAL"
>m</TT
></DT
><DD
><P
> This tells C News to batch only articles from moderated groups.
</P
></DD
></DL
></DIV
></P
><P
>You may use at most one of <TT
CLASS="LITERAL"
>F</TT
>,
<TT
CLASS="LITERAL"
>f</TT
>,
<TT
CLASS="LITERAL"
>I</TT
>, or
<TT
CLASS="LITERAL"
>n</TT
>.</P
></DD
><DT
><TT
CLASS="REPLACEABLE"
><I
>cmds</I
></TT
></DT
><DD
><P
>&#13;
This field contains a command that will be executed for each article,
unless you enable batching. The article will be fed to the command on
standard input. This should be used for very small feed only;
otherwise, the load on both systems will be too high.</P
><P
>The default command is:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><PRE
CLASS="SCREEN"
>uux - -r -z <TT
CLASS="REPLACEABLE"
><I
>remote-system</I
></TT
>!rnews</PRE
></TD
></TR
></TABLE
></P
><P
>This invokes <B
CLASS="COMMAND"
>rnews</B
> on the remote system, feeding it
the article on standard input.</P
><P
>The default search path for commands given in this field is
<TT
CLASS="FILENAME"
>/bin:/usr/bin:/usr/lib/news/batch</TT
>. The latter
directory contains a number of shell scripts whose names start with
<B
CLASS="COMMAND"
>via</B
>&#8201;; they are briefly described later in this chapter.</P
><P
>&#13;
If batching is enabled using one of the
<TT
CLASS="LITERAL"
>F</TT
>,
<TT
CLASS="LITERAL"
>f</TT
>,
<TT
CLASS="LITERAL"
>I</TT
>, or
<TT
CLASS="LITERAL"
>n</TT
> flags, C News expects to find a
filename in this field rather than a command. If the filename does not
begin with a slash (/&#8201;), it is assumed to be relative to
<TT
CLASS="FILENAME"
>/var/spool/news/out.going</TT
>. If the field is
empty, it defaults to <TT
CLASS="FILENAME"
>remote-system/togo</TT
>. The file is
expected to be in the same format as the <TT
CLASS="FILENAME"
>remote-system/togo</TT
> file and contain a list of articles to transmit.</P
></DD
></DL
></DIV
><P
>When setting up C News, you will most probably have to write your own
<TT
CLASS="FILENAME"
>sys</TT
> file. Here is a sample file for
<SPAN
CLASS="SYSTEMITEM"
>vbrew.com</SPAN
>, from which you may copy
what you need:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
># We take whatever they give us.
ME:all/all::
# We send everything we receive to moria, except for local and
# brewery-related articles. We use batching.
moria/moria.orcnet.org:all,!to,to.moria/all,!local,!brewery:f:
# We mail comp.risks to jack@ponderosa.uucp
ponderosa:comp.risks/all::rmail jack@ponderosa.uucp
# swim gets a minor feed
swim/swim.twobirds.com:comp.os.linux,rec.humor.oracle/all,!local:f:
# Log mail map articles for later processing
usenet-maps:comp.mail.maps/all:F:/var/spool/uumaps/work/batch</PRE
></TD
></TR
></TABLE
></DIV
><H3
CLASS="FOOTNOTES"
>Notes</H3
><TABLE
BORDER="0"
CLASS="FOOTNOTES"
WIDTH="100%"
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.X-087-2-FNCN04"
HREF="x-087-2-cnews.sys.html#X-087-2-FNCN04"
>[1]</A
></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
WIDTH="95%"
><P
> It is not uncommon
for an article posted in say, Hamburg, to go to Frankfurt via
<SPAN
CLASS="SYSTEMITEM"
>reston.ans.net</SPAN
> in the
Netherlands, or even via some site in the U.S.</P
></TD
></TR
></TABLE
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x16700.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x-087-2-cnews.active.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Installation</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="x-087-2-cnews.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>The active File</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>