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@delivery.net, 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@delivery.net \
--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@delivery.net \
--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@delivery.net";
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
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@delivery.net, 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@delivery.net \
--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@delivery.net \
--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@delivery.net";
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