Good job with the Mass import script.
You can use a simple script to download an online blacklist and import it into the blacklist database.
Keep in mind, I'm no pro at scripting. Here is an example of a weekly cron job. and below is the daily job. There are plenty of sites to download blacklists. Here is one.
http://joewein.net/spam/bl-text.htm Be sure to donate to these folks if you feel up to it.
#!/bin/bash
#weekly
cd /root
#Remove old base file
rm ./dom-bl-base.txt*
rm ./dom-bl.txt*
#Download basefile and incremental file
wget
http://www.joewein.net/dl/bl/dom-bl-base.txt
wget
http://www.joewein.net/dl/bl/dom-bl.txt
#Copy to master blacklist file
cat ./dom-bl-base.txt | sed 's/;.*//' > blacklist.txt
cat ./dom-bl.txt | sed 's/;.*//' >> blacklist.txt
cat ./from-bl.txt | sed 's/;.*//' >> blacklist.txt
#Add files you personally want to blacklist to the localblacklist file
#This then gets copied to master blacklist file every time
cat ./localblacklist.txt >> blacklist.txt
#Had to split blacklist file into many files. because of mysql errors
split -l 10000 ./blacklist.txt blacklist
#Rename first one to keep it out of below loops
mv ./blacklistaa ./black1.txt
echo "Processing /root/blacklistaa file..."
./massimport.sh -f ./black1.txt -b -o -q
#For loop for adding each file to mysql database
FILES=/root/blacklista*
for f in $FILES
do
echo "Processing $f file..."
./massimport.sh -f $f -b -a
done
#For loop for adding each file that starts with b to mysql database
FILES=/root/blacklistb*
for f in $FILES
do
echo "Processing $f file..."
./massimport.sh -f $f -b -a
done
#Cleanup
rm ./black1.txt
rm ./blacklista*
rm ./blacklistb*
############################# Daily File #########################################
#!/bin/bash
#daily
cd /root
#Download the daily file
wget
http://www.joewein.net/dl/bl/dom-bl.txt
#Copy the Weekly file and the daily file into one file
cat ./dom-bl-base.txt | sed 's/;.*//' > blacklist.txt
cat ./dom-bl.txt | sed 's/;.*//' >> blacklist.txt
#For senders you want to black list yourself, add to the localblacklist.txt file
#Append that file to the downloaded file
cat ./localblacklist.txt >> blacklist.txt
#I had to split the blacklist file into several because of some mysql errors
split -l 10000 ./blacklist.txt blacklist
#Rename the first one so i can exclude from the loop below
mv ./blacklistaa ./black1.txt
echo "Processing /root/blacklistaa file..."
./massimport.sh -f ./black1.txt -b -o -q
FILES=/root/blacklista*
#Loop that imports the files one at a time.
for f in $FILES
do
echo "Processing $f file..."
./massimport.sh -f $f -b -a
done
#Loop again for the one's that start with a B
FILES=/root/blacklistb*
for f in $FILES
do
echo "Processing $f file..."
./massimport.sh -f $f -b -a
done
#cleanup
rm ./dom-bl.txt*
rm ./black1.txt
rm ./blacklista*
rm ./blacklistb*