Bulk Blacklist for phpList using mysql cli
while read email; do
mysql -e "insert into phplist_user_blacklist (email, added) values ('$email', 'YYYY-MM-DD HH:MM:SS');" phplist
mysql -e "insert into phplist_user_blacklist_data (email, name, data) values ('$email', 'reason', 'Manually blacklisted by admin');" phplist
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.