summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhil Pennock <pdp@exim.org>2011-08-28 16:35:03 -0400
committerPhil Pennock <pdp@exim.org>2011-08-28 16:35:03 -0400
commit6f7fe114793ad909b7bd859bdd03bb6a614602ad (patch)
tree6567975383d21bf92e6029c034f376eeb474a602 /src
parentac53fcdaf9c772ee8e70ca4f14ed19b39e12eb68 (diff)
Handle IPv6 addresses with SPF.
Patch from Wolfgang Breyha. Also, slight improvements to some debug statements. fixes bug 860
Diffstat (limited to 'src')
-rw-r--r--src/src/spf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/src/spf.c b/src/src/spf.c
index 6be339390..4bbabbf4c 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;