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.

Related Posts:

  • No Related Posts
This entry was posted in Administrivia. Bookmark the permalink.

8 Responses to Comment spam alert

  1. Michael says:

    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

  2. Mac Thomason says:

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

  3. bz says:

    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

  4. 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.

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

  6. blurker gone bad says:

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

  7. Linkmeister says:

    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.

Comments are closed.