🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
14 messages
14 total messages Started by Benedict White Fri, 18 Aug 2000 00:00
E Mail addresses
#47942
Author: Benedict White
Date: Fri, 18 Aug 2000 00:00
23 lines
1267 bytes
I am useing INN 2.x

Is there any way to stop news readers seeing other posters email
addresses?

The forums I am working on are of a politcal nature, and I do not want
of forum flaming and mail bombing occuring.

I know news readers can be set to hide this info, but that requires
technicly litereate users. They are not!

Kind regards


--
Benedict White
ben@cse-ltd.co.uk

DBase Charter Member (100 0723)



Re: E Mail addresses
#47934
Author: Benedict white
Date: Fri, 18 Aug 2000 00:00
37 lines
1649 bytes

Russ Allbery wrote:

> Benedict White <ben@cse-ltd.co.uk> writes:
>
> > I am useing INN 2.x
>
> > Is there any way to stop news readers seeing other posters email
> > addresses?
>
> For local newsgroups, or for world-wide distributed newsgroups?

Local

>
>
> If all of the newsgroups are strictly local, compile in Perl filtering
> support and write a filter_nnrpd.pl that sets the magic variable to allow
> header modification and then rewrites the From header into some generic
> anonymous address.  See the Perl hook documentation for more details on
> the specifics.

what is the magic variable?

Seems to me that so far i can only accept or reject.

>

Many thanks for your help.

Kindest Regards

Benedict White


Re: E Mail addresses
#47939
Author: Russ Allbery
Date: Fri, 18 Aug 2000 00:00
13 lines
1298 bytes
Benedict white <ben@cse-ltd.co.uk> writes:

> is there an easy way to seperate the from in to sender and email?

There isn't a perfect way without a lot of work, but there are various ad
hoc solutions that mostly work.  Are you trying to remove the e-mail
address and leave the name, or vice versa?  They make for very different
approaches.

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

Re: E Mail addresses
#47940
Author: 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/>

Re: E Mail addresses
#47944
Author: Russ Allbery
Date: Fri, 18 Aug 2000 00:00
23 lines
1456 bytes
Benedict White <ben@cse-ltd.co.uk> writes:

> I am useing INN 2.x

> Is there any way to stop news readers seeing other posters email
> addresses?

For local newsgroups, or for world-wide distributed newsgroups?

If all of the newsgroups are strictly local, compile in Perl filtering
support and write a filter_nnrpd.pl that sets the magic variable to allow
header modification and then rewrites the From header into some generic
anonymous address.  See the Perl hook documentation for more details on
the specifics.

That will take care of all local posts, but not posts you receive from
other servers.  If you have to take care of those as well, I don't know of
a way without code modifications to nnrpd.

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

Re: E Mail addresses
#47956
Author: Russ Allbery
Date: Fri, 18 Aug 2000 00:00
26 lines
1959 bytes
Benedict white <ben@cse-ltd.co.uk> writes:

> trying to leave the name, and reemove the email. The idea being that you
> can post messages in your full name, as I do here, but not leave contact
> info for 'cranks'. Any complaints about posters then have to go throgh
> the site moderator, if appropriate.

Try something like this:

    local $_ = $hdr{From};
    s/\s*<.*?>// || s/^.*?\((.*)\)/$1/ || ($_ = '');
    $hdr{From} = $_ . ' <anonymous@anonymous.invalid>';

The first regex deals with From lines like mine with the address in angle
brackets; the second triggers if it fails and tries to deal with a From
line like "address@example.com (John Doe)"; and failing both of those it
throws away the whole header rather than make a mistake.  It's possible to
break the above, but it requires someone really be trying.

It adds some e-mail address back in so that INN's normal header validation
doesn't complain.

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

Re: E Mail addresses
#47959
Author: Russ Allbery
Date: Fri, 18 Aug 2000 00:00
18 lines
1496 bytes
Benedict white <ben@cse-ltd.co.uk> writes:

> what is the magic variable?  Seems to me that so far i can only accept
> or reject.

    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.

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

Re: E Mail addresses
#47960
Author: Benedict white
Date: Fri, 18 Aug 2000 00:00
36 lines
1913 bytes

Russ Allbery wrote:

> Benedict White <ben@cse-ltd.co.uk> writes:
>
> > I am useing INN 2.x
>
> > Is there any way to stop news readers seeing other posters email
> > addresses?
>
> For local newsgroups, or for world-wide distributed newsgroups?
>
> If all of the newsgroups are strictly local, compile in Perl filtering
> support and write a filter_nnrpd.pl that sets the magic variable to allow
> header modification and then rewrites the From header into some generic
> anonymous address.  See the Perl hook documentation for more details on
> the specifics.
>
> That will take care of all local posts, but not posts you receive from
> other servers.  If you have to take care of those as well, I don't know of
> a way without code modifications to nnrpd.
>
> --
> Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

many thanks. All done bar the specifics on filtering out the email address.
Will see if I can find the docs.

Kind regards

Benedict White



Re: E Mail addresses
#47971
Author: Benedict white
Date: Sat, 19 Aug 2000 00:37
21 lines
1844 bytes

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

Kindest regards

Benedict White

Re: E Mail addresses
#47972
Author: Benedict white
Date: Sat, 19 Aug 2000 01:18
38 lines
2488 bytes

Russ Allbery wrote:

> 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 '';
> }
>

Not quite, but good enough. no all I need to do is code the bit that seperates
the email from the sender and I am there. many thanks foor the map. maybe soon
I will be able to find my arse with both hands!

kind regards and thanks again

Benedict White

Re: E Mail addresses
#47973
Author: Benedict white
Date: Sat, 19 Aug 2000 01:20
40 lines
2549 bytes

Russ Allbery wrote:

> 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/>

is there an easy way to seperate the from in to sender and email?

Kindest regards

Benedict White

Re: E Mail addresses
#47975
Author: Benedict white
Date: Sat, 19 Aug 2000 01:33
21 lines
1974 bytes

> There isn't a perfect way without a lot of work, but there are various ad
> hoc solutions that mostly work.  Are you trying to remove the e-mail
> address and leave the name, or vice versa?  They make for very different
> approaches.
>

trying to leave the name, and reemove the email. The idea being that you can
post messages in your full name, as I do here, but not leave contact info for
'cranks'. Any complaints about posters then have to go throgh the site
moderator, if appropriate.

Many thanks for your help. I am looking through the sample file to figure out
how to seperate the two. Oh for Novell.

Kindest regards

Benedict White

Re: E Mail addresses
#47977
Author: Benedict white
Date: Sat, 19 Aug 2000 02:07
25 lines
1983 bytes

many many thanks. works for me.Have programmed in various languages since 79
(age 10), but this looks greek to me.

Will have to buy a book!

You have been most helpful. If you are ever over in the UK, i will buy you a
beer.

If you are interested, I am sticking up a news server to show the UK govt. how
its done, and to encourage free exchange of views. see::

news.cse-ltd.co.uk

and for comparison see
http://www.number-10.gov.uk/forum/ForumList.asp

Kindest regards

Benedict White

PS when I have the time I will get back to newws daily

Re: E Mail addresses
#47983
Author: Jeremy
Date: Sat, 19 Aug 2000 04:07
9 lines
920 bytes
Russ Allbery  <rra@stanford.edu> wrote:

>     s/\s*<.*?>// || s/^.*?\((.*)\)/$1/ || ($_ = '');

I love Perl.  Music to my eyes.

-- 
Jeremy  (  jeremy@exit109.com  |  bofh@netscum.dk  )
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads