diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2018-04-09 11:19:47 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2018-04-09 12:01:45 +0100 |
commit | d341f2a27e689098e23c4eae2f78b59d053d5060 (patch) | |
tree | dec333c732b8d14ae12f4acde0426c964b12eb36 /src | |
parent | e5c155710bc95053e6e4b3845b79eb8fc281f769 (diff) |
DMARC: fix history file
Too many variables were being cleared between connections
Broken-by: c780096c29 4.91 RC2
Diffstat (limited to 'src')
-rw-r--r-- | src/src/dmarc.c | 9 | ||||
-rw-r--r-- | src/src/dmarc.h | 2 | ||||
-rw-r--r-- | src/src/smtp_in.c | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/src/dmarc.c b/src/src/dmarc.c index 1c917aa15..2ac0ac550 100644 --- a/src/src/dmarc.c +++ b/src/src/dmarc.c @@ -474,8 +474,8 @@ if (!dmarc_abort && !sender_host_authenticated) 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 */ @@ -493,7 +493,7 @@ if (!dmarc_disable_verify) return OK; } -int +static int dmarc_write_history_file() { int history_file_fd; @@ -503,7 +503,10 @@ u_char **rua; /* aggregate report addressees */ uschar *history_buffer = NULL; if (!dmarc_history_file) + { + DEBUG(D_receive) debug_printf("DMARC history file not set\n"); return DMARC_HIST_DISABLED; + } history_file_fd = log_create(dmarc_history_file); if (history_file_fd < 0) diff --git a/src/src/dmarc.h b/src/src/dmarc.h index 764ff88ff..3a3bc6d13 100644 --- a/src/src/dmarc.h +++ b/src/src/dmarc.h @@ -23,7 +23,7 @@ int dmarc_process(); 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 diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index db9fb6879..33d6d3cc8 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -2015,9 +2015,7 @@ spf_result_guessed = 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; |