tinews.pl(1)

πŸ“¦
version 2.6.6 Β· 2 versions
, in alpine 3.24, epel 10, fedora 43, fedora 44

✨ tinews.pl(1) ✨ β€” post & sign an article via NNTP πŸ’Œ

okay so bestie, imagine posting to Usenet but make it signed and secure and honestly a little bit iconic. that's this. it's tinews.pl(1) and she's the whole moment. 🫢


🌸 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 news server. that's the whole vibe. read, sign, yeet. πŸ’…

the article shall not contain any raw 8-bit data, or it needs to already have the relevant MIME-headers β€” because tinews.pl will not add any MIME-headers nor encode its input. she is not doing that for you, bestie, no cap. 😭

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. considerate queen behavior tbh. πŸ‘‘

if a Cancel-Lock secret file is defined it will automatically add a Cancel-Lock: (and Cancel-Key: if required) header. slay. πŸ”₯

the input should have unix line endings (<LF>, '\n'). use --transform to convert from <CR><LF> to just <LF>. do it. i'm begging. πŸ™ˆ


πŸ’… OPTIONS πŸ’…

  • -4 | --ipv4 β€” force connecting via IPv4 to the remote NNTP server.
  • -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.
  • -i header | --ignore-headers header β€” comma separated list of headers that will be ignored during signing. usually the following headers will be signed if present:

From, Newsgroups, Subject, Control, Supersedes, Followup-To, Date, Injection-Date, Sender, Approved, Message-ID, Reply-To, Cancel-Key, Also-Control and Distribution.

some of them may be altered on the Server (i.e. Cancel-Key) which would invalid the signature, this option can be used to exclude such headers if required. protect the vibes. πŸ›‘οΈ

  • -m "Message-ID" | --message-id "Message-ID" β€” set the article header field Message-ID: 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" | --reply-to "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 | --verbose β€” warn about disabled options due to lacking perl-modules or executables and unreadable files and enable warnings about raw 8-bit data. she's chatty and we love her for it.
  • -w "Followup-To" | --followup-to "Followup-To" β€” set the article header field Followup-To: to the given value.
  • -x "Path" | --path "Path" β€” prepend the article header field Path: with the given value.
  • -D | -N | --debug β€” set Net::NNTP(3pm) to debug mode, enable warnings about raw 8-bit data, warn about disabled options due to lacking perl-modules or executables and unreadable files.
  • -E | --discard-empty β€” silently discard an empty article. not today, nothing-burger. πŸ’€
  • -F | --references β€” set the article header field References: to the given value.
  • -H | --help β€” show help-page.
  • -I | --no-injection-date β€” do not add Injection-Date: header.
  • -L | --no-canlock β€” do not add Cancel-Lock: / Cancel-Key: headers.
  • -O | --no-organization β€” do not add Organization: header.
  • -R | --no-control β€” restricted mode, disallow control-messages.
  • -S | --no-signature β€” do not append $HOME/.signature.
  • -T "seconds" | --timeout "seconds" β€” override the connection timeout setting. default is 120 seconds.
  • -X | --no-sign β€” do not sign the article.
  • -Y | --force-auth β€” force authentication on connect even if not required by the server.
  • --canlock-algorithm "Algorithm" β€” digest algorithm used for Cancel-Lock: / Cancel-Key: headers. supported algorithms are sha1, sha256 and sha512. default is sha1.
  • --ssl | --nntps β€” use NNTPS (via port 563) if available. this requires a recent version of Net::NNTP(3pm) and IO::Socket::SSL(3pm). be aware that no SSL verification will be done. 🚨
  • --transform β€” convert network line endings (<CR><LF>) to unix line endings (<LF>).
  • --version β€” show version.
  • -A -V -W β€” these options are accepted for compatibility reasons but ignored. ghosts of manpages past, fr fr. πŸ‘»
  • -h | --headers β€” these options are accepted for compatibility reasons but ignored.

πŸ¦‹ EXIT STATUS πŸ¦‹

the following exit values are returned:

  1. 0 β€” successful completion. ate. ✨
  2. !=0 β€” an error occurred. 😭

🌈 ENVIRONMENT 🌈

  • $NEWSHOST β€” set to override the NNTP server configured in the source or config-file. it has lower priority than $NNTPSERVER and should be avoided.
  • $NNTPSERVER β€” set to override the NNTP server configured in the source or config-file. this has higher priority than $NEWSHOST.
  • $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 an Organization: header in the article. the '-o' command-line option overrides $ORGANIZATION, the '-O' command-line option disables it.
  • $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 or triples for NNTP servers that require authorization. first match counts. 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 unencrypted password for reading news. if no matching entry is found $HOME/.nntpauth is checked.
  • $HOME/.nntpauth β€” "nntpserver user password" triples 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 unencrypted password for reading news. $HOME/.newsauth is checked first.
  • $XDG_CONFIG_HOME/tinewsrc $HOME/.config/tinewsrc $HOME/.tinewsrc β€” "option=value" configuration pairs, last match counts and only "value" is case sensitive. lines that start with "#" are ignored. if the file contains unencrypted passwords (e.g. nntp-pass or pgp-pass), it should be readable for the user only. use -vH to get a full list of all available configuration options.

πŸ”’ 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. 😭 that's the tea, bestie, and it's not the fun kind.
be aware that even if NNTPS is used still no SSL verification will be done. 🚩

πŸ“ NOTES πŸ“

tinews.pl is designed to be used with pgp(1)-2.6.3, pgp(1)-5, pgp(1)-6, gpg(1) and gpg2(1). the whole roster, honestly. πŸ‘‘

tinews.pl requires the following standard modules to be installed: Getopt::Long(3pm), Net::NNTP(3pm), Time::Local(3pm) and Term::Readline(3pm). no modules no service, that's the rule. πŸ’…

NNTPS (NNTP with implicit TLS; RFC 4642 and RFC 8143) may be unavailable if Net::NNTP(3pm) is too old or IO::Socket::SSL(3pm) is missing on the system. tinews.pl will fallback to unencrypted NNTP in that case.

if the Cancel-Lock feature (RFC 8315) is enabled the following additional modules must be installed: MIME::Base64(3pm), Digest::SHA(3pm) or Digest::SHA1(3pm) and Digest::HMAC_SHA1(3pm). sha256 and sha512 as algorithms for canlock-algorithm are only available with Digest::SHA(3pm).

gpg2(1) users may need to set $GPG_TTY, i.e.

GPG_TTY=$(tty)
export GPG_TTY

before using tinews.pl. see <https://www.gnupg.org/> for details. do not skip this step, i will find out. πŸ™ˆ

tinews.pl does not do any MIME encoding, its input should be already properly encoded and have all relevant headers set. she said bring your own encoding. 😌


πŸ‘‘ AUTHOR πŸ‘‘

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


πŸ”— SEE ALSO πŸ”—

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


and that's the page, bestie πŸ’œ this one is version 1.1.70, dated October 16th, 2024 β€” she's giving vintage but still serving πŸŽ€ go sign something pretty. βœ¨πŸ¦‹

πŸ“¦ where this page comes from