DMARC: add results to generic authres string; remove $dmarc_ar_header
[exim.git] / src / src / spf.c
index 1d4e032e94ca6139f4e7a3d34e81ec138fdae232..12994a690d226b363d1b7a4282cb889925b6b1fa 100644 (file)
@@ -5,7 +5,7 @@
 /* Experimental SPF support.
    Copyright (c) Tom Kistner <tom@duncanthrax.net> 2004 - 2014
    License: GPL
-   Copyright (c) The Exim Maintainers 2017
+   Copyright (c) The Exim Maintainers 2015 - 2018
 */
 
 /* Code for calling spf checks via libspf-alt. Called from acl.c. */
@@ -89,7 +89,7 @@ return TRUE;
 /* spf_process adds the envelope sender address to the existing
    context (if any), retrieves the result, sets up expansion
    strings and evaluates the condition outcome.
-   
+
 Return: OK/FAIL  */
 
 int
@@ -146,4 +146,16 @@ while ((spf_result_id = string_nextinlist(&list, &sep, NULL, 0)))
 return FAIL;
 }
 
+
+
+gstring *
+authres_spf(gstring * g)
+{
+if (!spf_result) return g;
+
+return string_append(g, 4, US";\n\tspf=", spf_result,
+         US" smtp.mailfrom=", expand_string(US"$sender_address_domain"));
+}
+
+
 #endif