[Ilugc] Mailman showing email addresses in the clear

  • From: giskard@xxxxxxxxxxxxx (Prasenjeet Dutta)
  • Date: Mon, 8 Jul 2002 19:30:58 +0530

I think I'll use a perl one liner and edit all the HTML files
(in-place) in the archives with this:

$ perl -i -pe "s/(\w*)(@|%40)(\w*)/\1.at.\3/g" *.html

I'm not a perl hacker so fixes/suggestions are welcome.

I'd like to suggest a slightly different regex, similar to
the YahooGroups one. The rationale is that anyone using the
web archives is not likely to need the email address, and
those wishing to publicize their address can continue doing
so using the <foo at bar dot tld> notation.

Cheers
--PD


$ perl -i -pe "s/(\w*)(@|%40)((\w|\.)*)/\1\@\.\.\./g" *.html

Here's a test suite:
jdoe@abcnet
jdoe@xxxxxxxxxxxx
jdoe@xxxxxxxxxxxx
<a href="mailto:foo@xxxxxxx";>foo@xxxxxxx</a>
foo@localhost
foo@xxxxxxxxx
foo@xxxxxxxxxxxxxxxx
John.Doe@xxxxxxxxxxx
John_Doe@xxxxxxx
jdoe+sitename@xxxxxxx

When processed this turns to:

jdoe@...
jdoe@...
jdoe@...
<a href="mailto:foo@...";>foo@...</a>
foo@...
foo@...
foo@xxxxxxxxxxxxx
John.Doe@...
John_Doe@...
jdoe+sitename@...





Other related posts: