
ralsina at kde
Mar 15, 2007, 10:34 AM
Post #3 of 9
(2644 views)
Permalink
|
On Thu 15 Mar 2007 14:09:04 Stuart D. Gathman wrote: > On Thu, 15 Mar 2007, Roberto Alsina wrote: > > I am confused by this test. > > > > It says it's about 8.1/6 which would be: > > > > The following macro letters are expanded in term arguments: > > > > s = <sender> > > l = local-part of <sender> > > o = domain of <sender> > > d = <domain> > > i = <ip> > > p = the validated domain name of <ip> > > v = the string "in-addr" if <ip> is ipv4, or "ip6" if <ip> is ipv6 > > h = HELO/EHLO domain > > > > And in this case, HELO domain is OEMCOMPUTER. > > > > Now, what is the implementation supposed to do? Check if h expands to > > OEMCOMPUTER? I am guessing not? > > Partially, but mostly not. Ok, that part works anyway. > > Or about giving a syntax error on "a:OEMCOMPUTER" ? Because that kind of > > things can happen just as well with valid helo domains, and then the > > test's name is confusing. > > Bingo. The test is based on a real life complex policy that requires > a valid HELO name (hence the name). If you get it wrong, you are unlikely > to get other complex policies correct. Well, I am sharing 99% of the PySPF logic, usually this kind of things is just a little implementation detail on my side. > I'll have to add a few more > complex policies if people start "coding to the test". That'd be awesome. > It tests a lot tricky things at once. Permerror in an included domain. > Syntax error after macro expansion, ... Right, so the thing that should happen is like this (correct me if I am wrong): 1) The SPF record for e10.example.com is v=spf1 -include:_spfh.%{d2} ip4:1.2.3.0/24 -all 2) That expands to v=spf1 -include:_spfh.example.com ip4:1.2.3.0/24 -all 3) So, use the SPF record for _spfh.example.com: v=spf1 -a:%{h} +all 4) Which expands to v=spf1 -a:OEMCOMPUTER +all 5) And then we have an invalid domain-end (OEMCOMPUTER) => invalid domain-spec =>invalid "a" mechanism=>fail. Did I get it right? If yes, all I am missing is validating the domain-spec **after** expanding macros (which strangely seems to be done the same way in PySPF). > BTW, a:%{h} is never a syntax error for a valid HELO FQDN. (A literal > IP is not a FQDN.) Yes, you are right, I was confused with the HELO "1.2.3.4" form. BTW: what's one supposed to do on the mail server if a client uses that kind of HELO? Not important, but I am a curious guy :-) -- ("\''/").__..-''"`-. . Roberto Alsina `9_ 9 ) `-. ( ).`-._.`) ralsina [at] kde (_Y_.)' ._ ) `._`. " -.-' KDE Developer (MFCH) _..`-'_..-_/ /-'_.' (l)-'' ((i).' ((!.' Buenos Aires - Argentina Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. --Brian W. Kernighan ------- To unsubscribe, change your address, or temporarily deactivate your subscription, please go to http://v2.listbox.com/member/?list_id=1007
|