[rbldnsd] Slightly OT: script to add to rbldnsd zone

Robin Lynn Frank rlfrank at paradigm-omega.com
Fri Jan 28 20:32:16 MSK 2005


I've been adapting a shell script we've been using to add such things as
dictionary spam, unauthorized relay attempts, hits on spamtraps, etc to
a postfix access map, so it can be used to add to a rbldnsd zone.

The script sorts the IP address, but unfortunately, also sorts the  line
beginning: :127.0.0.4:DNSBL.  I am not a script wizard and haven't
figured out how to keep that line at the top of the file.  If anyone
knows how I can keep that line whereit belongs, I'd appreciate it.
Alternately, if there already is such a script available, pointing me to
it would avoid another reinvention of the wheel. ;-)

Code snippet follows.
######################################################
#edit below for the address and verbiage you wish to use
echo ":127.0.0.4:DNSBL. Policy restrictions (prior abuse from netblock):
Mail from $ is NOT accepted on this server." > /var/tmp/rbldnsd_abuse.map


cat /var/tmp/rbldnsd_abuse.map /var/tmp/rbldnsd_abuse.map
/var/lib/rbldns/abuse |\
    sort -f | uniq -i \
    > /var/tmp/rbldnsd_abuse.map

#touch file so it doesn't need to be created the first time the
#script is run.
touch /var/lib/rbldns/abuse

cp /var/tmp/rbldnsd_abuse.map /var/lib/rbldns/abuse

exit 0
--
Robin Lynn Frank - Director of Operations - Paradigm-Omega, LLC
Website:   http://www.paradigm-omega.com/
RSS:       http://paradigm-omega.blogspot.com/atom.xml
Spamtraps: http://www.paradigm-omega.net/cgi-bin/custmail.cgi
=====================================================================
Reality TV is an oxymoron.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 300 bytes
Desc: OpenPGP digital signature
Url : http://www.corpit.ru/pipermail/rbldnsd/attachments/20050128/8811bd25/signature.pgp


More information about the rbldnsd mailing list