It'd be nice if there was an option to use block lists like the Spamhaus drop and edrop lists.
https://www.spamhaus.org/drop/
https://www.spamhaus.org/drop/drop.txt
This would also allow me to dynamically block IPs from a list generated by a different application in my network.
External subnet block lists in CIDR notation
Re: External subnet block lists in CIDR notation
How about using a cidr table for this: http://www.postfix.org/cidr_table.5.html
So downloading the drop list daily by cron and converting it to a cidr list.
This shouldn't be to complicated ...
Ulrich.
So downloading the drop list daily by cron and converting it to a cidr list.
This shouldn't be to complicated ...
Ulrich.
Re: External subnet block lists in CIDR notation
wget http://www.spamhaus.org/drop/drop.txt
wget http://www.spamhaus.org/drop/dropv6.txt
wget http://www.spamhaus.org/drop/edrop.txt
cat drop.txt | sed -e 's/;.*//' | grep -v '^ *$' | ( while read OneAddr ; do echo "$OneAddr reject" ; done ) > Spamhaus_drop.cidr
cat dropv6.txt | sed -e 's/;.*//' | grep -v '^ *$' | ( while read OneAddr ; do echo "$OneAddr reject" ; done ) > Spamhaus_dropv6.cidr
cat edrop.txt | sed -e 's/;.*//' | grep -v '^ *$' | ( while read OneAddr ; do echo "$OneAddr reject" ; done ) > Spamhaus_edrop.cidr
wget http://www.spamhaus.org/drop/dropv6.txt
wget http://www.spamhaus.org/drop/edrop.txt
cat drop.txt | sed -e 's/;.*//' | grep -v '^ *$' | ( while read OneAddr ; do echo "$OneAddr reject" ; done ) > Spamhaus_drop.cidr
cat dropv6.txt | sed -e 's/;.*//' | grep -v '^ *$' | ( while read OneAddr ; do echo "$OneAddr reject" ; done ) > Spamhaus_dropv6.cidr
cat edrop.txt | sed -e 's/;.*//' | grep -v '^ *$' | ( while read OneAddr ; do echo "$OneAddr reject" ; done ) > Spamhaus_edrop.cidr