Article View: news.software.nntp
Article #89218Requirement specifications for a tool for news admin cancels
From: Julien ÉLIE
Date: Sat, 19 Feb 2022 22:40
Date: Sat, 19 Feb 2022 22:40
90 lines
5109 bytes
5109 bytes
Hi all,
I am finalizing the integration of Cancel-Lock into INN, based on the libcanlock library maintained by Michael (and Dennis Preiser before him).
As the news admin needs an easy way to cancel articles sent from his news server in case of abuse or for whatever reason, I have added a "gencancel" tool that generates the cancel control article to send. As a matter of fact, he needs computing the right Cancel-Key header field to authenticate the cancel with his admin secret.
Here is what I have come up with right now:
Usage: gencancel [-adkm] [-b body] [-c charset] [-f from] [-n newsgroups]
[-s subject] '<Message-ID>'
-a Do not add an Approved header field
-b body Use the argument as the body of the cancel article
-c charset Use the argument for the Content-Type charset
-d Do not use local time for the Date header field
-f from Use the argument for the From and Approved header fields
-k Only write the body of the Cancel-Key header field
-m Do not generate a Message-ID for the cancel article
-n newsgroups Use the argument for the Newsgroups header field
-s subject Use the argument for the Subject header field
Message-ID The Message-ID to cancel (with quotes around for the
shell, and angle brackets)
% gencancel '<an-unknown-article-to-cancel@example.com>'
gencancel: Cannot find article <an-article-to-cancel@example.com> in history; you may want to use -n
The Newsgroups header field will be automatically set to the value of the original article (if still in your news spool).
Otherwise, "-n news.software.nntp" should be for instance given.
Basically, it will generate a proto-article like this:
% gencancel '<an-article-to-cancel@example.com>' -f 'newsadmin@example.com'
From: newsadmin@example.com
Newsgroups: local.test
Subject: cmsg cancel <an-article-to-cancel@example.com>
Control: cancel <an-article-to-cancel@example.com>
Date: Sat, 19 Feb 2022 23:18:34 +0100 (CET)
Approved: newsadmin@example.com
Message-ID: <surqbq$24bml$1@news.trigofacile.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Cancel-Key: sha1:w1saUe2FYUi48sVbVtKcm7cdznE= sha256:3Wb6ayHU0EdK7BQGIa6vma6RpPRgzo1lmxphpu5zaUo=
Admin cancel.
which can be piped into inews, and that's it. Cancel done!
I've kept the legacy "cmsg cancel <mid>" as default Subject but I can put "cancel <mid>" or any better idea as default.
% gencancel '<an-article-to-cancel@example.com>' | inews -h -s
(-h to say the proto-article contains headers, -s to prevent the addition of a Sender header field)
Also, for people just wanting the hashes to use, the -k parameter outputs them:
% gencancel '<an-article-to-cancel@example.com>' -k
sha1:w1saUe2FYUi48sVbVtKcm7cdznE= sha256:3Wb6ayHU0EdK7BQGIa6vma6RpPRgzo1lmxphpu5zaUo=
This way, the news admin or an external program can easily make use of them (for a supersede request for instance).
If Cancel-Lock support is not enabled, gencancel also works for unauthenticated cancels (it will just not generate the Cancel-Key header field).
Naturally, if one wants to customize even more the output of gencancel, he can echo additional header fields, modify existing fields with sed or any commands he wants.
That's why I think this basic gencancel should normally fit most (if not all) needs.
But I prefer to ask here, in case I missed something important.
So, do you think this proposal is enough for the needs of news admins?
Otherwise, what would you need?
Better provide the useful stuff in the initial release than having to ask and then wait for the next release!
--
Julien ÉLIE
« Nul n'entre ici s'il n'est géomètre. » (Platon)
Technical Details
Message-ID:
<surrl2$24cfe$1@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <surrl2$24cfe$1@news.trigofacile.com> Subject: Requirement specifications for a tool for news admin cancels Date: Sat, 19 Feb 2022 23:40:33 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!not-for-mail Newsgroups: news.software.nntp Organization: Groupes francophones par TrigoFACILE Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 19 Feb 2022 22:40:34 -0000 (UTC) Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105"; logging-data="2241006"; mail-complaints-to="abuse@trigofacile.com" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Cancel-Lock: sha1:FhpwLcKVGl6052sy160et07m/9g= sha256:3nDBFw1nNN8C59zgw7HyMDXraVLJ+R0we7nfO76E3VA= sha1:HPwbijhhU0mRpwizE4xGGUXqLbw= sha256:w9smIW61Hlv0SPFr8OgbQko/i460MNJPZenvU1ofv8c=