SNNTP(1)

NAME
snntp - transmit netnews articles to a remote NNTP server

SYNOPSIS
snntp [ -a ] [ -d ] [ -s ] [ -F ] [network!]host[!service]

DESCRIPTION
Snntp offers netnews articles [RFC 1036], named in a batch file (a file of filenames, in either C News n or F format; n is considerably faster) on standard input, to a remote NNTP (Network News Transfer Protocol [RFC 977]) server, transmitting those articles that the remote server indicates that it does not already have. The names of files that could not be sent are copied to standard output. The server is host on network (default tcp) at service (default nntp). If exactly one ! is present, it is assumed to be network!host, with the default service. Network must provide a reliable, flow-controlled, full-duplex byte stream. The options are:

-s  Turns off reporting of transfer statistics (how many articles we offered them, how many they accepted, etc).

-d  Turns on DEBUG output on stderr. This can be used to see exactly what the two systems are saying to each other, except for the actual article text.

-a  The next queue file on the command line isn't a queue file, but is a single netnews article to be transmitted to the remote in a single operation.

    NOTE: this option causes snntp to exit immediately after this transfer is done (regardless of whatever else is on the command line), and to exit with a code indicating whether the articles was successfully accepted by the remote server (zero exit for success, non-zero for failure).

-F  host is the number of an already-open, readable and writable file descriptor (with some reliable protocol underneath) that was passed to snntp through a fork(2).

THEORY OF OPERATION
Snntp implements an interactive ihave/sendme transmission system. Roughly, the protocol is

1.  open the article, fetch out the message-id (required on all netnews articles), and send the command IHAVE <message-id> to the remote.

2.  The remote will then say either ``I've seen it already'' or ``please send that article to me.''

3.  If the response was negative, snntp loops back to step 1 and offers the next article (until queue file EOF). Otherwise, snntp will send the article, using SMTP [RFC 821] text transmission conventions (i.e. silly CRLF line terminators, and dot escaping).

4.  Snntp waits for the remote to say whether the article was successfully accepted or not. If the answer is negative, snntp will write this article's filename to standard output.

If the communication link should fail (and snntp detects it through a system call error return), snntp will copy to standard output the article filenames of the articles that it did not transmit (that is, we don't retransmit stuff we've already successfully sent and gotten back an positive confirmation that they got it).

HISTORY
Based on nntpxmit by Erik E. Fair.

SEE ALSO
ipc(3), news(5), newssys(5), relaynews(8), sendnntp(8)
Internet RFC 977 - Network News Transfer Protocol (NNTP)
Internet RFC 1036 - USENET Article Format standard
Internet RFC 821 - Simple Mail Transfer Protocol (SMTP)

BUGS
Snntp performs no locking of batch files; see sendnntp.