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