Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: devel

[Bug 6203] Let AWL store IPv4 address /24 instead of /16

 

 

SpamAssassin devel RSS feed   Index | Next | Previous | View Threaded


bugzilla-daemon at bugzilla

Nov 24, 2009, 8:24 AM

Post #1 of 3 (422 views)
Permalink
[Bug 6203] Let AWL store IPv4 address /24 instead of /16

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

--- Comment #11 from Mark Martinec <Mark.Martinec [at] ijs> 2009-11-24 08:24:29 UTC ---
Ok, I give up :) I'm making the mask length configurable (barring objections):


=item auto_whitelist_ipv4_mask_len n (default: 16, range [0..32])

The AWL database keeps only the specified number of most-significant bits
of an IPv4 address in its fields, so that different individual IP addresses
within a subnet belonging to the same owner are managed under a single
database record. As we have no information available on the allocated
address ranges of senders, this CIDR mask length is only an approximation.
The default is 16 bits, corresponding to a former class B. Increase the
number if a finer granularity is desired, e.g. to 24 (class C) or 32.
A value 0 is allowed but is not particularly useful, as it would treat the
whole internet as a single organization. The number need not be a multiple
of 8, any split is allowed.


=item auto_whitelist_ipv6_mask_len n (default: 48, range [0..128])

The AWL database keeps only the specified number of most-significant bits
of an IPv6 address in its fields, so that different individual IP addresses
within a subnet belonging to the same owner are managed under a single
database record. As we have no information available on the allocated address
ranges of senders, this CIDR mask length is only an approximation. The default
is 48 bits, corresponding to an address range commonly allocated to individual
(smaller) organizations. Increase the number for a finer granularity, e.g.
to 64 or 96 or 128, or decrease for wider ranges, e.g. 32. A value 0 is
allowed but is not particularly useful, as it would treat the whole internet
as a single organization. The number need not be a multiple of 4, any split
is allowed.

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


bugzilla-daemon at bugzilla

Nov 24, 2009, 8:41 AM

Post #2 of 3 (391 views)
Permalink
[Bug 6203] Let AWL store IPv4 address /24 instead of /16 [In reply to]

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

--- Comment #12 from Mark Martinec <Mark.Martinec [at] ijs> 2009-11-24 08:41:15 UTC ---
Bug 6203: make AWL CIDR mask configurable: auto_whitelist_ipv4_mask_len
and auto_whitelist_ipv6_mask_len; update README.awl and sql/awl_*.sql
accordingly (increasing awl.ip field width); 'fix' the t/data/spam/004
sample mail to avoid a test failing with a /24 net mask;
avoid race condition in SQLBasedAddrList.pm when multiple processes
try to insert-or-update an awl SQL record: try INSERT first, and if
that fails go for UPDATE.

Sending lib/Mail/SpamAssassin/AutoWhitelist.pm
Sending lib/Mail/SpamAssassin/Plugin/AWL.pm
Sending lib/Mail/SpamAssassin/SQLBasedAddrList.pm
Sending sql/README.awl
Sending sql/awl_mysql.sql
Sending sql/awl_pg.sql
Sending t/data/spam/004
Transmitting file data .......
Committed revision 883770.


This is a rather hefty patch, although this is in large part due to
swapping of 'insert' and 'update' code sections in SQLBasedAddrList.pm.
I've been running this code for more than a month now at our server,
seems to successfully avoid the race conditions of previous code.

For 3.3.1 we might consider using ON DUPLICATE KEY UPDATE (as mentioned
on the list by Michael Parker, topic: "Time for 3.3.0 beta?", and elsewhere),
although I'm not sure how widely the feature is supported across SQL server
types,
so for now I'd just stick with INSERT first, and if that fails, do the UPDATE.
Probably belongs to some other bug entry...

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


bugzilla-daemon at bugzilla

Nov 25, 2009, 5:20 AM

Post #3 of 3 (375 views)
Permalink
[Bug 6203] Let AWL store IPv4 address /24 instead of /16 [In reply to]

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

Mark Martinec <Mark.Martinec [at] ijs> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED

--- Comment #13 from Mark Martinec <Mark.Martinec [at] ijs> 2009-11-25 05:20:50 UTC ---
Closing.

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

SpamAssassin devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.