Spam

I haven’t fiddled much with anti-spam stuff on my ttwagner.com mailserver lately. In a way, it’s a good thing: the few messages I receive get through, and the myriad inbound spam doesn’t. I just checked the statistics, though, and noticed that the number of blacklisted hosts has been on the rise. It used to sit between 600 and 800, and eventually dwindled to about 300-400. (Hosts are added to a blacklist if they send spam to a spamtrap address, or if they try to identify themselves with a HELO of my own IP or hostname. They’re unlisted after 7 days.) Now I have 922 hosts. (This list is available if anyone wants it…? It’s just a database call. Though you’d probably do much better with Spamcop or something.)

Blog spam is also a problem, though. Things settled down a while ago, and I got complacent just relying on Akismet and manual blacklisting when someone got through. But I can see that spam is still coming through every now and then.

The problem is that WPMU gives each blog its own comments table, so I’ve previously had to do massive UNION queries, to the point that I have a script just to generate the query. Now that I do this professionally, I decided to do it right. I now have an all_comments view in the database, that refers to all the tables as though they were one, letting me do stuff like “SELECT DISTINCT comment_author_IP FROM all_comments.” The next phase is going to be a little script called from cron that gets all the recent spammers and bans them.

Leave a Reply

Your email address will not be published. Required fields are marked *