Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
NEWSSYS(5)		       File Formats Manual		      NEWSSYS(5)

NAME
     newssys - USENET network news sys (neighbours) file

DESCRIPTION
     The file /var/lib/news/sys describes which news groups this site is willing
     to  receive  and  which  groups  it  is willing to transmit to each netnews
     neighbour.  It is public information and is sent automatically to any  site
     that  sends  a  sendsys control message.  A sys line has four fields, sepa-
     rated by colons:

     system-name/exclusion1,exclusion2...:subscriptions/distribu-
     tions:flags:transmission command

     A # as the first character in a line denotes a comment.   Empty  lines  are
     ignored.	A  (non-comment)  sys entry may be continued to the next line by
     putting a \ at the end of the current line.  Spaces are  permitted  in  sys
     only  in comments, transmission command when it really is a command and not
     a filename, and, for B news compatibility, at the start of  a  continuation
     line (after a \ and a newline).

     Of  the  sys  fields, only the system-name need be present.  If a field and
     all the fields after it are omitted,  the	colon  immediately  before  that
     field  and  all  the colons after it may be omitted too.  The optional sub-
     fields (exclusions and distributions) and	their  leading	slashes  may  be
     omitted.

     The  system  name	is  the name of the system being sent to, and is checked
     against site names in Path: headers to avoid sending an article back  to  a
     site  that  has seen it.  The exclusions are also checked against the Path:
     header and articles are not sent to system name if they have visited any of
     the exclusions.

     (The special system name ME stands for the name of the machine news is run-
     ning on, as determined from /var/lib/news/whoami.	The ME line, or  a  line
     whose system name is explicitly that of the machine news is running on, has
     a	rather different meaning from that of the other sys file lines: its sub-
     scriptions subfield identifies the newsgroups that this site subscribes  to
     (i.e.  is	willing  to receive), and its other fields and subfields are ig-
     nored.  There should be one such line in the file.)

     subscriptions is a comma-separated list of  newsgroup  patterns  specifying
     the  newsgroups  to  be  transmitted to the system; each newsgroup from the
     Newsgroups: header of each article is matched against the pattern list, and
     if any newsgroup matches the pattern list, the article is transmitted.  The
     rules for matching a newsgroup against a single pattern are:

     *	words in a newsgroup or a pattern are delimited by periods;

     *	words of a pattern and a newsgroup match only if they are identical, ex-
	cept that the word all in a pattern matches any newsgroup word;

     *	a newsgroup is matched against a pattern word by  word,  and  all  words
	must match for the newsgroup to match that pattern;

     *	if  the  pattern  has fewer words than the newsgroup, the pattern is im-
	plicitly extended to the same number of words by appending .all as  many
	times as necessary;

     *	if  the  newsgroup  has fewer words than the pattern, the newsgroup does
	not match the pattern;

     *	if pattern matches a newsgroup, !pattern mismatches that newsgroup.

     A newsgroup matches a pattern list if, and only if, it matches at least one
     of the patterns and:

     *	the newsgroup does not mismatch any of the patterns, or

     *	the longest matched pattern is longer than the longest	mismatched  pat-
	tern  (length  is measured in number of words, with each explicit occur-
	rence of all counted as slightly less than one word, and  does	not  in-
	clude the implicit extension of patterns with .all).

     Note  that  order in the lists is not significant, and that ties are broken
     in favor of not matching.	An example: comp,comp.sys.sun,!comp.sys  matches
     all the comp groups, except the comp.sys groups but including comp.sys.sun.

     The distributions in the Distribution: header are similarly matched against
     the distributions subfield, if any.  If no distributions are supplied, Dis-
     tribution: will be matched against the subscriptions instead.  (The Distri-
     bution:  header is ignored when receiving news; it is only significant when
     sending.)

     Note that some older news software reportedly attached magical significance
     to the distributions ``world'' and ``local''; C News treats them  as  ordi-
     nary  distribution  names with no special properties (except that ``world''
     is the default distribution of an article if none appears explicitly).  For
     example, a distributions list like all,!local will not prevent local  arti-
     cles  from  being	sent  unless  they  contain explicit Distribution: local
     lines.  Note too that the distribution ``world'' must be permitted (perhaps
     by the distribution ``all'') in order to feed  Distribution:-less	articles
     (the common case) to a site.

     The  flags are a set of letters describing how the article should be trans-
     mitted.  Valid flags include f (interpret transmission command  as  a  file
     name  and	write  the article's file name relative to /var/news and size in
     bytes on the end of it), F (like f but omit the size), I (like F but  write
     Message-ID:s instead of filenames), n (like F but write a Message-ID: after
     each  filename),  Ln (only send articles generated within n hops of here; 0
     is the default value for n), m (transmit only moderated groups), u  (trans-
     mit only unmoderated groups).  There are other obsolete ones.

     The  transmission	command  is executed by the shell with the article to be
     transmitted as the standard input.  The substring `%s' will be replaced  at
     most once per command with the name of a file containing the article, rela-
     tive  to  /var/news (`%%' is replaced by `%').  The default is `uux - -z -r
     sysname!rnews'  for  a  command;  the  PATH  searched   includes	/usr/lo-
     cal/libexec/cnews/relay,  so that the commands described in newsmail(8) are
     available as alternatives to uux.	If one of  the	flags  has  caused  this
     field  to	be  taken as a filename, the default is /var/news/out.going/sys-
     name/togo; if a filename is given but it does not start with `/', it is as-
     sumed to be relative to the /var/news/out.going directory.

