[Pymilter] Re: pyspf 2.0.4 feature request

Stuart D. Gathman stuart at bmsi.com
Mon May 19 12:18:24 EDT 2008


On Sun, 18 May 2008, George Georgalis wrote:

> I've been looking for a way to identify ip address according to
> published spf allow rules for a given domain and was wondering
> if there is a way to make pyspf do it, possibly through a
> modification?

That is something that has been on the back burner for a while,
for a different purpose.  I hoped to optimize SPF checking by converting
SPF records to an IP set with TTL.  Keep in mind that there are
certain mechanisms (listed in the RFC) that this will not work for (e.g.
exists), but the vast majority of SPF records can be reduced to IP
sets in this manner.

> Some more details for clarity: I have a list of about 30 domains,

Since you have a fixed list, you can probably count on them all being
reducable.

How to get this done?  Well, first off, libspf2 has this feature
already.  But it is currently an orphan without a dedicated maintainer.

For python, there is an ipset module that I would likely start with.
It is a C extension with its own format optimized for storing ip sets.
Is that a problem?  Or should I make pure python a requirement?

Will you be able to use a generalized ip set for your application?

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the Pymilter mailing list