
spfdiscuss at alandoherty
Nov 25, 2009, 1:52 PM
Post #4 of 7
(1557 views)
Permalink
|
|
Re: Inconsistent behavior between pyspf and libspf2
[In reply to]
|
|
rob i right my first analysis was wrong so it looks like lookups of type 99 {spf} are receiving an unexpected error response from your local dns server instead of the expected no such record, where the library would then move on and try a TXT lookup next so next try repeating with another make/model of dns server/cache and see if its specific to that one {bug in dns server code} or is it repeatable on many {bug in libraries failure SPF vs TXT detection/handling} i suspect it could be dns server/cache handling of unknown RR types {as many do not yet support/understand type=SPF but the library should probably also be modified to try TXT even after the unexpected response to type=SPF queries in light of existence of the broken dns servers At 19:36 25/11/2009 Wednesday, stijay wrote: >I'm trying to use SPF in a custom MTA, and I see some inconsistent behavior. >I've used libspf2 (v 1.2.9) and pyspf (v2.005) on Ubuntu 9.04, and see >different behavior from both. > >I attached the output from both below. >I want to know which is correct and why they give different results. > >The IP: 209.11.164.66, sender: xxx [at] delivery, EHLO: xxx.delivery.net > >Any help in resolving this would be great. >I would prefer to use libspf2, as I can make it a part of my executable, >without having to depend on external run-times. > >Thanks. >-SJ > >----------------------------------------------------------------------------- > Using: spfquery.libspf2 (v1.2.9) >----------------------------------------------------------------------------- > >$ /usr/bin/spfquery.libspf2 --ip 209.11.164.66 --sender blah [at] delivery \ >--debug=10 > >spf_compile.c:523 Debug: Parsing macro starting at >Please%_see%_http://www.openspf.org/Why?id=%{S}&ip=%{C}&receiver=%{R} >spf_compile.c:543 Debug: Current data is at 0xbfb5d4f4 >spf_compile.c:554 Debug: Adding string literal (6): 'Please' >spf_compile.c:589 Debug: Adding literal space >spf_compile.c:543 Debug: Current data is at 0xbfb5d4f4 >spf_compile.c:554 Debug: Adding string literal (3): 'see' >spf_compile.c:589 Debug: Adding literal space >spf_compile.c:543 Debug: Current data is at 0xbfb5d4f4 >spf_compile.c:554 Debug: Adding string literal (30): > 'http://www.openspf.org/Why?id=' >spf_compile.c:620 Debug: Adding macro, data is at 0xbfb5d524 >spf_compile.c:641 Debug: Next data is at 0xbfb5d528 >spf_compile.c:543 Debug: Current data is at 0xbfb5d528 >spf_compile.c:554 Debug: Adding string literal (4): '&ip=' >spf_compile.c:620 Debug: Adding macro, data is at 0xbfb5d530 >spf_compile.c:641 Debug: Next data is at 0xbfb5d534 >spf_compile.c:543 Debug: Current data is at 0xbfb5d534 >spf_compile.c:554 Debug: Adding string literal (10): '&receiver=' >spf_compile.c:620 Debug: Adding macro, data is at 0xbfb5d544 >spf_compile.c:641 Debug: Next data is at 0xbfb5d548 >spf_compile.c:1210 Debug: Compiling record v=spf1 >spf_dns.c:54 Debug: DNS[cache] lookup: delivery.net SPF (99) >spf_dns.c:54 Debug: DNS[resolv] lookup: delivery.net SPF (99) >spf_dns_resolv.c:311 Debug: query failed: err = -1 Host name lookup failure > (2): delivery.net >spf_dns.c:66 Debug: DNS[resolv] found record >spf_dns.c:69 Debug: DOMAIN: delivery.net TYPE: SPF (99) >spf_dns.c:76 Debug: TTL: 0 RR found: 0 herrno: 2 source: resolv >spf_dns.c:66 Debug: DNS[cache] found record >spf_dns.c:69 Debug: DOMAIN: delivery.net TYPE: SPF (99) >spf_dns.c:76 Debug: TTL: 0 RR found: 0 herrno: 2 source: resolv >spf_server.c:384 Debug: get_record(delivery.net): TRY_AGAIN >--vv-- >Context: Main query >Response result: (invalid) >Response reason: none >Response err: No errors >StartError >Error: [UNRETURNED] Temporary DNS failure for 'delivery.net'. >EndError >--^^-- >StartError >Context: Failed to query MAIL-FROM >ErrorCode: (26) DNS lookup failure >Error: Temporary DNS failure for 'delivery.net'. >EndError >(invalid) > >----------------------------------------------------------------------------- > Using: spfquery.pyspf (v2.005) >----------------------------------------------------------------------------- > >$ /usr/bin/spfquery.pyspf --ip 209.11.164.66 --sender blah [at] delivery \ >--debug=1 > >pass > >spfquery: domain of delivery.net designates 209.11.164.66 as permitted sender >Received-SPF: Pass (spfquery: domain of delivery.net designates 209.11.164.66 >as permitted sender) client-ip=209.11.164.66; envelope-from="blah [at] delivery"; >receiver=spfquery; mechanism="ip4:209.11.164.0/22"; >identity=mailfrom > >----------------------------------------------------------------------------- > > > > >------------------------------------------- >Sender Policy Framework: http://www.openspf.org [http://www.openspf.org] >Modify Your Subscription: http://www.listbox.com/member/ [http://www.listbox.com/member/] > >Archives: https://www.listbox.com/member/archive/1020/=now >RSS Feed: https://www.listbox.com/member/archive/rss/1020/ >Powered by Listbox: http://www.listbox.com ------------------------------------------- Sender Policy Framework: http://www.openspf.org [http://www.openspf.org] Modify Your Subscription: http://www.listbox.com/member/ [http://www.listbox.com/member/] Archives: https://www.listbox.com/member/archive/1020/=now RSS Feed: https://www.listbox.com/member/archive/rss/1020/ Powered by Listbox: http://www.listbox.com
|