GENCANCEL(1)
GENCANCEL(1) π
okay bestie, welcome to the InterNetNews Documentation page for GENCANCEL(1) β yes, the manual name is folded in right here because weβre doing this cute and efficient π
πΈ NAME πΈ
gencancel β generate cancel control messages
β¨ SYNOPSIS β¨
gencancel [-adkLm] [-b body] [-c charset] [-f from] [-n newsgroups] [-s subject] message-id
π DESCRIPTION π
Okay so picture this: gencancel is the news administratorβs helpful little tool for generating cancel control messages, and it writes them straight to standard output. Then you can inject the generated cancel article with inews β see the examples below, bestie β¨
gencancel expects the Message-ID of the article to cancel. That message-id argument should be properly quoted for the shell and surrounded by angle brackets. Then gencancel will try to read the original article in the news spool to figure out the original newsgroups it was posted to, and it re-uses that info for the cancel control message. If you want to modify that, or if the info was not found, youβll have to set it with the -n flag, fr fr.
If INN was built with Cancel-Lock support, gencancel will generate the right admin Cancel-Key header field to use in order to authenticate cancels. If, for whatever reason, you need cancelling an article posted from your news server with a Cancel-Lock header field, the corresponding admin Cancel-Key hashes are needed to authenticate the withdrawal request. That information is computed with the canlockadmin parameter set in inn-secrets.conf.
In case you only need the admin Cancel-Key hashes, you can use the -k flag. Only the body of the Cancel-Key header field will then be written to standard output. You can then re-use it, for instance, in a supersede request or from another script. iconic behavior honestly π₯
π OPTIONS π
-aβ By default,gencanceloutputs anApprovedheader field, using the same value as theFromheader field body. If-ais used, noApprovedheader field is output. This header field is useful for cancelling articles originally posted to moderated newsgroups. If a cancel control article lists a moderated newsgroup in itsNewsgroupsheader field, and noApprovedheader field is present, the cancel will be sent to the moderator first for approval. Cancel control messages are not required to contain anApprovedheader field outside of moderated newsgroups, but can, so you shouldnβt generally use-aunless you really want your cancels to be approved by a moderator, or are sure theNewsgroupsheader field does not list any moderated newsgroups. read that caveat twice, bestie π-b bodyβ By default,gencancelwrites"Admin cancel."in the body of cancel control messages. Using this argument permits writing a different value, which may be empty or multi-line. cute and flexible π-c charsetβ By default,"ISO-8859-1"is specified as the used charset in theContent-Typeheader field. In case you change the default body with-b, you may want to also change charset accordingly.-dβgencancelgenerates aDateheader field in the local time of your news server. Using-dwill make use of a UTC date. timezone slay β°-f fromβgencanceluses by default the value ofcomplaintsininn.conffor theFromheader field. Using this argument permits setting the value you want. The same value will be used for theApprovedheader field (if generated, when-ais not given).-kβ Instead of outputting a whole cancel control message,gencancelwill just output the body of theCancel-Keyheader field with admin hashes. This flag is only available if INN was built with Cancel-Lock support. tiny flag, big power π-Lβgencanceloutputs by default aCancel-Keyheader field to authenticate the cancel control message. If-Lis used, noCancel-Keyheader field is output. This flag is only available if INN was built with Cancel-Lock support.-mβgencancelgenerates by default a randomMessage-IDand uses it as unique identifier of the cancel control message. If-mis used, noMessage-IDheader field is output.-n newsgroupsβgencancelgenerates by default the sameNewsgroupsheader field as the one present in the original article to cancel. This is done to best ensure that the cancel control message will be relayed to the same news servers as the original message. In case your news server does not (or no longer) locally carry the original article, you will have to give an explicit newsgroup or list of comma-separated newsgroups with this flag, that will be used as theNewsgroupsheader field of the cancel.-s subjectβgencanceluses by default"cmsg cancel <message-id>"as the subject of cancel control messages. Using this argument permits setting a different value for theSubjectheader field. Make sure it is properly MIME-encoded. no cap, MIME encoding is the vibe check here π§
π EXAMPLES π
To only retrieve the admin Cancel-Key hashes associated to the given Message-ID:
gencancel -k '<mid@news>'
If youβre using non-ASCII characters in headers, make sure you properly MIME-encode them. For instance, use the "Encode" Perl module:
FROM=$(perl -e 'use Encode;
print encode("MIME-Q",
decode("UTF-8", "Julien ΓLIE"));')
gencancel -f "$FROM <admin@news.server.com>" '<mid@news>'
Youβll then see in the output a properly MIME-encoded header field:
From: =?UTF-8?Q?Julien_=C3=89LIE?= <admin@news.server.com>
An example of call with a custom multi-line body:
gencancel -b "$(echo -e "Multi\nLine\nBody.")" '<mid@news>'
(Use -c to change the default Content-Type charset for the body.)
You can then pipe the result into inews -h -P -D (meaning inews expects an article with headers, does not add a Sender header field, and writes the result to standard output instead of actually injecting it):
gencancel '<mid@news>' | inews -h -P -D
If it all looks good, then inject it into the news system (without giving "-D" to inews):
gencancel '<mid@news>' | inews -h -P
Note that inews sends the message to the server specified in the server parameter in inn.conf. thatβs the whole pipeline bestie π«Ά
π¦ HISTORY π¦
Written by Julien Γlie for InterNetNews.
π SEE ALSO π
inews(1), inn-secrets.conf(5).
okay thatβs the whole page, bestie π β itβs from INN 2.7.4, dated 2023-04-16, and the footer/manual tag is GENCANCEL(1). go slay your cancels! πβ¨
π¦ where this page comes from
- arch rolling: inn 2.7.4-4 Β· ISC
- epel 10: inn 2.7.4-5.el10_3 Β· ISC AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND MIT AND NTP
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms