🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #47940

Re: E Mail addresses

#47940
From: Russ Allbery
Date: Fri, 18 Aug 2000 00:00
30 lines
1849 bytes
Benedict white <ben@cse-ltd.co.uk> writes:
> Russ Allbery wrote:

>>     Unlike the innd Perl filter, the nnrpd Perl filter can modify the
>>     %hdr hash.  In fact, if the Perl variable $modify_headers is set to
>>     true after filter_post() returns, the contents of the %hdr hash
>>     will be written back to the article replacing the original headers.
>>     filter_post() can therefore make any modifications it wishes to the
>>     headers and those modifications will be reflected in the article as
>>     it's finally posted.  The article body cannot be modified in this
>>     way; any changes to $body will just be ignored.

> Where do I set $modify_headers=true

$modify_headers = 1; is probably better.

You do this in filter_post.  In fact, something like:

sub filter_post {
    $modify_headers = 1;
    $hdr{From} = 'Anonymous <anonymous@anonymous.invalid>';
    return '';
}

is probably pretty close to exactly what you want.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

Technical Details
Message-ID: <ylzomadt2x.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-mail
References: <399D0B90.14DA6C2@cse-ltd.co.uk> <yl4s4ia3pj.fsf@windlord.stanford.edu> <399DA67C.B89D1CD0@cse-ltd.co.uk> <yl1yzmi6lp.fsf@windlord.stanford.edu> <399DD6C3.D4157B36@cse-ltd.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <ylzomadt2x.fsf@windlord.stanford.edu>
Subject: Re: E Mail addresses
Date: Fri, 18 Aug 2000 00:00:00 +0000
From: Russ Allbery <rra@stanford.edu>
References: <399D0B90.14DA6C2@cse-ltd.co.uk> <yl4s4ia3pj.fsf@windlord.stanford.edu> <399DA67C.B89D1CD0@cse-ltd.co.uk> <yl1yzmi6lp.fsf@windlord.stanford.edu> <399DD6C3.D4157B36@cse-ltd.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-mail
X-Deja-AN: 659924955
Content-Type: text/plain; charset=us-ascii
Organization: The Eyrie
Mime-Version: 1.0
User-Agent: Gnus/5.0802 (Gnus v5.8.2) XEmacs/21.1 (Biscayne)
Newsgroups: news.software.nntp