-d turns on debugging of filing, headers, locking, matching, transmission. -h prevents generation of history entries for rejected articles; the default behaviour generates larger history files that allow NNTP receivers to more efficiently reject offered articles. -s makes discarding an article a serious matter, justifying a non-zero exit status (for the benefit of inews). -c is an optimisation: currdir is assumed to be the current directory; in the absence of this option, pwd is invoked. -u unlinks (removes) any filename arguments after successful processing; they are assumed to be relative to currdir (`pwd` if none). -o causes articles with dates (in Date: headers) more than days old to be dropped (usually to stop accidentally-retransmitted old articles). -n causes the current time (as decimal ASCII) to be written into the notefile (which should be an absolute pathname) once if relaynews finds it necessary to use symbolic links when filing articles.
-x prevents generation of Xref: headers in articles filed in exactly one newsgroup; use of this option will interfere with generation of news overview data and mirroring via -b. -b causes relaynews to not update active and file articles received directly from xrefsite under the groups and article numbers found in incoming Xref: headers. -b provides the basis for a news mirroring facility. -a similarly causes active to not be updated and duplicate articles received directly from dupsite to be accepted, but filed under the filenames found in their existing history entries. It may be used to recover a news spool, given recent active and history files.
Control messages, recognised by their Control: headers are filed under the control pseudo-group only, but are forwarded as usual, by examining their Newsgroups: and Distribution: headers. Note that posting to the control pseudo-group will not cause a message to be treated as a control message; control is not a real newsgroup.
An article which contains an Also-Control: header is treated normally except that the contents of the header are executed as if they were the contents of a Control: header. Such an article is a form of hybrid message since it functions as an ordinary article yet also causes control functions to be executed. The Supersedes: header is a special case and is rewritten internally only to Also-Control: cancel.
Articles which contain no locally-known (to the active file) newsgroups yet accepted by the local subscription list are filed exactly once, in the junk pseudo-group, and forwarded as usual. If all newsgroups in the article are refused by the local subscription list or are refused by an x in active file entries, then the article will be discarded and not filed in junk.
Locally-generated articles need not be permitted by the local subscription list but are otherwise processed normally; this is for backward compatibility and perhaps to keep the local subscription list short by not requiring general and the like to be named.
cd /var/news/in.coming relaynews -uc /var/news/in.coming -o 7 nntp.* >>/etc/news/log 2>>/etc/news/errlog"File and forward articles in batches that arrived by NNTP, and remove each batch upon successfully processing it. Discard any articles more than a week old.
Relaynews could run faster in some circumstances and would be simpler if Control: were required to be the first header, if present, and if Newsgroups: were required to be the next.
The whole control message and hybrid message situation is a festering bug. Either control messages should be eliminated, or all forms of backward compatibility should be dropped (including Control: and Supersedes:) and only Also-Control: should be supported.