inews(8)

NAME
inews - main news relayer

SYNOPSIS
inews [-v] [-h | {-t title -n newsgroups} [-e expires] [-f sender] [-d distribution] [-F refs] [-o organization] [-a approved] [-r reply-to] [-x dontsend] [-c control] [-R] [artname]

inews [-v] -p artname

DESCRIPTION

The inews program is the base of the W-NEWS system, since it is the only program in the package which actually knows about articles, headers and news groups and their directories. It is used to post incoming articles on the local system ( inews -p ), as is done by the unbatch(8) program. It can also be used to post an article on both the local system and the network ( inews -h ), as is done by the pnews(1) program and most news readers (for posting followups to articles).

Inews expects the article to be posted in a file named by its first argument. If no argument is presented, standard input is assumed to contain the article. If the -h flag is present, it assumes that it is an article without the complete article header, and that it has to create one itself. This is the case when an article composing program like pnews(1) is calling it. Otherwise, it assumes that the article contains a complete article header (possibly with the help of various other command options), and it just updates the information in it.

Usually, when the -p flag is not present, and the Distribution: field of the article header does not contain the text local , inews will post the article to all news groups specified in the Newsgroups: field, plus to any other systems that want to have it. Otherwise, the article will be posted only locally.

When started, inews creates a lock temporary file in /usr/spool/news , and creates an article of the incoming data. If it has a complete article, then it examines the fields mentioned above, to see if the article is to be posted locally only (note, that the result of this examination is overruled by the presence of the -p flag in the command line!) or as both local and outgoing. Then, it extracts the names of the news groups specified in the Newsgroups: field, and delivers the article to that news group on the local system. Finally, the article is sent to all connected systems that show an interest in at least one of the news groups indicated.

Finally, the temporary file is removed, and the program exits.

To prevent multiple copies of inews running at the same time from mucking up the active file, a lock file /usr/lib/news/active.lock or /conf/news/active.lock is created during access of that file. Inews tries to access the file 10 times (spaced 6 seconds apart) before giving up, so this should not be a problem. If your system supports flock or lockf, that might be used instead of the file based locking. This depends on the options that inews was compiled with.

To change the way inews behaves, one can use a lot of command line options, most of them with their own arguments. We will now explain the meaning of those options.

The -v option causes inews to produce extra output for debugging purposes. This can be useful at times, since no network connection remains error-free forever...

If inews is called with neither the -h (called header-mode ) nor the -p option ( post-mode ) present, you can use the next two options to set the values of the two most important header fields in the article:

-t title
Use this argument to set the title (also called the subject ) of the article. This header field must be present in the article, either via this option or from the article's own header.

-n newsgroups
One should use this option to indicate to what news groups the article should be posted. It is therefore a required argument if not in one of the other modes.

-d distribution This option is not required. It sets the value of the Distribution: field to something else than the default of world -wide distribution. Use it as much as possible to prevent unneeded spreadening of your articles.

The remaining options can be used in any mode. They set the values of other possible header fields. Note, that they will be overwritten by values in the article's own header!

-F refs
This option sets the value of the References: field in the article header, as used by various news reading programs when sending a followup to some other article.

-a approved
This option is used to create an Approved: field in the article header, which indicates that some authority agreed to its contents. It is often used with archive postings, and it is required in control messages (for obvious reasons).

-c control
With this option you can set the value of the Control: field in a control message. Control messages are special articles, issued mainly by system managers to create and/or remove news groups. It can also be used by ordinairy users to cancel the transmission of their previously posted article.

-e expires
Use this field to set an explicit expiration date of the article. Usually, the expiration date is about fourteen days after its posting or delivery. It creates the Expires: header field.

-f sender
If the sender of the article is not the same as the person who created it, you can use this option to indicate who did what. It creates the Sender: header field.

-o organization
When multiple users are using the same account (for example, a guest account), this option can be used to change the text in the Organization: field of the article, which defaults to the contents of the /usr/lib/news/organization or /conf/news/organization file.

-r reply-to
It sometimes is nice to be able to post an article, to which people can reply by e-mail. If the person to reply to is not the same as the sender and/or creator of the article, this option can be used to indicate tho whom one should reply. The Reply-To: field will then be generated, which is preferred by mailers as the return-address.

-x dontsend
Explicitly prevent the message from being sent to certain hosts, even if they are listed in the sys or newsfeeds file. It is seldom used.

-R
Repost the article. Just like the normal posting mode, but the article will not be sent to remote systems and the history database will not be checked. This mode is used by the updgroups(8) program.

FILES
/usr/lib/news/news.adm,
/usr/lib/news/active,
/usr/lib/news/history,
/usr/lib/news/errlog,
/usr/lib/news/log,
/usr/lib/news/sys
(these files may be found in /conf/news and /var/adm/news)

AUTHORS
Fred N. van Kempen, waltje@Infomagic.COM
Udo Munk, udo@umunk.GUN.de (Coherent)