1tinews.pl(1) Post and sign an article via NNTP tinews.pl(1)
2
3
4
6 tinews.pl - Post and sign an article via NNTP
7
9 tinews.pl [OPTIONS] < input
10
12 tinews.pl reads an article on STDIN, signs it via pgp(1) or gpg(1) and
13 posts it to a news server.
14
15 The article shall not contain any raw 8-bit data or it needs to already
16 have the relevant MIME-headers as tinews.pl will not add any MIME-
17 headers nor encode its input.
18
19 If the article contains To:, Cc: or Bcc: headers and mail-actions are
20 configured it will automatically add a "Posted-And-Mailed: yes" header
21 to the article and send out the mail-copies.
22
23 If a Cancel-Lock secret file is defined it will automatically add a
24 Cancel-Lock: (and Cancel-Key: if required) header.
25
26 The input should have unix line endings (<LF>, '\n'). Use --transform
27 to convert from <CR><LF> to just <LF>.
28
30 -a "Approved" | --approved "Approved"
31 Set the article header field Approved: to the given value.
32
33 -c "Control" | --control "Control"
34 Set the article header field Control: to the given value.
35
36 -d "Distribution" | --distribution "Distribution"
37 Set the article header field Distribution: to the given value.
38
39 -e "Expires" | --expires "Expires"
40 Set the article header field Expires: to the given value.
41
42 -f "From" | --from "From"
43 Set the article header field From: to the given value.
44
45 -i header | --ignore-headers header
46 Comma separated list of headers that will be ignored during
47 signing. Usually the following headers will be signed if present:
48
49 From, Newsgroups, Subject, Control, Supersedes, Followup-To, Date,
50 Injection-Date, Sender, Approved, Message-ID, Reply-To, Cancel-Key,
51 Also-Control and Distribution.
52
53 Some of them may be altered on the Server (i.e. Cancel-Key) which
54 would invalid the signature, this option can be used the exclude
55 such headers if required.
56
57 -n "Newsgroups" | --newsgroups "Newsgroups"
58 Set the article header field Newsgroups: to the given value.
59
60 -o "Organization" | --organization "Organization"
61 Set the article header field Organization: to the given value.
62
63 -p "port" | --port "port"
64 use "port" as NNTP-port
65
66 -r "Reply-To" | --reply-to "Reply-To"
67 Set the article header field Reply-To: to the given value.
68
69 -s directory | --savedir directory
70 Save signed article to directory directory instead of posting.
71
72 -t "Subject" | --subject "Subject"
73 Set the article header field Subject: to the given value.
74
75 -v | --verbose
76 Warn about disabled options due to lacking perl-modules or
77 executables and unreadable files and enable warnings about raw
78 8-bit data.
79
80 -w "Followup-To" | --followup-to "Followup-To"
81 Set the article header field Followup-To: to the given value.
82
83 -x "Path" | --path "Path"
84 Set the article header field Path: to the given value.
85
86 -D | -N | --debug
87 Set Net::NNTP(3pm) to debug mode, enable warnings about raw 8-bit
88 data, warn about disabled options due to lacking perl-modules or
89 executables and unreadable files.
90
91 -H | --help
92 Show help-page.
93
94 -I | --no-injection-date
95 Do not add Injection-Date: header.
96
97 -L | --no-canlock
98 Do not add Cancel-Lock: / Cancel-Key: headers.
99
100 -O | --no-organization
101 Do not add Organization: header.
102
103 -R | --no-control
104 Restricted mode, disallow control-messages.
105
106 -S | --no-signature
107 Do not append $HOME/.signature.
108
109 -X | --no-sign
110 Do not sign the article.
111
112 -Y | --force-auth
113 Force authentication on connect even if not required by the server.
114
115 --canlock-algorithm "Algorithm"
116 Digest algorithm used for Cancel-Lock: / Cancel-Key: headers.
117 Supported algorithms are sha1, sha256 and sha512. Default is sha1.
118
119 --ssl | --nntps
120 Use NNTPS (via port 563) if available. This requires a recent
121 version of Net::NNTP(3pm) and IO::Socket::SSL(3pm). Be aware that
122 no SSL verification will be done.
123
124 --transform
125 Convert network line endings (<CR><LF>) to unix line endings
126 (<LF>).
127
128 --version
129 Show version.
130
131 -A -V -W
132 These options are accepted for compatibility reasons but ignored.
133
134 -h | --headers
135 These options are accepted for compatibility reasons but ignored.
136
138 The following exit values are returned:
139
140 0 Successful completion.
141
142 !=0 An error occurred.
143
145 $NEWSHOST
146 Set to override the NNTP server configured in the source or config-
147 file. It has lower priority than $NNTPSERVER and should be
148 avoided.
149
150 $NNTPSERVER
151 Set to override the NNTP server configured in the source or config-
152 file. This has higher priority than $NEWSHOST.
153
154 $NNTPPORT
155 The NNTP TCP-port to post news to. This variable only needs to be
156 set if the TCP-port is not 119 (the default). The '-p' command-line
157 option overrides $NNTPPORT.
158
159 $PGPPASS
160 Set to override the passphrase configured in the source (used for
161 pgp(1)-2.6.3).
162
163 $PGPPASSFILE
164 Passphrase file used for pgp(1) or gpg(1).
165
166 $SIGNER
167 Set to override the user-id for signing configured in the source.
168 If you neither set $SIGNER nor configure it in the source the
169 contents of the From:-field will be used.
170
171 $REPLYTO
172 Set the article header field Reply-To: to the return address
173 specified by the variable if there isn't already a Reply-To: header
174 in the article. The '-r' command-line option overrides $REPLYTO.
175
176 $ORGANIZATION
177 Set the article header field Organization: to the contents of the
178 variable if there isn't already an Organization: header in the
179 article. The '-o' command-line option overrides $ORGANIZATION, The
180 '-O' command-line option disables it.
181
182 $DISTRIBUTION
183 Set the article header field Distribution: to the contents of the
184 variable if there isn't already a Distribution: header in the
185 article. The '-d' command-line option overrides $DISTRIBUTION.
186
188 pgptmp.txt
189 Temporary file used to store the reformatted article.
190
191 pgptmp.txt.asc
192 Temporary file used to store the reformatted and signed article.
193
194 $PGPPASSFILE
195 The passphrase file to be used for pgp(1) or gpg(1).
196
197 $HOME/.signature
198 Signature file which will be automatically included.
199
200 $HOME/.cancelsecret
201 The passphrase file to be used for Cancel-Locks. This feature is
202 turned off by default.
203
204 $HOME/.newsauth
205 "nntpserver password [user]" pairs for NNTP servers that require
206 authorization. Any line that starts with "#" is a comment. Blank
207 lines are ignored. This file should be readable only for the user
208 as it contains the user's unencrypted password for reading news.
209 First match counts. If no matching entry is found $HOME/.nntpauth
210 is checked.
211
212 $HOME/.nntpauth
213 "nntpserver user password" pairs for NNTP servers that require
214 authorization. First match counts. Lines starting with "#" are
215 skipped and blank lines are ignored. This file should be readable
216 only for the user as it contains the user's unencrypted password
217 for reading news. $HOME/.newsauth is checked first.
218
219 $XDG_CONFIG_HOME/tinewsrc $HOME/.config/tinewsrc $HOME/.tinewsrc
220 "option=value" configuration pairs. Lines that start with "#" are
221 ignored. If the file contains unencrypted passwords (e.g. nntp-
222 pass or pgp-pass), it should be readable for the user only.
223
225 If you've configured or entered a password, even if the variable that
226 contained that password has been erased, it may be possible for someone
227 to find that password, in plaintext, in a core dump. In short, if
228 serious security is an issue, don't use this script.
229
230 Be aware that even if NNTPS is used still no SSL verification will be
231 done.
232
234 tinews.pl is designed to be used with pgp(1)-2.6.3, pgp(1)-5, pgp(1)-6,
235 gpg(1) and gpg2(1).
236
237 tinews.pl requires the following standard modules to be installed:
238 Getopt::Long(3pm), Net::NNTP(3pm), <Time::Local(3pm)> and
239 Term::Readline(3pm).
240
241 NNTPS (NNTP with implicit TLS; RFC 4642 and RFC 8143) may be
242 unavailable if Net::NNTP(3pm) is too old or IO::Socket::SSL(3pm) is
243 missing on the system. tinews.pl will fallback to unencrypted NNTP in
244 that case.
245
246 If the Cancel-Lock feature (RFC 8315) is enabled the following
247 additional modules must be installed: MIME::Base64(3pm),
248 Digest::SHA(3pm) or Digest::SHA1(3pm) and Digest::HMAC_SHA1(3pm).
249 sha256 and sha512 as algorithms for canlock-algorithm are only
250 available with Digest::SHA(3pm).
251
252 gpg2(1) users may need to set $GPG_TTY, i.e.
253
254 GPG_TTY=$(tty)
255 export GPG_TTY
256
257 before using tinews.pl. See <https://www.gnupg.org/> for details.
258
259 tinews.pl does not do any MIME encoding, its input should be already
260 properly encoded and have all relevant headers set.
261
263 Urs Janssen <urs@tin.org>, Marc Brockschmidt <marc@marcbrockschmidt.de>
264
266 pgp(1), gpg(1), gpg2(1), pgps(1), Digest::HMAC_SHA1(3pm),
267 Digest::SHA(3pm), Digest::SHA1(3pm), Getopt::Long(3pm),
268 IO::Socket::SSL(3pm), MIME::Base64(3pm), Net::NNTP(3pm),
269 Time::Local(3pm), Term::Readline(3pm)
270
271
272
2731.1.57 December 24th, 2020 tinews.pl(1)