Re: Harvest netblocks of good MTAs from SPF for whitelisting from greylisting
"Constantine A. Murenin" <[email protected]> Tue, 12 Feb 2013 21:49:17 -0800
| Newsgroups | gmane.mail.spam.spf.discuss |
|---|---|
| Message-ID | <CAPKkNb5qjfxbS4XXMbvtEBZvHbSXyEOfJaKesuCL5ruXNOpXEQ@mail.gmail.com> |
On 12 February 2013 20:10, Stuart D Gathman <[email protected]> wrote: > On Feb 12, Stuart D Gathman transmitted in part: > > >>> Where has it been implemented? Please provide me a link, I'm very >>> interested in applying it to my setup. >> >> >> I did a quick and dirty for pyspf (just add ips to a set while >> evaluating): >> >> http://spidey2.bmsi.com/pyspf/spf.py >> >> $ python spf.py 0.0.0.0 [email protected] google.com >> (('softfail', 250, 'domain owner discourages use of this host'), '~all') >> 216.239.32.0/19 >> 64.233.160.0/19 >> 66.249.80.0/20 >> 72.14.192.0/18 >> 209.85.128.0/17 >> 66.102.0.0/20 >> 74.125.0.0/16 >> 64.18.0.0/20 >> 207.126.144.0/20 >> 173.194.0.0/16 >> 216.73.93.70/31 >> 216.73.93.72/31 >> >> This needs to ensure that all paths are followed, and combine adjacent >> blocks (e.g. the last two above). It also needs to handle IP6. > > > Hmm, using 0.0.0.0 to "never match" is a good hack, but fails with > fancy includes - so I'll need to handle those. > > It needs to keep 4 separate ipsets for Pass, Fail, SoftFail, and Neutral. > I'll make a separate method for computing ipsets. Seems great! Also, make sure to not use "exist", either -- don't want it to have undefined effects. % dig +shor txt rambler.ru "v=spf1 ip4:81.19.66.0/23 ip4:81.19.88.0/24 ip4:81.19.92.32/27 -exists:%{ir}.spf.rambler.ru -exists:%{l}.u.spf.rambler.ru ~all" % Do you have it in a git repo I could fork? C.