Preventing Spam on MT 2.6

Getting a little fed up with cleaning up spam on the blog (although MT Blacklist helps a ton), I whipped up some SQL to turn off trackback pings and comments on older blog messages. I figure if nobody comments within 90 days of a post, it probably won’t happen by anyone I care to hear from. I’m using MySQL 4.1 and Movable Type 2.661, and this is what I did:

mysql> use your_mt_database_name;
mysql> update mt_entry
-> set entry_allow_pings=0 , entry_allow_comments=2
-> WHERE DATE_SUB(CURDATE(),INTERVAL 90 DAY) >= entry_created_on;

Just change the 90 in the WHERE clause to shorten or lengthen the comment/trackback grace period.

Oh, and don’t forget (like I did) to do a Rebuild of all files. Sometimes I forget this is static content.