apple 2 computer showing bbs screen

BASH & MySQL: Bulk blacklist for phpList

Recently I needed to blacklist a large number of addresses in a phpList installation. I wrote a super simple BASH script using the mysql client to accomplish this, and since I didn’t see one already when I searched, I’ll share mine here.

This assumes your database is named ‘phplist’ and your table names are standard. You need to create a text file (‘address_list.txt’) which contains your list of E-mail addresses to blacklist, one per line.