• I’ve found that most comment spam comes from http-proxies these days. Specifically, from proxies that are already known from sending email spam, and are listed on the blacklists of dsbl.org.
    So I’ve added the following small piece of code to the “check_comment” function in functions.php. I’d love to see a plugin-hook in a future version of wordpress for this kind of thing…
    $spammer_ip = $_SERVER['REMOTE_ADDR'];
    list($a, $b, $c, $d) = split('.', $spammer_ip);

    if( checkdnsrr("$d.$c.$b.$a.list.dsbl.org") ) {
    header( "Location: http://dsbl.org/listing?".$spammer_ip);
    return false;
    }

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter dreamerfi

    (@dreamerfi)

    (oops – forgot to add: mail me at john@sinteur.com for more info)

    won’t that slow down the page generation? and what if dsbl.org is down? will the pages still load or they wont?

    Thread Starter dreamerfi

    (@dreamerfi)

    No, it won’t slow down page generation – since check_comments is only used just before posting a comment to the database it will only slow down posting comments a little bit.

    Thread Starter dreamerfi

    (@dreamerfi)

    Oh, and technically, “you’re a spammer” is not the text one should use in the dsbl.org check, since all the dsbl.org list really means is that an IP address has demonstrated to be an open proxy – no more, no less. It’s perfectly acceptable to say “since you’re proven to be an open proxy, we’re not accepting comments from you” – saying “you’re a spammer” would be incorrect…

    Thread Starter dreamerfi

    (@dreamerfi)

    I fully agree with you – it’s just that on the “admin” mailing list for dsbl.org, you get a lot of “upset” people who compain “you claim I’m a spammer, I’m not, and I’m going to sue you for defamation!” – followed by a reply from the dsbl folks “no, we’re not claiming you’re a spammer – we just have proof you were an open proxy at some point in time, that’s all, so go ahead and try to sue us for stating facts.”

    Thread Starter dreamerfi

    (@dreamerfi)

    My experience is that the spammer will never see the message. They’re running bots these days, and don’t care how many calls are succesful or not.. But the message is indeed better 🙂

    I noticed that the message part saying “we’re not accepting comments from you” generates an error because of the contraction “we’re”. May want to use “we are” instead.

    Or you could simply escape the quote…

    I’m not exactly sure where you’re supposed to put that code. Yes I realize that I’m slightly dumb with regard to putting in hacks, but I’d love to implement this, as I got over 15 spam comments (currently waiting for moderation) in less than a day. It’s quite irritating.

    read the how to

    Thread Starter dreamerfi

    (@dreamerfi)

    I’ve been hacking wordpress again.
    This time, I’ve added a plugin that scans the content of a comment, and any URL it finds is checked against a public list at surbl.org.
    What’s great about this list is that if a spammer uses a site to “sell� his stuff (say, ‘www.ultra-cheap-crap.info’) he has to link tot hat site in his spam messages. surbl.org lists the sites used by spammers in this way.
    Which means, if a comment is posted that mentions a site that is used by spammers, it is assumed that it is comment-spam. Usually, that is true, since most comment spam I’ve seen is of the form “I think you’d like to check out http://www.my-crappy-shit.com�
    You can find it here

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘New spam-control trick’ is closed to new replies.