[Patch] fix unset received-spf header and return codes

Wolfgang Breyha <[email protected]> Wed, 01 Jun 2011 17:46:19 +0200
Newsgroups gmane.mail.spam.spf.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------070008090509060208070104
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi!

The attached patch fixes two things in libspf2 1.2.9

*) if spf results to NONE or anything else without SPF record
   no received_header and comment was set

*) if DNS fails either temporary or permanent the result was (invalid).
   It returns TEMPERROR and PERMERROR now.

Greetings, Wolfgang
-- 
Wolfgang Breyha <[email protected]> | http://www.blafasel.at/
Vienna University Computer Center | Austria




-------------------------------------------
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/1007/=now
RSS Feed: https://www.listbox.com/member/archive/rss/1007/6959932-f3d1312d
Modify Your Subscription: https://www.listbox.com/member/?member_id=6959932&id_secret=6959932-d95100fc
Unsubscribe Now: https://www.listbox.com/unsubscribe/?member_id=6959932&id_secret=6959932-4aedb9c4&post_id=20110601114626:8995D932-8C66-11E0-93B4-DD67F559ED1D
Powered by Listbox: http://www.listbox.com

--------------070008090509060208070104
Content-Type: text/x-patch;
 name="libspf2-129-rcptto.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="libspf2-129-rcptto.patch"

diff --git a/src/libspf2/spf_request.c b/src/libspf2/spf_request.c
index 7614141..b502fb2 100644
--- a/src/libspf2/spf_request.c
+++ b/src/libspf2/spf_request.c
@@ -363,6 +363,8 @@ SPF_request_query_rcptto(SPF_request_t *spf_request,
 	rcpt_to_dom = strchr(rcpt_to, '@');
 	if (rcpt_to_dom == NULL)
 		rcpt_to_dom = rcpt_to;
+	else
+		rcpt_to_dom++;
 	spf_request->cur_dom = rcpt_to_dom;
 
 	len = sizeof(SPF_VER_STR) + 64 + strlen(rcpt_to_dom);

--------------070008090509060208070104--