nospam
2005-10-30 03:58:28 UTC
I'm using a CIDR based access control list to reject spam
from China and Korea like this:
check_client_access cidr:/etc/postfix/spam_china_korea.cidr
In the spam_china_korea.cidr file are subnets
defined like this:
58.14.0.0/15 REJECT WE REJECT SPAM FROM ASIA!!!
58.16.0.0/13 REJECT WE REJECT SPAM FROM ASIA!!!
Now when I receive spam from numerous other countries,
I do a "whois" on the IP address of the sender. In the
output of whois there is an inetnum like these:
inetnum: 60.48.0.0 - 60.54.255.255
inetnum: 84.136.0.0 - 84.191.255.255
How can I convert these into a format that will work
with the cidr mappings of postfix?
from China and Korea like this:
check_client_access cidr:/etc/postfix/spam_china_korea.cidr
In the spam_china_korea.cidr file are subnets
defined like this:
58.14.0.0/15 REJECT WE REJECT SPAM FROM ASIA!!!
58.16.0.0/13 REJECT WE REJECT SPAM FROM ASIA!!!
Now when I receive spam from numerous other countries,
I do a "whois" on the IP address of the sender. In the
output of whois there is an inetnum like these:
inetnum: 60.48.0.0 - 60.54.255.255
inetnum: 84.136.0.0 - 84.191.255.255
How can I convert these into a format that will work
with the cidr mappings of postfix?