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 build with Cancel-Lock support, gencancel will generate the
27       right Cancel-Key header field to use in order to authenticate cancels.
28       If, for whatever reason, you need cancelling an article posted from
29       your news server with a Cancel-Lock header field, the corresponding
30       admin Cancel-Key hashes are needed to authenticate the withdrawal
31       request.  That information is computed with the canlockadmin parameter
32       set in inn-secrets.conf.
33
34       In case you only need the Cancel-Key hashes, you can use the -k flag.
35       Only the body of the Cancel-Key header field will then be written to
36       standard output.  You can then re-use it for instance in a supersede
37       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.
75
76           This flag is only available if INN was built with Cancel-Lock
77           support.
78
79       -L  gencancel outputs by default a Cancel-Key header field to
80           authenticate the cancel control message.  If -L is used, no Cancel-
81           Key header field is output.
82
83           This flag is only available if INN was built with Cancel-Lock
84           support.
85
86       -m  gencancel generates by default a random Message-ID and uses it as
87           unique identifier of the cancel control message.  If -m is used, no
88           Message-ID header field is output.
89
90       -n newsgroups
91           gencancel generates by default the same Newsgroups header field as
92           the one present in the original article to cancel.  This is done to
93           best ensure that the cancel control message will be relayed to the
94           same news servers as the original message.
95
96           In case your news server does not (or no longer) locally carry the
97           original article, you will have to give an explicit newsgroup or
98           list of comma-separated newsgroups with this flag, that will be
99           used as the Newsgroups header field of the cancel.
100
101       -s subject
102           gencancel uses by default "cmsg cancel <message-id>" as the subject
103           of cancel control messages.  Using this argument permits setting a
104           different value for the Subject header field.  Make sure it is
105           properly MIME-encoded.
106

EXAMPLES

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

HISTORY

144       Written by Julien Elie for InterNetNews.
145

SEE ALSO

147       inews(1), inn-secrets.conf(5).
148
149
150
151INN 2.7.0                         2022-07-10                      GENCANCEL(1)
Impressum