Article View: news.software.nntp
Article #47956Re: E Mail addresses
From: Russ Allbery
Date: Fri, 18 Aug 2000 00:00
Date: Fri, 18 Aug 2000 00:00
26 lines
1959 bytes
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/>
Technical Details
Message-ID:
<yl3dk2cc52.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:
<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> <ylzomadt2x.fsf@windlord.stanford.edu> <399DE0DD.888A07E@cse-ltd.co.uk> <ylem3mccwm.fsf@windlord.stanford.edu> <399DE3EE.33A848AA@cse-ltd.co.uk>Show Full Headers
Complete Article Headers
Message-ID: <yl3dk2cc52.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> <ylzomadt2x.fsf@windlord.stanford.edu> <399DE0DD.888A07E@cse-ltd.co.uk> <ylem3mccwm.fsf@windlord.stanford.edu> <399DE3EE.33A848AA@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: 659936285 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