Changeset 36


Ignore:
Timestamp:
05/05/11 17:41:02 (14 years ago)
Author:
Kris Deugau
Message:

/trunk/dnsbl

w00t! SpamAssassin's DNSBL checking code mutated at some point in
the past to support bitmask-based DNSBLs up to 24 bits long. Altered
a few constants and the data tagging to tag org and block listme's
separately at the separate levels.

Location:
trunk/dnsbl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dnsbl/DNSBL.pm

    r32 r36  
    1212use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
    1313
    14 $VERSION        = 2.0;
     14$VERSION        = 2.1;
    1515@ISA            = qw(Exporter);
    1616@EXPORT_OK      = qw(
     
    2424## "constants"
    2525
    26 # 8 bits available
    27 # 128 is per-IP shitlist
    28 # 2 is IP hitlist
     26# w00t!  somewhere along the line, by accident or intent, SA's
     27# check_dnsbl_sub can now check up to 24 bits of an DNSBL return value!
    2928# 1 not available so we don't $self->shoot(foot)
    3029our %bitfields = (
     
    3635        ip => 2,
    3736    # OOB
    38         org => 32,
    39         block => 64,
     37        org0 => 32,
     38        block0 => 64,
     39        org1 => 256,
     40        org2 => 512,
     41        block1 => 1024,
     42        block2 => 2048,
    4043    # "I'm a total spamming moron!" - per-IP only!
    4144        slist => 128
     
    394397
    395398    $bitmask |= $bitfields{$level-1} if $bcount >= $autolist{$masklen};
    396     $bitmask |= $bitfields{block} if $listme;
    397     $bitmask |= $bitfields{org} if $listorg;
     399    $bitmask |= $bitfields{"block".($level-1)} if $listme;
     400    $bitmask |= $bitfields{"org".($level-1)} if $listorg;
    398401  }
    399402
  • trunk/dnsbl/Makefile

    r33 r36  
    1212
    1313PKGNAME=dnsbl
    14 VERSION=0.2.0
     14VERSION=0.2.1
    1515
    1616all:
Note: See TracChangeset for help on using the changeset viewer.