Article View: news.software.nntp
Article #39264Re: manipulating headers of incoming messages
From: Russ Allbery
Date: Wed, 18 Aug 1999 00:00
Date: Wed, 18 Aug 1999 00:00
41 lines
2693 bytes
2693 bytes
Heinz Ekker <hekker@netway.at> writes: > I asked myself if there's any possibility to manipulate the headers of > the incoming messages and remove the from:, x-trace: and > nntp-posting-host: fields. I found several perl-filtering tools & > patches, but all they do is either reject the message or spool them for > manual editing. > I know some perl, so it would be interesting if there is a possibility > to pipe articles through a script and then putting them into the spool. > There are several other possibilities, like going over the spool > directory with a perl-script, like setting up another server at another > port, etc. but this seems not really elegant, and at least, I thought to > give it a try ;) Are the articles locally posted? If so, get a recent version of INN and you can modify the headers in the Perl filter. Note that the articles still have to be syntactically valid, so you need to replace the From header with a bogus one containing something like an e-mail address, not just remove it. Then configure INN to not add NNTP-Posting-Host or X-Trace or the like, and you should be all set. If the articles aren't all locally posted, INN can't modify headers of incoming articles (and in general I'd be opposed to making that possible, just because there's too much potential for catastrophic misuse -- modifying an article and then passing it along to peers with the same message ID would cause serious problems for the rest of Usenet). I doubt any other major server can do so either, for similar reasons. I think your best bet would be to use one of those tools to spool all the articles you want to anonymize; usually they write them somewhere in incoming. Then, run your Perl script across all of the articles to take out the fields you don't want *and change the Newsgroups header to some local-only newsgroup and change the Message-ID to something else*. Make sure you do both of those! Then move the articles into the main incoming area and run rnews -U to post them all to your server. -- Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Technical Details
Message-ID:
<yl672dh0fr.fsf@windlord.stanford.edu>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:
<7pdtad$fvg$1@news.netway.at>Show Full Headers
Complete Article Headers
Message-ID: <yl672dh0fr.fsf@windlord.stanford.edu> Subject: Re: manipulating headers of incoming messages Date: Wed, 18 Aug 1999 00:00:00 +0000 From: Russ Allbery <rra@stanford.edu> References: <7pdtad$fvg$1@news.netway.at> 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: 514153706 Organization: The Eyrie Newsgroups: news.software.nntp