Re: [exim] Exim 4.90 + DKIM patch [bug]

Página Inicial
Delete this message
Reply to this message
Autor: Jeremy Harris
Data:  
Para: exim-users
Assunto: Re: [exim] Exim 4.90 + DKIM patch [bug]
On 14/01/18 17:48, Torsten Tributh via Exim-users wrote:
> Amazon is only using p= in their DKIM records.
> We need an extra matching for that.


Patch attached; please test.
--
Cheers,
Jeremy
diff --git a/src/src/dkim.c b/src/src/dkim.c
index 8c03d48c..852ae17f 100644
--- a/src/src/dkim.c
+++ b/src/src/dkim.c
@@ -75,7 +75,8 @@ for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS);
       }


     /* check if this looks like a DKIM record */
-    if (strncasecmp(answer, "v=dkim", 6) != 0) continue;
+    if (strncmp(answer, "v=", 2) == 0 && strncasecmp(answer, "v=dkim", 6) != 0)
+      continue;
     return PDKIM_OK;
     }


diff --git a/src/src/pdkim/pdkim.c b/src/src/pdkim/pdkim.c
index b884671d..186258a6 100644
--- a/src/src/pdkim/pdkim.c
+++ b/src/src/pdkim/pdkim.c
@@ -654,7 +654,8 @@ while ((ele = string_nextinlist(&raw_record, &sep, NULL, 0)))
}

 /* Set fallback defaults */
-if (!pub->version    ) pub->version     = string_copy(PDKIM_PUB_RECORD_VERSION);
+if (!pub->version)
+  pub->version = string_copy(PDKIM_PUB_RECORD_VERSION);
 else if (Ustrcmp(pub->version, PDKIM_PUB_RECORD_VERSION) != 0)
   {
   DEBUG(D_acl) debug_printf(" Bad v= field\n");