WordPress AntiSpam Plugin, Configuring Alpine Linux to Send Mail

The previous incarnation of this blog had a lot more inbound links, and accumulates spam. One day, I had 14,000 comments pending, and most were spam. So, I wrote a tool to help work through the backlog.

https://github.com/johnkawakami/delete-comments-matching-blacklist

It basically worked, but at one point, I had a bug: I had it match a field on ” ” or something like that, and it wiped out most of the comments.

I could have restored it, but it didn’t seem to be worth it.

The code’s a little better now, and slightly safer – but it is still a crude way to get through a spam backlog. It has two features: delete everything matching the blacklisted words, and delete messages where the URLs or email addresses match messages in the Spam list.

Alpine Linux Busybox SMTP Agent

I had some problems sending email from a WordPress installation in an Alpine-based Docker container.

Alpine doesn’t include an SMTP server with a minimal install, but you can use BusyBox to relay to an SMTP server.