All pastes #926160 Raw Edit

denyspam.sh

public shellscript v1 · immutable
·published 2008-03-03 16:20 UTC
rendered paste body
#!/bin/bash# add any excessive validrcptto spammer to hosts.denyspammers=`awk '/excessive/ {print $9}' /var/log/qmail/qmail-smtpd/current`for ip in $spammersdonet=`echo $ip | awk -F. '{print $1"."$2"."$3"."}'`if [ `grep -c $net /etc/hosts.deny` = 0 ] ; thenecho "ALL : $net" >> /etc/hosts.denyfidone