Logging: add I= element to transport-defer lines. Bug 2675
[exim.git] / src / src / spf.c
index 3e121678ca5611b34e9f025eb735b919287a005c..3a1912a918573522b9608251056a107205467e87 100644 (file)
@@ -248,7 +248,7 @@ if (!(spf_server = SPF_server_new_dns(dc, debug)))
 if (!(s = expand_string(spf_smtp_comment_template)))
   log_write(0, LOG_MAIN|LOG_PANIC_DIE, "expansion of spf_smtp_comment_template failed");
 
-SPF_server_set_explanation(spf_server, s, &spf_response);
+SPF_server_set_explanation(spf_server, CCS s, &spf_response);
 if (SPF_response_errcode(spf_response) != SPF_E_SUCCESS)
   log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s", SPF_strerror(SPF_response_errcode(spf_response)));
 
@@ -402,8 +402,12 @@ if (spf_result_guessed)
   g = string_cat(g, US" (best guess record for domain)");
 
 s = expand_string(US"$sender_address_domain");
+if (s && *s)
+  return string_append(g, 2, US" smtp.mailfrom=", s);
+
+s = sender_helo_name;
 return s && *s
-  ? string_append(g, 2, US" smtp.mailfrom=", s)
+  ? string_append(g, 2, US" smtp.helo=", s)
   : string_cat(g, US" smtp.mailfrom=<>");
 }