X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fspf.c;h=2741c7bafe20d409d42ae2a6ee92b47abced58bf;hb=4c0a7a9cb02f9904c2e890f77ff8ce3a6beb25f4;hp=4bbabbf4c7ad387c0455ec0ad2a1c86d67f28a8c;hpb=6f7fe114793ad909b7bd859bdd03bb6a614602ad;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/spf.c b/src/src/spf.c index 4bbabbf4c..2741c7baf 100644 --- a/src/src/spf.c +++ b/src/src/spf.c @@ -3,8 +3,10 @@ *************************************************/ /* Experimental SPF support. - Copyright (c) Tom Kistner 2004 - License: GPL */ + Copyright (c) Tom Kistner 2004 - 2014 + License: GPL + Copyright (c) The Exim Maintainers 2016 +*/ /* Code for calling spf checks via libspf-alt. Called from acl.c. */ @@ -13,14 +15,17 @@ /* must be kept in numeric order */ static spf_result_id spf_result_id_list[] = { - { US"invalid", 0}, - { US"neutral", 1 }, - { US"pass", 2 }, - { US"fail", 3 }, - { US"softfail", 4 }, - { US"none", 5 }, - { US"err_temp", 6 }, - { US"err_perm", 7 } + /* name value */ + { US"invalid", 0}, + { US"neutral", 1 }, + { US"pass", 2 }, + { US"fail", 3 }, + { US"softfail", 4 }, + { US"none", 5 }, + { US"err_temp", 6 }, /* Deprecated Apr 2014 */ + { US"err_perm", 7 }, /* Deprecated Apr 2014 */ + { US"temperror", 6 }, /* RFC 4408 defined */ + { US"permerror", 7 } /* RFC 4408 defined */ }; SPF_server_t *spf_server = NULL; @@ -72,9 +77,9 @@ int spf_init(uschar *spf_helo_domain, uschar *spf_remote_addr) { context (if any), retrieves the result, sets up expansion strings and evaluates the condition outcome. */ -int spf_process(uschar **listptr, uschar *spf_envelope_sender, int action) { +int spf_process(const uschar **listptr, uschar *spf_envelope_sender, int action) { int sep = 0; - uschar *list = *listptr; + const uschar *list = *listptr; uschar *spf_result_id; uschar spf_result_id_buffer[128]; int rc = SPF_RESULT_PERMERROR; @@ -98,10 +103,10 @@ int spf_process(uschar **listptr, uschar *spf_envelope_sender, int action) { SPF_request_query_mailfrom(spf_request, &spf_response); /* set up expansion items */ - spf_header_comment = (uschar *)SPF_response_get_header_comment(spf_response); - spf_received = (uschar *)SPF_response_get_received_spf(spf_response); - spf_result = (uschar *)SPF_strresult(SPF_response_result(spf_response)); - spf_smtp_comment = (uschar *)SPF_response_get_smtp_comment(spf_response); + spf_header_comment = US SPF_response_get_header_comment(spf_response); + spf_received = US SPF_response_get_received_spf(spf_response); + spf_result = US SPF_strresult(SPF_response_result(spf_response)); + spf_smtp_comment = US SPF_response_get_smtp_comment(spf_response); rc = SPF_response_result(spf_response);