Only unbind ldap connection if bind succeeded
[exim.git] / src / src / dmarc.c
index 825c2aa9982aadb358c26b3f354ad146a0347532..6e516525fd6b123625e496f718346a72b566af18 100644 (file)
@@ -81,6 +81,8 @@ int dmarc_init()
   dmarc_abort        = FALSE;
   dmarc_pass_fail    = US"skipped";
   dmarc_used_domain  = US"";
+  dmarc_ar_header    = NULL;
+  dmarc_has_been_checked = FALSE;
   header_from_sender = NULL;
   spf_sender_domain  = NULL;
   spf_human_readable = NULL;
@@ -323,7 +325,7 @@ int dmarc_process() {
     {
       case DMARC_POLICY_ABSENT:     /* No DMARC record found */
         dmarc_status = US"norecord";
-        dmarc_pass_fail = US"temperror";
+        dmarc_pass_fail = US"none";
         dmarc_status_text = US"No DMARC record";
         action = DMARC_RESULT_ACCEPT;
         break;
@@ -401,7 +403,7 @@ int dmarc_process() {
 
 int dmarc_write_history_file()
 {
-  static int history_file_fd;
+  int history_file_fd;
   ssize_t written_len;
   int tmp_ans;
   u_char **rua; /* aggregate report addressees */