https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6362

Mark Martinec <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #4694|0                           |1
        is obsolete|                            |

--- Comment #8 from Mark Martinec <[email protected]> 2010-03-04 21:08:18 
UTC ---
Created an attachment (id=4697)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4697)
replacement patch

The patch extends the syntax of a sub-test parameter in URIDNSBL tests.

It makes rules like the following possible:

urirhssub URIBL_DBL_SPAM        dbl.spamhaus.org.  A  127.0.1.2
urirhssub URIBL_DBL_SPAM2       dbl.spamhaus.org.  A  127.0.1.3-127.0.1.19
urirhssub URIBL_DBL_PHISH       dbl.spamhaus.org.  A  127.0.1.20-127.0.1.39
urirhssub URIBL_DBL_MALWARE     dbl.spamhaus.org.  A  127.0.1.40-127.0.1.59
urirhssub URIBL_DBL_PROHIBITED  dbl.spamhaus.org.  A  127.0.1.255

>From the URIDNSBL POD:

C<subtest> is a sub-test to run against the returned data.  The sub-test may
be in one of the following forms: m, n1-n2, or n/m, where n,n1,n2,m can be
any of: decimal digits, 0x followed by up to 8 hexadecimal digits, or an IPv4
address in quad-dot form. The 'A' records (IPv4 dotted address) as returned
by DNSBLs lookups are converted into a numerical form (r) and checked against
the specified sub-test as follows:
for a range n1-n2 the following must be true: (r >= n1 && r <= n2);
for a n/m form the following must be true: (r & m) == (n & m);
for a single value in quad-dot form the following must be true: r == n;
for a single decimal or hex form the following must be true: (r & n) != 0.

Some typical examples of a sub-test are: 127.0.1.2, 127.0.1.20-127.0.1.39,
0.0.0.16/0.0.0.16, 0x10/0x10, 16, 0x10 .

-- 
Configure bugmail: 
https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to