July 07, 2004
Comment spam alert

I just deleted 10 comment spams from a weight loss site. If you're using MT Blacklist, save yourself some grief and add the following regexp to your ban list:

weigh[\w\d\-_]*less[\w\d\-_]*rx[\w\d\-_]*\.[a -z]{2,}

Take out everything between the brackets and put a ".com" at the end if you want to kill the specific site instead of variations on it.

Posted by Charles Kuffner on July 07, 2004 to Administrivia | TrackBack
Comments

I just added MTCloseComments plugin (using the lovely Mt-plugins manager that lets me add plugins via a browser window from the office). It should help the whiterose blog empire cope with the spammers

Posted by: Michael on July 7, 2004 11:49 AM

Thanks. I'll admit, all those algebra-looking statements freak me out. Just like regular algebra!

Posted by: Mac Thomason on July 7, 2004 12:12 PM

off topic

from political wire

DeLay Retains Legal Team
House Majority Leader Tom DeLay (R-TX) has "retained lawyers to defend him in both a Congressional ethics probe and an ongoing investigation into Texas’ 2002 legislative races," Roll Call reports.

http://politicalwire.com/archives/2004/07/07/delay_retains_legal_team.html

Posted by: bz on July 7, 2004 12:28 PM

For the record, Mac:

In a regular expression, any item inside square brackets can be matched. What's inside these square brackets is:

\w = any letter
\d = any number
\- = the "-" character
_ = the "_" character

The asterisk immediately after the square bracket means "any number of occurrances, including zero". Put together, the expression

[\w\d\-_]*

means "any combination of letters, numbers, dashes, and underscores, whether they actually appear or not".

The expression "\.[a-z]{2,}" at the end means "match any letter combination that's at least two letters long and which follows a period", which takes care of all domain suffixes.

Thus, the whole thing not only matches the offending domain (which I can't name here as it'll be blocked by MT-Blacklist), it also matches any other mutatation of that domain name you can think of.

Posted by: Charles Kuffner on July 7, 2004 12:29 PM

BZ - Thanks, it's on my to-be-blogged list for the day (which is growing as we speak).

Posted by: Charles Kuffner on July 7, 2004 12:29 PM

I feel totally geeky that I was able to figure out the meaning of that code all on my own, from first principles. :)

Posted by: blurker gone bad on July 7, 2004 4:27 PM

I'll add my endorsement of MT-Close Comments; I set it at the default of 21 days old and older, and my spam count has (knock wood) fallen to nearly non-existent. It's in conjunction with MT-Blacklist, of course.

Posted by: Linkmeister on July 7, 2004 4:32 PM

great!

Posted by: momo on July 21, 2004 1:01 PM