[GH-ISSUE #62] dkim=fail on reply #46

Closed
opened 2026-02-26 10:35:23 +03:00 by kerem · 7 comments
Owner

Originally created by @tstar on GitHub (Sep 15, 2014).
Original GitHub issue: https://github.com/Pro/dkim-exchange/issues/62

Originally assigned to: @Pro on GitHub.

Hello!

Noticed a strange thing. When you send the first letter, gmaill (and the other servers) says there are no errors, dkim=pass. But for answered letters from these servers an error dkim=fail. At the same time the letter still has the dkim signature: dkim-signature: v=1; a=rsa-sha1; s=mail; d=secret.com; c=relaxed/relaxed; q=dns/txt; h=Date:From:Message-ID:Subject:To; bh=bla bla bla;
It's just I have this problem?

Exchange 2013 CUE6, Exchange DKIM Signer v2.0.2.

Thank you.

Originally created by @tstar on GitHub (Sep 15, 2014). Original GitHub issue: https://github.com/Pro/dkim-exchange/issues/62 Originally assigned to: @Pro on GitHub. Hello! Noticed a strange thing. When you send the first letter, gmaill (and the other servers) says there are no errors, dkim=pass. But for answered letters from these servers an error dkim=fail. At the same time the letter still has the dkim signature: dkim-signature: v=1; a=rsa-sha1; s=mail; d=secret.com; c=relaxed/relaxed; q=dns/txt; h=Date:From:Message-ID:Subject:To; bh=bla bla bla; It's just I have this problem? Exchange 2013 CUE6, Exchange DKIM Signer v2.0.2. Thank you.
kerem 2026-02-26 10:35:23 +03:00
  • closed this issue
  • added the
    bug
    agent
    labels
Author
Owner

@Pro commented on GitHub (Sep 15, 2014):

You mean for example the following scenario:

You send an email from tstar@example.org to userxy@gmail.com (goes through dkim-exchange -> DKIM pass)
UserXY sends you a response from his address userxy@gmail.com (DKIM pass)
Now you answer with your tstar@example.org email address (goes through dkim-exchange -> DKIM fail)

I'll investigate this problem today evening.
Can you in the meantime check the EventLog (in the DKIMSigner GUI) if this email really gets signed by dkim-exchange and also check if the dkim-signature header is rewritten. Thanks!

<!-- gh-comment-id:55590862 --> @Pro commented on GitHub (Sep 15, 2014): You mean for example the following scenario: You send an email from tstar@example.org to userxy@gmail.com (goes through dkim-exchange -> DKIM pass) UserXY sends you a response from his address userxy@gmail.com (DKIM pass) Now you answer with your tstar@example.org email address (goes through dkim-exchange -> DKIM fail) I'll investigate this problem today evening. Can you in the meantime check the EventLog (in the DKIMSigner GUI) if this email really gets signed by dkim-exchange and also check if the dkim-signature header is rewritten. Thanks!
Author
Owner

@tstar commented on GitHub (Sep 15, 2014):

Scenario you described is correct.
No problems found in the log files for these letters. Example:
2014-09-15T16:14:57.000 Signing mail with header: dkim-signature:v=1; a=rsa-sha1; s=mail; d=secret.com; c=relaxed/relaxed; q=dns/txt; h=Date:From:Message-ID:Subject:To; bh=cEgV5lHnd8sUXTgLvdj4/WfSHto=; b=VXoTepW6HYUO/j8d94nMoP/KpiwRlybabmcRpSt/KiW36kC1nBiSJhyAzXV+sNqdMhHCuJqPbI4IOKVcrMRC50Ee270zpCS1MJtgRks3I/G3pWWtj5iEJp/wMhLKXZq4IiOOYe3MlwwoJ7RmqDdEdX11HsiXtJ07K/xcAuf5YGw=;
I can send a test email to your personal address if you tell it to me.

Sometimes the log files in an error like:
2014-09-15T15: 32: 24.000 Signing a mail item according to DKIM failed with an exception. Check the logged exception for details.
System.NullReferenceException: Object reference not set to an instance of an object.
    in Exchange.DkimSigner.DkimSigningRoutingAgent.SignMailItem (MailItem mailItem) in d: \ Programmieren \ dkim-exchange \ Src \ Exchange.DkimSigner \ DkimSigningRoutingAgent.cs: line 80
    in Exchange.DkimSigner.DkimSigningRoutingAgent.WhenMessageCategorized (CategorizedMessageEventSource source, QueuedMessageEventArgs e) in d: \ Programmieren \ dkim-exchange \ Src \ Exchange.DkimSigner \ DkimSigningRoutingAgent.cs: line 56

But I do not think that this is something to do with this problem.

<!-- gh-comment-id:55593091 --> @tstar commented on GitHub (Sep 15, 2014): Scenario you described is correct. No problems found in the log files for these letters. Example: 2014-09-15T16:14:57.000 Signing mail with header: dkim-signature:v=1; a=rsa-sha1; s=mail; d=secret.com; c=relaxed/relaxed; q=dns/txt; h=Date:From:Message-ID:Subject:To; bh=cEgV5lHnd8sUXTgLvdj4/WfSHto=; b=VXoTepW6HYUO/j8d94nMoP/KpiwRlybabmcRpSt/KiW36kC1nBiSJhyAzXV+sNqdMhHCuJqPbI4IOKVcrMRC50Ee270zpCS1MJtgRks3I/G3pWWtj5iEJp/wMhLKXZq4IiOOYe3MlwwoJ7RmqDdEdX11HsiXtJ07K/xcAuf5YGw=; I can send a test email to your personal address if you tell it to me. Sometimes the log files in an error like: 2014-09-15T15: 32: 24.000 Signing a mail item according to DKIM failed with an exception. Check the logged exception for details. System.NullReferenceException: Object reference not set to an instance of an object.     in Exchange.DkimSigner.DkimSigningRoutingAgent.SignMailItem (MailItem mailItem) in d: \ Programmieren \ dkim-exchange \ Src \ Exchange.DkimSigner \ DkimSigningRoutingAgent.cs: line 80     in Exchange.DkimSigner.DkimSigningRoutingAgent.WhenMessageCategorized (CategorizedMessageEventSource source, QueuedMessageEventArgs e) in d: \ Programmieren \ dkim-exchange \ Src \ Exchange.DkimSigner \ DkimSigningRoutingAgent.cs: line 56 But I do not think that this is something to do with this problem.
Author
Owner

@Pro commented on GitHub (Sep 15, 2014):

Ok, thanks for your Info! I'll test it on my server, fix it and let you know the results.

Regarding the second log message I created a new issue, because there shouldn't be any excpetion: #63
If an exception ocurrs (like this one) the agent simply doesn't sign the email so it should be DKIM=pass and not fail, thus this exception probably has nothing to do with the scenario.

<!-- gh-comment-id:55594349 --> @Pro commented on GitHub (Sep 15, 2014): Ok, thanks for your Info! I'll test it on my server, fix it and let you know the results. Regarding the second log message I created a new issue, because there shouldn't be any excpetion: #63 If an exception ocurrs (like this one) the agent simply doesn't sign the email so it should be DKIM=pass and not fail, thus this exception probably has nothing to do with the scenario.
Author
Owner

@Pro commented on GitHub (Sep 15, 2014):

@tstar I could reproduce the problem but couldn't yet find the bug, it's quite strange why this happens. I need stil some time to investigate.

<!-- gh-comment-id:55663068 --> @Pro commented on GitHub (Sep 15, 2014): @tstar I could reproduce the problem but couldn't yet find the bug, it's quite strange why this happens. I need stil some time to investigate.
Author
Owner

@tstar commented on GitHub (Sep 16, 2014):

I do not know whether there is a relationship, but I noticed that sometimes the problem began to appear spf=fail on gmail after connecting dkim. And this is very strange.

<!-- gh-comment-id:55770223 --> @tstar commented on GitHub (Sep 16, 2014): I do not know whether there is a relationship, but I noticed that sometimes the problem began to appear spf=fail on gmail after connecting dkim. And this is very strange.
Author
Owner

@Pro commented on GitHub (Sep 17, 2014):

@tstar this should be fixed now in version 2.0.3. Thanks for your bug report!

<!-- gh-comment-id:55949601 --> @Pro commented on GitHub (Sep 17, 2014): @tstar this should be fixed now in version 2.0.3. Thanks for your bug report!
Author
Owner

@tstar commented on GitHub (Sep 18, 2014):

Now gmail says spf=pass, dkim=pass, dmarc=pass for all emails. Everything is fine.
Thank you for your work and great support!

<!-- gh-comment-id:56012084 --> @tstar commented on GitHub (Sep 18, 2014): Now gmail says spf=pass, dkim=pass, dmarc=pass for all emails. Everything is fine. Thank you for your work and great support!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dkim-exchange-Pro#46
No description provided.