[rbldnsd] Slightly OT: script to add to rbldnsd zone
David Landgren
david at landgren.net
Fri Jan 28 22:47:23 MSK 2005
Robin Lynn Frank wrote:
> 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
Something like:
(
echo ":127.0.0.4:DNSBL. Policy restrictions etc."
sort -f /var/tmp/rbldnsd_abuse
) | uniq -i > /var/tmp/rbldnsd_abuse.map
perhaps?
David
More information about the rbldnsd
mailing list