1GENCANCEL(1)              InterNetNews Documentation              GENCANCEL(1)
2
3
4

NAME

6       gencancel - Generate cancel control messages
7

SYNOPSIS

9       gencancel [-adkLm] [-b body] [-c charset] [-f from] [-n newsgroups] [-s
10       subject] message-id
11

DESCRIPTION

13       gencancel provides the news administrator with a helpful tool to
14       generate cancel control messages, writing them to standard output.  The
15       generated cancel article can then be injected by inews (see examples
16       below).
17
18       gencancel expects the Message-ID of the article to cancel; this
19       message-id argument should properly be quoted for the shell and
20       surrounded by angle brackets.  gencancel will then try to read the
21       original article in the news spool to determine the original newsgroups
22       it was posted to, and re-use that information for the cancel control
23       message.  If you want to modify that, or if the information was not
24       found, you'll have to set it with the -n flag.
25
26       If INN was built with Cancel-Lock support, gencancel will generate the
27       right admin Cancel-Key header field to use in order to authenticate
28       cancels.  If, for whatever reason, you need cancelling an article
29       posted from your news server with a Cancel-Lock header field, the
30       corresponding admin Cancel-Key hashes are needed to authenticate the
31       withdrawal request.  That information is computed with the canlockadmin
32       parameter set in inn-secrets.conf.
33
34       In case you only need the admin Cancel-Key hashes, you can use the -k
35       flag.  Only the body of the Cancel-Key header field will then be
36       written to standard output.  You can then re-use it for instance in a
37       supersede request or from another script.
38

OPTIONS

40       -a  gencancel outputs by default an Approved header field, using the
41           same value as the From header field body.  If -a is used, no
42           Approved header field is output.
43
44           This header field is useful for cancelling articles originally
45           posted to moderated newsgroups.  If a cancel control article lists
46           a moderated newsgroup in its Newsgroups header field, and no
47           Approved header field is present, the cancel will be sent to the
48           moderator first for approval.  Cancel control messages are not
49           required to contain an Approved header field outside of moderated
50           newsgroups, but can, so you shouldn't generally use -a unless you
51           really want your cancels to be approved by a moderator, or are sure
52           the Newsgroups header field does not list any moderated newsgroups.
53
54       -b body
55           gencancel writes by default "Admin cancel." in the body of cancel
56           control messages.  Using this argument permits writing a different
57           value, which may be empty or multi-line.
58
59       -c charset
60           By default, "ISO-8859-1" is specified as the used charset in the
61           Content-Type header field.  In case you change the default body
62           with -b, you may want to also change charset accordingly.
63
64       -d  gencancel generates a Date header field in the local time of your
65           news server.  Using -d will make use of a UTC date.
66
67       -f from
68           gencancel uses by default the value of complaints in inn.conf for
69           the From header field.  Using this argument permits setting the
70           value you want.  The same value will be used for the Approved
71           header field (if generated, when -a is not given).
72
73       -k  Instead of outputting a whole cancel control message, gencancel
74           will just output the body of the Cancel-Key header field with admin
75           hashes.
76
77           This flag is only available if INN was built with Cancel-Lock
78           support.
79
80       -L  gencancel outputs by default a Cancel-Key header field to
81           authenticate the cancel control message.  If -L is used, no Cancel-
82           Key header field is output.
83
84           This flag is only available if INN was built with Cancel-Lock
85           support.
86
87       -m  gencancel generates by default a random Message-ID and uses it as
88           unique identifier of the cancel control message.  If -m is used, no
89           Message-ID header field is output.
90
91       -n newsgroups
92           gencancel generates by default the same Newsgroups header field as
93           the one present in the original article to cancel.  This is done to
94           best ensure that the cancel control message will be relayed to the
95           same news servers as the original message.
96
97           In case your news server does not (or no longer) locally carry the
98           original article, you will have to give an explicit newsgroup or
99           list of comma-separated newsgroups with this flag, that will be
100           used as the Newsgroups header field of the cancel.
101
102       -s subject
103           gencancel uses by default "cmsg cancel <message-id>" as the subject
104           of cancel control messages.  Using this argument permits setting a
105           different value for the Subject header field.  Make sure it is
106           properly MIME-encoded.
107

EXAMPLES

109       To only retrieve the admin Cancel-Key hashes associated to the given
110       Message-ID:
111
112           gencancel -k '<mid@news>'
113
114       If you're using non-ASCII characters in headers, make sure you properly
115       MIME-encode them.  For instance, use the "Encode" Perl module:
116
117           FROM=$(perl -e 'use Encode;
118                           print encode("MIME-Q",
119                                        decode("UTF-8", "Julien ELIE"));')
120           gencancel -f "$FROM <admin@news.server.com>" '<mid@news>'
121
122       You'll then see in the output a properly MIME-encoded header field:
123
124           From: =?UTF-8?Q?Julien_=C3=89LIE?= <admin@news.server.com>
125
126       An example of call with a custom multi-line body:
127
128           gencancel -b "$(echo -e "Multi\nLine\nBody.")" '<mid@news>'
129
130       (Use -c to change the default Content-Type charset for the body.)
131
132       You can then pipe the result into "inews -h -P -D" (meaning inews
133       expects an article with headers, does not add a Sender header field,
134       and writes the result to standard output instead of actually injecting
135       it):
136
137           gencancel '<mid@news>' | inews -h -P -D
138
139       If it all looks good, then inject it into the news system (without
140       giving "-D" to inews):
141
142           gencancel '<mid@news>' | inews -h -P
143
144       Note that inews sends the message to the server specified in the server
145       parameter in inn.conf.
146

HISTORY

148       Written by Julien Elie for InterNetNews.
149

SEE ALSO

151       inews(1), inn-secrets.conf(5).
152
153
154
155INN 2.7.1                         2023-04-16                      GENCANCEL(1)
Impressum