Contributed by grey on from the creative ideas to try for yourself dept.
On my "personal" smtp gateways where I run spamd with greylisting (before Postfix with "Anti-UCE") I figured out that I could dynamically catch spammers from the output of spamdb and add to my own local spamd blacklist file.
Become root (su -)
Enable spamd with greylisting in /etc/rc.conf:
spamd_flags="-v"Edit /etc/spamd.conf to use your own blacklist also:
all: :spamhaus:china:korea:spews2:myblacklist:Create the script which is going to do the "thing":
:msg="SPAM. Your address %A is in my spammer list.":\
mkdir bin # If you don't have this dir or put it somewhere else..
`editor of choice` /root/bin/dynaddbl # Paste the the "code" below:
spamdb | \
egrep -i "$FILTER" | \
cut -d \| -f 2 >> $MYBL
sort -n $MYBL | uniq > $MYBL.new
mv $MYBL.new $MYBL
Save and Close the editor
Add entry in crontab (and enable spamd-setup if not done earlier):
0 2 * * * /usr/libexec/spamd-setup
30 * * * * /root/bin/dynaddbl
End of "Mini HOWTO"
I got this idea last night and it's not perfect, but with some help from some brains in this forum it could maybe be something good to add to the spamd concept. Catched addresses don't get into spamd table in pf before spamd-setup gets rerunned by spamd-setup (by cron).What do you think about this "addon"?
Why doesn't OpenBSD have Python 2.3.4 when every other "distro" have it (need it for upcoming beta of Zope3X)?
(Comments are closed)