FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Email Addresses in Body of NNTP Messages Imported
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Email Addresses in Body of NNTP Messages Imported [message #163561] Sun, 07 November 2010 17:59 Go to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
I've had a few cases where someone's raw email address has been imported from an NNTP post and posted on the website. The issue is that the person who posted to the NNTP board actually had the email address in the body of the post (usually the first line saying "Bob [bob(at)x(dot)y] said on Nov 7 that...").

Valid email addresses should really be parsed out in the body of the NNTP post. The same goes for email lists as well.

James.
Re: Email Addresses in Body of NNTP Messages Imported [message #163872 is a reply to message #163561] Sun, 05 December 2010 20:31 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Yes, you should definitely parse them out.
Good we have a Replacement and Censorship System.
Re: Email Addresses in Body of NNTP Messages Imported [message #163876 is a reply to message #163872] Mon, 06 December 2010 04:58 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
naudefj wrote on Sun, 05 December 2010 20:31
Yes, you should definitely parse them out.
Good we have a Replacement and Censorship System.


Right, that would work. I'm no regex expert but I found something on the internet that seems to work with the "test it" button. But when I post to my test forum I don't see the replacement happening.

Any suggestions?

Cheers,

James.
Re: Email Addresses in Body of NNTP Messages Imported [message #163877 is a reply to message #163876] Mon, 06 December 2010 05:09 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
I just setup a simple, silly replacement policy (spoonful->fork) and it worked in both subject line and message body. But my regex for emails doesn't work.

Here is the regex I am using, it works fine with the Test It button:

Replace Mask First Field ^[A-Za-z0-9._]+@[A-Za-z0-9.]+\.[A-Za-z]{2,3}$
Replace Mask Second Field
Replace With <private_email>

Note the replace mask second field is just blank.

Any ideas what I am doing wrong. Once this is figured out this example should go onto the wiki since I'm sure others may want the same feature.

James.
Re: Email Addresses in Body of NNTP Messages Imported [message #163878 is a reply to message #163877] Mon, 06 December 2010 05:17 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
I still haven't got this to work but in my reading I see that this replacement engine will try to replace the text in user's signatures. Is there a way to disable that? I'm trying to filter out valid email addresses in the body of messages, specifically when they get harvested from an nntp server. But if a user wants to make their email address public on the forums then I don't really want to filter that out.

James.
Re: Email Addresses in Body of NNTP Messages Imported [message #163880 is a reply to message #163877] Mon, 06 December 2010 11:20 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
jm2morri wrote:
Replace Mask First Field ^[A-Za-z0-9._]+@[A-Za-z0-9.]+\.[A-Za-z]{2,3}$
Replace Mask Second Field
Replace With <private_email>

Any ideas what I am doing wrong.


Looks about right, just remove the leading ^ and trailing $.

Re: Email Addresses in Body of NNTP Messages Imported [message #163883 is a reply to message #163880] Tue, 07 December 2010 04:56 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
naudefj wrote on Mon, 06 December 2010 11:20
jm2morri wrote:
Replace Mask First Field ^[A-Za-z0-9._]+@[A-Za-z0-9.]+\.[A-Za-z]{2,3}$
Replace Mask Second Field
Replace With <private_email>

Any ideas what I am doing wrong.


Looks about right, just remove the leading ^ and trailing $.



Great, it seems to work. That would be a good one to add to the wiki.

Is there a way to apply this to the whole database of messages that are already in the forum? Do messages imported using nntp or a mailing list get put through this replacement engine too?

James.
Re: Email Addresses in Body of NNTP Messages Imported [message #163887 is a reply to message #163883] Tue, 07 December 2010 12:24 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3632
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
You are more than welcome to add it to the wiki.

Use the Compact Messages ACP.
Re: Email Addresses in Body of NNTP Messages Imported [message #163892 is a reply to message #163887] Wed, 08 December 2010 04:53 Go to previous message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
naudefj wrote on Tue, 07 December 2010 12:24
You are more than welcome to add it to the wiki.

Use the Compact Messages ACP.


OK, I'll see what I can do.

Now does anyone know how to have this replacement stop at the standard signature delimiter "--"? Right now it takes out email addresses in signatures and I'd like it not to since people have put it there on purpose.

James.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Getting a mail pipe error after upgrade
Next Topic: XML Problems
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 17 14:16:18 EST 2017

Total time taken to generate the page: 0.00702 seconds