Article View: news.software.nntp
Article #24397Re: New approach for NoCeM-on-spool history updates?
From: Andrew Gierth
Date: Mon, 15 Dec 1997 00:00
Date: Mon, 15 Dec 1997 00:00
101 lines
4557 bytes
4557 bytes
>>>>> "Joe" == Joe Greco <jgreco@ns.sol.net> writes:
Joe> I guess I'm unclear on what the purpose of the complexity is.
What complexity?
My approach to patching INN (or anything else that I didn't write) is
usually to keep changes minimal, and as non-intrusive as possible. In
particular, using an article rather than new NNTP commands or the
control channel simplifies the possible interactions with pausing or
throttling the server. (It also requires considerably fewer changes,
amounting to 3 new lines of code in an existing function and one new
function of <80 lines.)
Joe> A NoCeM process needs to read the list of Message-ID's, try to add
Joe> each one to history (perhaps along with <cancel.$*>), and if the
Joe> addition fails due to collision, use the just-accessed data to
Joe> remove the already existing file.
Joe> Ideally, the only part that INN should have to do is the history
Joe> addition/lookup part.
Exactly.
Joe> Define a new INN control command, something
Joe> akin to "addhist", which returns "Ok" or "/path/to/articles".
Joe> Or, if you want to be more clever, extend the streaming NNTP
Joe> protocol extensions to do this in an asynchronous manner.
Joe> JUNKTHIS <luser.article.1@host.domain.com>
Joe> 235 Ok
Joe> or
Joe> 435 /path/to/articles
What do you do when the list of article paths is too long for an NNTP
response?
Joe> Using an actual article, however, is probably more pain than it
Joe> is worth, and trying to set up channel feeds, etc., to deal with
Joe> it is just a train wreck that is already happening.
Well, having implemented it, it seems to me to be considerably less
pain. Here's how I currently have it set up:
nocemchan\
:!*,news.lists.filters,news.admin.net-abuse.bulletins\
:Ap,Tc,WO:/usr/news/bin/nocemchan
xcancel:!*/local:Adp,G1,Tc,Wn:/usr/news/bin/xcancelchan
(note that I have MERGE_TO_GROUPS DO, and no to.xcancel group in
active; the fact that no groups are fed to xcancel is deliberate.
nocemchan reads the whole overview as being the simplest way to
exclude followups and non-NoCeMs before invoking PGP on the article;
the traffic in nana.bulletins is mostly non-NoCeM these days.)
The nocemchan program (which is only a skeleton at this stage; it
functions, but doesn't yet handle minor details like configuration
files or error handling) takes the NoCeM articles, verifies them and
extracts the message-ids, and produces an article in this form:
Path: xcancel
From: xcancel
Subject: xcancel from <nocem-notice-id>
Control: cmsg xaddhist erlenstar.demon.co.uk
Date: (whatever)
Message-ID: (generated)
Newsgroups: to.xcancel
<luser-1-message-id@spamming.site>
<luser-2-message-id@spamming.site>
<luser-3-message-id@spamming.site>
etc.
It then dumps this into innd, which rewrites the article body to look
like this:
ADDED <luser-1-message-id@spamming.site>
FOUND <luser-2-message-id@spamming.site> news/software/nntp/1234
FOUNDNOFILES <luser-3-message-id@spamming.site>
Since neither the message-ids nor the filenames can contain spaces or
newlines, this can be read and parsed by a trivial program
(xcancelchan) to actually perform the unlinks (either directly, via
fastrm, or whatever method takes your fancy). (Any lines in the
original that don't contain valid message-ids are output with 'INVALID '
prefixed.)
Notice that since to.xcancel isn't a group, the xaddhist article will
not be propagated anywhere except to xcancelchan (not even via
control* feeds). Also, any cmsg xaddhist received from an external
feed or carrying the wrong sitename is cancelled rather than processed.
--
Andrew.
Technical Details
Message-ID:
<87u3cbhspn.fsf@erlenstar.demon.co.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<87g1nwml64.fsf@erlenstar.demon.co.uk> <671psa$ln1@newsops.execpc.com>Show Full Headers
Complete Article Headers
Message-ID: <87u3cbhspn.fsf@erlenstar.demon.co.uk> Subject: Re: New approach for NoCeM-on-spool history updates? Date: Mon, 15 Dec 1997 00:00:00 +0000 From: Andrew Gierth <andrew@erlenstar.demon.co.uk> References: <87g1nwml64.fsf@erlenstar.demon.co.uk> <671psa$ln1@newsops.execpc.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 298314377 X-NNTP-Posting-Host: erlenstar.demon.co.uk [194.222.144.22] X-Mayan-Date: Long count = 12.19.4.13.13; tzolkin = 3 Ben; haab = 11 Mac Organization: disorganised X-Attribution: AG X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29 Newsgroups: news.software.nntp