netnews, snetnews

receives and sends network news articles 

Command


SYNOPSIS

netnews [-S server:port] [-v] [-u user] [-p password] [-timeout timeout] [-t timeout] -I messageid | -g group [-m message_num] [-s subject] [-F from] [-d date] [-b body] read [outfile]

netnews [-S server:port] [-v] [-u user] [-p password] [-timeout timeout] [-t timeout] [-I messageid | -g group [-m message_num] [-s subject] [-F from] [-d date]] [-b body] list [outfile]

netnews [-S server:port] [-v] [-u user] [-p password] [-timeout timeout] [-t timeout] [-g group] [-s subject] [-F from] post [infile]

snetnews [-S server:port] [-v] [-u user] [-p password] [-f CAfile] [-i] [-timeout timeout] [-t timeout] -I messageid | -g group [-m message_num] [-s subject] [-F from] [-d date] [-b body] read [outfile]

snetnews [-S server:port] [-v] [-u user] [-p password] [-f CAfile] [-i] [-timeout timeout] [-t timeout] [-I messageid | -g group [-m message_num] [-s subject] [-F from] [-d date]] [-b body]] list [outfile]

snetnews [-S server:port] [-v] [-u user] [-p password] [-f CAfile] [-i] [-timeout timeout] [-t timeout] [-g group] [-s subject] [-F from] post [infile]


DESCRIPTION

The netnews and snetnews utilities let you receive and send network news articles. snetnews is the secure version that uses SSL to receive and send the articles. SSL uses the default certificate authority file ROOTDIR/etc/openssl/cert.pem. This file must be populated before openssl will initialize. It is not provided by the PTC MKS Toolkit installation, rather a script ROOTDIR/etc/openssl/mkcabundle.pl is provided to populate the file with a sample set of certificates dynamically downloaded from the mozilla trusted certificates list. You may of course choose to provide your own list of trusted root certificates.

netnews and snetnews have three sub-commands:

list 

lists news groups if no -g group option is specified, subject and and message numbers if a -g option is specified, or subjects of particular messages if message numbers or a message identifier are specified.

You can specify ultiple -F (From:), -s (Subject:) and -d (Date:) options. These options are combined using an AND operation so that messages must match all From:, Subject: and Date: parameters. Using more than one From: parameter is of limited utility.

read 

reads a message or messages. This is similar to the list command except that you must either specify a news group to read (with -g) or a message identifier (with -I). The whole message header and body is displayed for all messages that match the specified criteria.

You can specify ultiple -F (From:), -s (Subject:) and -d (Date:) options. These options are combined using an AND operation so that messages must match all From:, Subject: and Date: parameters. Using more than one From: parameter is of limited utility.

post 

posts the contents of the specified file as message using the specified Subject: and From: fields (given with the -s and -F, respectively). If a -s option does not specify the Subject: field. netnews and snetnews assume that the file contains all necessary headers.

Options

-b body 

specifies a regular expression to be matched against the main body of messages on the specified news server.

-d date 

specifies a regular expression to be matched against the Date: fields of messages on the specified news server.

Note:

The format of the Date: field may vary from news server to news server.

-F from 

specifies a user name.

With the post sub-command, this is the e-mail address for the From: field. If not specified, a default is created from the user's login name and the machine's domain name.

With the list and read sub-commands, it is a basic regular expression to be used to search for message authors.

-f Cafile 

specifies an alternate Certificate Authority file.

This option is for snetnews only.

-g group 

specifies the name of the news group (in standard dot delimited form).

With the list and read sub-commands, it is a basic regular expression to be used to search for news groups.

-I messageid 

specifies a message identifier (with or without closing angle brackets) to be read or listed with read or list, Message identifiers are unique to a message across all news servers and usually have a form similar to ab2qqq$6vh$1@news.domain.com.

-i 

ignores SSL security errors.

This option is for snetnews only.

-m message_num 

specifies the message number to be read or listed with read or list, This message number is unique to the particular news server. message_num may also be a range (for example, 50-100).

-p password 

specifies the passord for the given user name if required.

-S server 

specifies the NNTP server address, optionally followed by a colon (:) and the NNTP port number (119 by default for netnews, 563 for snetnews)

-s subject 

when used with the post command, specifies a subject line for the Subject field of the message

With the list and read sub-commands, it is a basic regular expression to be used to search for message subjects.

-t timeout 

specifies the maximum time that netnews or snetnews is to allow the server for processing a request.

-u username 

specifies the user name if required for accessing the news server.

-v 

provides verbose output, including details of all server interaction.


EXAMPLES

The following command lists all messages in the fictional alt.sample.group news group on the fictional news.domain.com server:

netnews -S news.domain.com -g alt.sample.group list

The following command lists messages 50 through 100 in the alt.sample.group news group on the news.domain.com server:

netnews -S news.domain.com -g alt.sample.group -m 150-175 list

The following command reads the message with message identifier ab2qqq$6vh$1@news.domain.com from the news.domain.com server and stores it in a file named news.out:

netnews -S news.domain.com -I `ab2qqq$6vh$1@news.domain.com' read news.out

The following command posts the contents of the file my.article with a subject line nntp problem to the alt.sample.group news group on the news.domain.com server:

netnews -S news.domain.com -g alt.sample.group -s "nntp problem" post my.article

DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

An error occurred.

2 

A usage error occurred.


PORTABILITY

Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.


AVAILABILITY

PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
$ROOTDIR/etc/openssl/mkcabundle.pl, openssl, web

Miscellaneous:
regexp


PTC MKS Toolkit 10.1 Documentation Build 15.