Dealing with spam

From MT‘s ProNet comes some very good tips for dealing with spam at the webserver level.

I’d just implemented mod_security a little while ago on my server, and while it hasn’t stopped the flood of spammy referrers, it has kept a lot of them sucking up bandwidth. One thing I need to do is start keeping up with adding additional rules to mod_security. Soon I’ll have to split it out into a separate file to include in httpd.conf. And to help with creating mod_security rules is Noel Jackson’s mod_security rule generator.

The other things I’ll be experimenting with are Peter Wood’s blacklist_to_modsec script and the DSBL plugin from Brad Choate.

spam spam spam spam

I’ve been getting a bunch of comment spam lately with .info URLs in them, so in an attempt to block them I added a pretty broad ranging MT Blacklist regexp to block anything that looks like a domain ending in .info. At least that’s what I think it looks like it’s supposed to do. The regex looks like:

^[a-zA-Z0-9]+([a-zA-Z0-9\-\.]+)?\.(info|INFO)

If you get blocked trying to leave a legit comment, fire off an email to me and let me know. The regex will probably need a little tweaking.

BTW, for those of you that aren’t regex gurus, there’s this fantastic site, Regular Expression Library where you can search their library of user submitted regular expressions, and even test out your own. They also have a bunch of links to other regexp resources out there to use.

Pardon my dust

I really need to get around to redoing my MT templates and style sheets to make them more MT3 compliant. I’ve been meaning to redo them for a while now, but it’s one of those things I never seem to be able to get around to doing. Time to get started on that task. So I expect for the next little while things will look different, some things will be broken and other things will just look wierd. Bits are going to be reorganized…that’s the plan anyway.

On MT’s new Dynamic Publshing

Over at the 6A Pro network, Brad Choate has written an overview on MT’s new dynamic publishing feature. This is just what I’ve been looking for, something to tell me just how the dynamic publishing is implemented and it’s definitely more informative than what’s in the MT documentation. I think it’s something that will help a lot of people learn how it works and how to use it effectively. It’s not really a tutorial on how to do the dynamic stuff, although there are some examples provided. It does provide a lot of good information showing what’s behind the scenes though.

The plunge into MT 3.1

Ok, since I’m trapped here at work while the wife is staying late to study Biochem, I thought I’d use the time to plunge into the MT 3.1 upgrade.

Upgrade process went pretty smoothly. Copied the files from the MT 3.1 upgrade package into my MT directory, ran mt-check.cgi to make sure everything was still ok, then ran mt-upgrade31.cgi. It did the DB schema upgrade and create a couple of new templates used for the dynamic publishing.

Next step was to enable the dynamic archives. Followed the steps in Movable Type 3.1 Guide, which are pretty straight forward. The only change I made was to put the stuff for the .htaccess file into my webserver httpd.conf file instead. Then did a rebuild. Since there are no archives to rebuild anymore, the rebuild process is so much faster now.

And then I ran into my first problem. I use Paginate for my category and date based archives. The Paginate tags don’t seem to get parsed when those archive files are accessed though. But, from the MT 3.1 guide, this is to be expected

Please note that at this time, only the standard Movable Type tags are supported with the dynamic rendering option. Existing plugins are not compatible with this new feature, since they are written in Perl and not PHP. If you are seeing errors due to using plugin tags, you will either need to remove the tag(s) or change that template to render statically.

Then I noticed my second problem: no side bar in the individual entry archives. The side bar gets brought in with a PHP include(). A view source showed everything there, but the PHP include() doesn’t seem to get parsed by the dynamic templating. Very odd. A post by Phil Ringnalda on the MT 3.1 beta blog indicated it should work. So in an act of desperation, I changed my PHP tags from <?PHP to <?php and surprise! In came the side bar! But inexplicably, this didn’t work for another entry that I have PHP embedded into. Perhaps there was something else that I did that fixed the first problem.

So I’m still having problems with PHP embedded in entries. But so far aside from that small issue MT 3.1 looks pretty good. Still need to play with it a little more though.