Here’s the script that I created. It’s just a stripped-down version of the regular b2antispam.php file. It goes through a loop rechecking each of the antispam strings that haven’t yet been rechecked. Of course, if you didn’t do EdB’s antispam recheck hacks, this won’t work. Don’t say I didn’t warn ya.

Special Note:

You may have problems, depending on how you implemented EdB’s hack, with this line, kinda near the top:

WHERE aspm_checked = 'no'") )

Basically, this bit is trying to grab all the antispam strings that haven’t been rechecked yet. If you used “gotit” and “needs”, then you’d replace “no” with “needs”. I just used EdB’s first draft, where he used “yes” and “no”.

Next, set up a cron on your server, with this sort of command line. (Check with your host for the specifics on this)

3 Responses to “b2evolution Antispam Recheck Cronjob”

Hi Isaac. Just a note regarding the “no or needs” issue you pointed out. Twice in you code you use “aspm_checked=’yes’”, so anyone who is using the “needs” version will have to replace ‘yes’ with ‘gotit’.

I already added your ’spammers-be-gone’ bit to my conf/hacks file, and today I will use your cronable antispam updater & rechecker. That should be pretty good protection against the known bad guys - especially when I go offline for a month at a time…

Hmm. Thank you wordpress for smart-quoting all the code there. It’s pretty awful, as I have to manually edit the whole thing, or write a script to do so. Which would be silly, since it’s a small code snippet.

Yeah, sorry about that. I’m in the process of moving these code samples into my download folder. This one is fixed now.

Leave a Reply

Comments are moderated like crazy using a variety of plugins.
There is a very high likelihood that your comment won't show up right away, especially if you have
never commented here before, but it was not deleted.

Please be patient, and do not post your comment more than once. It will show up once it is approved.

No state has an inherent right to survive through conscript troops and, in the long run, no state ever has. Roman matrons used to say to their sons: ‘Come back with your shield, or on it.’ Later on, this custom declined. So did Rome.