EXAMPLES
     A complex sys file.

	  # line indicating what we are willing to receive; note local groups near end
	  ME:comp,news,sci,rec,misc,soc,talk,can,ont,tor,ut,to
	  # sample insignificant feed not using batching (for special situations only)
	  huey:news.config,to.huey/all::uux - -r -gd huey!rnews
	  # sample of mailing newsgroups to someone (note distribution)
	  daisy:soc.women,soc.couples/all::mail daisy@duck
	  # sample small feed using batching
	  gladstone:comp.protocols.tcp-ip,rec.aviation/all:f:
	  # sample major batched feed, including assorted regional newsgroups, with
	  # (unnecessary) explicit file name
	  dewey:comp,news,sci,rec,misc,soc,talk,can,ont,tor,ut,to.dewey/all:f:dewey/togo
	  # sample long-haul feed; note no regional groups, exclusion of a local
	  # distribution, and exclusion of anything that passed through him under
	  # another name (needed because he puts that form, not just "donald", in
	  # his Path lines)
	  donald/donald.angry.duck:comp,news,sci,rec,misc,soc,talk,to.donald/all,!ut:f:
	  # sample local-postings-only feed direct to major site (gets them out fast)
	  scrooge:comp,news,sci,rec,misc,soc,talk,to.scrooge/all:Lf:
	  # sample ihave/sendme link
	  # NOTE, this is uucp ihave/sendme, not related to NNTP in any way.
	  # Send ihave telling louie what we have -- batcher turns the batch into a
	  # giant control message and posts it to "to.louie".
	  louie.wehave/louie:comp,news,sci,rec,misc,soc,talk,!to/all:I:
	  # Send the actual control messages
	  louie:to.louie/all:f:
	  # Also, since ihave/sendme is slow, send local postings to louie without
	  # waiting for ihave/sendme
	  louie:comp,news,sci,rec,misc,soc,talk,!to/all:Lf:
	  # for a site we feed with snntp
	  zaphod.mps.ohio-state.edu:all:n:/var/news/out.nntp/zaphod.mps.ohio-state.edu

     (The ``to.sysname'' groups are normal newsgroups used for testing	individ-
     ual news feeds and conveying ihave/sendme messages.)

FILES
     /var/lib/news/sys

SEE ALSO
     newsbatch(8CN), relaynews(8CN)

HISTORY
     Written by Geoff Collyer and Henry Spencer for the C News project.

BUGS
     The  flags  field is a bit of mess: there are too many formatting flags and
     they aren't orthogonal.

				   9 Sept 1994			      NEWSSYS(5)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=newssys&sektion=5&manpath=FreeBSD+Ports+15.1.quarterly>

home | help