Too many variables were being cleared between connections
Broken-by: c780096c29 4.91 RC2
log_write(0, LOG_MAIN, "DMARC results: spf_domain=%s dmarc_domain=%s "
"spf_align=%s dkim_align=%s enforcement='%s'",
spf_sender_domain, dmarc_used_domain,
log_write(0, LOG_MAIN, "DMARC results: spf_domain=%s dmarc_domain=%s "
"spf_align=%s dkim_align=%s enforcement='%s'",
spf_sender_domain, dmarc_used_domain,
- (sa==DMARC_POLICY_SPF_ALIGNMENT_PASS) ?"yes":"no",
- (da==DMARC_POLICY_DKIM_ALIGNMENT_PASS)?"yes":"no",
+ sa==DMARC_POLICY_SPF_ALIGNMENT_PASS ?"yes":"no",
+ da==DMARC_POLICY_DKIM_ALIGNMENT_PASS ?"yes":"no",
dmarc_status_text);
history_file_status = dmarc_write_history_file();
/* Now get the forensic reporting addresses, if any */
dmarc_status_text);
history_file_status = dmarc_write_history_file();
/* Now get the forensic reporting addresses, if any */
dmarc_write_history_file()
{
int history_file_fd;
dmarc_write_history_file()
{
int history_file_fd;
uschar *history_buffer = NULL;
if (!dmarc_history_file)
uschar *history_buffer = NULL;
if (!dmarc_history_file)
+ {
+ DEBUG(D_receive) debug_printf("DMARC history file not set\n");
return DMARC_HIST_DISABLED;
return DMARC_HIST_DISABLED;
history_file_fd = log_create(dmarc_history_file);
if (history_file_fd < 0)
history_file_fd = log_create(dmarc_history_file);
if (history_file_fd < 0)
uschar *dmarc_exim_expand_query(int);
uschar *dmarc_exim_expand_defaults(int);
uschar *dmarc_auth_results_header(header_line *,uschar *);
uschar *dmarc_exim_expand_query(int);
uschar *dmarc_exim_expand_defaults(int);
uschar *dmarc_auth_results_header(header_line *,uschar *);
-int dmarc_write_history_file();
+static int dmarc_write_history_file();
#define DMARC_AR_HEADER US"Authentication-Results:"
#define DMARC_VERIFY_STATUS 1
#define DMARC_AR_HEADER US"Authentication-Results:"
#define DMARC_VERIFY_STATUS 1
#endif
#ifdef EXPERIMENTAL_DMARC
dmarc_has_been_checked = dmarc_disable_verify = dmarc_enable_forensic = FALSE;
#endif
#ifdef EXPERIMENTAL_DMARC
dmarc_has_been_checked = dmarc_disable_verify = dmarc_enable_forensic = FALSE;
-dmarc_domain_policy = dmarc_forensic_sender =
-dmarc_history_file = dmarc_status = dmarc_status_text =
-dmarc_used_domain = NULL;
+dmarc_domain_policy = dmarc_status = dmarc_status_text = dmarc_used_domain = NULL;
#endif
#ifdef EXPERIMENTAL_ARC
arc_state = arc_state_reason = NULL;
#endif
#ifdef EXPERIMENTAL_ARC
arc_state = arc_state_reason = NULL;
1999-03-02 09:44:33 10HmaX-0005vi-00 dmarc_status_text <No DMARC record>
1999-03-02 09:44:33 10HmaX-0005vi-00 dmarc_used_domain <example.com>
1999-03-02 09:44:33 10HmaX-0005vi-00 dmarc_domain_policy <>
1999-03-02 09:44:33 10HmaX-0005vi-00 dmarc_status_text <No DMARC record>
1999-03-02 09:44:33 10HmaX-0005vi-00 dmarc_used_domain <example.com>
1999-03-02 09:44:33 10HmaX-0005vi-00 dmarc_domain_policy <>
-1999-03-02 09:44:33 10HmaX-0005vi-00 Authentication-Results: myhost.test.ex;\n spf=fail smtp.mailfrom=example.com;\n dmarc=noneheader.from=example.com
+1999-03-02 09:44:33 10HmaX-0005vi-00 Authentication-Results: myhost.test.ex;\n spf=fail smtp.mailfrom=example.com;\n dmarc=none header.from=example.com
1999-03-02 09:44:33 10HmaX-0005vi-00 <= a@example.com H=(testclient) [ip4.ip4.ip4.ip4] P=smtp S=sss
1999-03-02 09:44:33 10HmaX-0005vi-00 <= a@example.com H=(testclient) [ip4.ip4.ip4.ip4] P=smtp S=sss