Op Mon, 13 Jul 2015 09:14:37 +0200 schreef Markus Rosjat <[email protected]>:
hi there,

I have a script the following script to delete spam mx ip from the spamd
whitelist and write them in my own blacklist. After that I reload the
blacklist with spamd- setup.  This seems to work but I noticed when the
same ip has another mail in the greylist the ip becomes whitelisted if
the delivery attempt is successful (which it shouldnt in the first place
because I trapped the ip and put it in my blacklist). This seems like an
odd behaviour to me, its not the end of the world but it feels kinda
wrong :)

here is the script:

ip_range=$1

for i in `spamdb | grep $ip_range | grep WHITE | awk -F "|" '{print $2}'`;
  do
   echo $i
   /usr/sbin/spamdb -d $i
   /usr/sbin/spamdb -a -t $i
   echo $i >> /etc/mail/blacksheep.txt
  done

/usr/libexec/spamd-setup

maybe someone give me some hints for improvement

The explicit deletion (-d) is unnecessary and may have race condition problems. 
 An IP that is both trapped and grey will not be re-added to the whitelist, 
unless spamlogd interferes.



--
(Remove the obvious prefix to reply privately.)
Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/

Reply via email to