0 votes

I'm picking up a mail from an Exchange server, which seems to show, in the headers, that the DKIM check passed on receipt.

However, for this mail (where IsDKIMSigned == true), the CheckDKIMSignature() is returning false. Unfortunately, there is no additional information returned from this call, so I have no way of knowing what the problem is.

Even if I loosen the option a bit, I'm still getting a false result. I have had a success on a different mail from the same account, to the same account, but with different content.

mail.CheckDKIMSignature(new DKIMValidationConfiguration() { Mode = DKIMValidationMode.AtLeastOne, IgnoreInvalidLength = true, IgnoreUnsignedFrom = true });

I'm using the latest NuGet in a .NET Standard 2.0 Azure Function.

by

1 Answer

0 votes

As you are using Exchange, I assume, that email returned from IMAP is modified by Exchange and this is the reason why DKIM signature is broken.

by (297k points)
...