[exim-dev] [Bug 860] [PATCH] SPF checking for IPv6

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Git Commit
Date:  
À: exim-dev
Anciens-sujets: [exim-dev] [Bug 860] New: [PATCH] SPF checking for IPv6
Sujet: [exim-dev] [Bug 860] [PATCH] SPF checking for IPv6
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=860

Git Commit <git@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |git@???





--- Comment #4 from Git Commit <git@???> 2011-08-28 22:17:11 ---
Git commit:
http://git.exim.org/exim.git/commitdiff/6f7fe114793ad909b7bd859bdd03bb6a614602ad

commit 6f7fe114793ad909b7bd859bdd03bb6a614602ad
Author:     Phil Pennock <pdp@???>
AuthorDate: Sun Aug 28 16:35:03 2011 -0400
Commit:     Phil Pennock <pdp@???>
CommitDate: Sun Aug 28 16:35:03 2011 -0400


    Handle IPv6 addresses with SPF.


    Patch from Wolfgang Breyha.


    Also, slight improvements to some debug statements.


    fixes bug 860
---
 doc/doc-txt/ChangeLog |    3 +++
 src/src/spf.c         |    9 +++++----
 2 files changed, 8 insertions(+), 4 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 23a18cf..b0d6b06 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -109,6 +109,9 @@ PP/07 Make maildir_use_size_file an _expandable_ boolean.
 PP/08 Handle ${run} returning more data than OS pipe buffer size.
       Bugzilla 1131.  Patch from Holger Weiß.


+PP/09 Handle IPv6 addresses with SPF.
+      Bugzilla 860.  Patch from Wolfgang Breyha.
+


Exim version 4.76
-----------------
diff --git a/src/src/spf.c b/src/src/spf.c
index 6be3393..4bbabbf 100644
--- a/src/src/spf.c
+++ b/src/src/spf.c
@@ -42,22 +42,23 @@ int spf_init(uschar *spf_helo_domain, uschar
*spf_remote_addr) {
}

   if (SPF_server_set_rec_dom(spf_server, CS primary_hostname)) {
-    debug_printf("spf: SPF_server_set_rec_dom() failed.\n");
+    debug_printf("spf: SPF_server_set_rec_dom(\"%s\") failed.\n",
primary_hostname);
     spf_server = NULL;
     return 0;
   }


spf_request = SPF_request_new(spf_server);

-  if (SPF_request_set_ipv4_str(spf_request, CS spf_remote_addr)) {
-    debug_printf("spf: SPF_request_set_ipv4_str() failed.\n");
+  if (SPF_request_set_ipv4_str(spf_request, CS spf_remote_addr)
+      && SPF_request_set_ipv6_str(spf_request, CS spf_remote_addr)) {
+    debug_printf("spf: SPF_request_set_ipv4_str() and
SPF_request_set_ipv6_str() failed [%s]\n", spf_remote_addr);
     spf_server = NULL;
     spf_request = NULL;
     return 0;
   }


   if (SPF_request_set_helo_dom(spf_request, CS spf_helo_domain)) {
-    debug_printf("spf: SPF_set_helo_dom() failed.\n");
+    debug_printf("spf: SPF_set_helo_dom(\"%s\") failed.\n", spf_helo_domain);
     spf_server = NULL;
     spf_request = NULL;
     return 0;



--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email