tinews.pl(1)

NAME
tinews.pl - Post and sign an article via NNTP

SYNOPSIS
tinews.pl [OPTIONS] < input

DESCRIPTION
tinews.pl reads an article on STDIN, signs it via pgp(1) or gpg(1) and posts it to a newsserver.

If the article contains To:, Cc: or Bcc: headers and mail-actions are configured it will automatically add a "Posted-And-Mailed: yes" header to the article and send out the mail-copies.

If a Cancel-Lock secret file is defined it will automatically add a Cancel-Lock: (and Cancel-Key: if required) header.

The input should have unix line endings (<LF>, '\n').

OPTIONS

-a "Approved" | --approved "Approved"
    Set the article header field Approved: to the given value.

-c "Control" | --control "Control"
    Set the article header field Control: to the given value.

-d "Distribution" | --distribution "Distribution"
    Set the article header field Distribution: to the given value.

-e "Expires" | --expires "Expires"
    Set the article header field Expires: to the given value.

-f "From" | --from "From"
    Set the article header field From: to the given value.

-n "Newsgroups" | --newsgroups "Newsgroups"
    Set the article header field Newsgroups: to the given value.

-o "Organization" | --organization "Organization"
    Set the article header field Organization: to the given value.

-p "port" | --port "port"
    use "port" as NNTP-port

-r "Reply-To" | --replyto "Reply-To"
    Set the article header field Reply-To: to the given value.

-s directory | --savedir directory
    Save signed article to directory directory instead of posting.

-t "Subject" | --subject "Subject"
    Set the article header field Subject: to the given value.

-v | --version
    Show version.

-w "Followup-To" | --followupto "Followup-To"
    Set the article header field Followup-To: to the given value.

-x "Path" | --path "Path"
    Set the article header field Path: to the given value.

-H | --help
    Show help-page.

-L | --no-canlock
    Do not add Cancel-Lock: / Cancel-Key: headers.

-R | --no-control
    Restricted mode, disallow control-messages.

-S | --no-signature
    Do not append $HOME/.signature.

-X | --no-sign
    Do not sign the article.

-Y | --force-auth
    Force authentication on connect even if not required by the server.

-A -V -W
    These options are accepted for compatibility reasons but ignored.

-h | --headers
    These options are accepted for compatibility reasons but ignored.

-O | --no-organization
    These options are accepted for compatibility reasons but ignored.

-D | -N | --debug
    These options are accepted but do not have any functionality yet.

EXIT STATUS
The following exit values are returned:

0   Successful completion.

!=0 An error occurred.

ENVIRONMENT

$NNTPSERVER
    Set to override the NNTP server configured in the source.

$NNTPPORT
    The NNTP TCP-port to post news to. This variable only needs to be set if the TCP-port is not 119 (the default). The '-p' command-line option overrides $NNTPPORT.

$PGPPASS
    Set to override the passphrase configured in the source (used for pgp(1)-2.6.3).

$PGPPASSFILE
    Passphrase file used for pgp(1) or gpg(1).

$SIGNER
    Set to override the user-id for signing configured in the source. If you neither set $SIGNER nor configure it in the source the contents of the From:-field will be used.

$REPLYTO
    Set the article header field Reply-To: to the return address specified by the variable if there isn't already a Reply-To: header in the article. The '-r' command-line option overrides $REPLYTO.

$ORGANIZATION
    Set the article header field Organization: to the contents of the variable if there isn't already a Organization: header in the article. The '-o' command-line option overrides $ORGANIZATION.

$DISTRIBUTION
    Set the article header field Distribution: to the contents of the variable if there isn't already a Distribution: header in the article. The '-d' command-line option overrides $DISTRIBUTION.

FILES

pgptmp.txt
    Temporary file used to store the reformatted article.

pgptmp.txt.asc
    Temporary file used to store the reformatted and signed article.

$PGPPASSFILE
    The passphrase file to be used for pgp(1) or gpg(1).

$HOME/.signature
    Signature file which will be automatically included.

$HOME/.cancelsecret
    The passphrase file to be used for Cancel-Locks. This feature is turned off by default.

$HOME/.newsauth
    "nntpserver password [user]" pairs for NNTP servers that require authorization. Any line that starts with "#" is a comment. Blank lines are ignored. This file should be readable only for the user as it contains the user's uncrypted password for reading news. First match counts. If no matching entry is found $HOME/.nntpauth is checked.

$HOME/.nntpauth
    "nntpserver user password" pairs for NNTP servers that require authorization. First match counts. Lines starting with "#" are skipped and blank lines are ignored. This file should be readable only for the user as it contains the user's uncrypted password for reading news. $HOME/.newsauth is checked first.

$XDG_CONFIG_HOME/tinewsrc $HOME/.config/tinewsrc $HOME/.tinewsrc
    "option=value" configuration pairs. Lines that start with "#" are ignored. If the file contains uncrypted passwords (e.g. NNTPPass or PGPPass), it should be readable for the user only.

SECURITY
If you've configured or entered a password, even if the variable that contained that password has been erased, it may be possible for someone to find that password, in plaintext, in a core dump. In short, if serious security is an issue, don't use this script.

NOTES
tinews.pl is designed to be used with pgp(1)-2.6.3, pgp(1)-5, pgp(1)-6 and gpg(1).

tinews.pl requires the following standard modules to be installed: Getopt::Long(3pm), Net::NNTP(3pm), Time::Local(3pm) and Term::Readline(3pm).

If the Cancel-Lock feature is enabled the following additional modules must be installed: MIME::Base64(3pm), Digest::SHA(3pm) or Digest::SHA1(3pm) and Digest::HMAC_SHA1(3pm)

AUTHOR
Urs Janssen <urs@tin.org>, Marc Brockschmidt <marc@marcbrockschmidt.de>

SEE ALSO
pgp(1), gpg(1), pgps(1), Digest::HMAC_SHA1(3pm), Digest::SHA(3pm), Digest::SHA1(3pm), Getopt::Long(3pm), MIME::Base64(3pm), Net::NNTP(3pm), Time::Local(3pm), Term::Readline(3pm)