[GH-ISSUE #27] Latest Version Issues #18

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

Originally created by @networkthinking on GitHub (Mar 20, 2014).
Original GitHub issue: https://github.com/Pro/dkim-exchange/issues/27

Hello,
I downloaded the latest version and it was not signing my email. I checked eventlog and found this below. I decided to roll-back to an older version and it worked fine.

Let me know if you need anything. Not sure how to check what version I installed but if you tell me how, I will check. The older version made me choose the version of Exchange.

The description for Event ID 0 from source Exchange DKIM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Signing a mail item according to DKIM failed with an exception. Check the logged exception for details.
System.FormatException: The specified string is not in the form required for an e-mail address.
at System.Net.Mail.MailAddress.ParseValue(String address)
at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
at Exchange.DkimSigner.DefaultDkimSigner.CanSign(Stream inputStream)
at Exchange.DkimSigner.DkimSigningRoutingAgent.SignMailItem(MailItem mailItem)
at Exchange.DkimSigner.DkimSigningRoutingAgent.WhenMessageCategorized(CategorizedMessageEventSource source, QueuedMessageEventArgs e)

the message resource is present but the message is not found in the string/message table

Originally created by @networkthinking on GitHub (Mar 20, 2014). Original GitHub issue: https://github.com/Pro/dkim-exchange/issues/27 Hello, I downloaded the latest version and it was not signing my email. I checked eventlog and found this below. I decided to roll-back to an older version and it worked fine. Let me know if you need anything. Not sure how to check what version I installed but if you tell me how, I will check. The older version made me choose the version of Exchange. The description for Event ID 0 from source Exchange DKIM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: Signing a mail item according to DKIM failed with an exception. Check the logged exception for details. System.FormatException: The specified string is not in the form required for an e-mail address. at System.Net.Mail.MailAddress.ParseValue(String address) at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding) at Exchange.DkimSigner.DefaultDkimSigner.CanSign(Stream inputStream) at Exchange.DkimSigner.DkimSigningRoutingAgent.SignMailItem(MailItem mailItem) at Exchange.DkimSigner.DkimSigningRoutingAgent.WhenMessageCategorized(CategorizedMessageEventSource source, QueuedMessageEventArgs e) the message resource is present but the message is not found in the string/message table
kerem 2026-02-26 10:35:15 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

The problem is with the MailAddress class. I saw the problem with a non conventionnal email addresss when I implemented DKIM relaxed canonicalization.

MSDN documention : MailAddress Constructor (Exception FormatException) =>
http://msdn.microsoft.com/en-us/library/591bk9e8%28v=vs.110%29.aspx

By example, this address will generate a exception: check-auth-jsmith=yourdomain.com@verifier.port25.com.

I was thinking that the email address don't respect the rfc.

<!-- gh-comment-id:38187551 --> @AlexLaroche commented on GitHub (Mar 20, 2014): The problem is with the MailAddress class. I saw the problem with a non conventionnal email addresss when I implemented DKIM relaxed canonicalization. MSDN documention : MailAddress Constructor (Exception FormatException) => http://msdn.microsoft.com/en-us/library/591bk9e8%28v=vs.110%29.aspx By example, this address will generate a exception: check-auth-jsmith=yourdomain.com@verifier.port25.com. I was thinking that the email address don't respect the rfc.
Author
Owner

@networkthinking commented on GitHub (Mar 20, 2014):

That is interesting. I was sending from joe_smith@xxmanagement.com. Is the underscore the problem?

<!-- gh-comment-id:38188094 --> @networkthinking commented on GitHub (Mar 20, 2014): That is interesting. I was sending from joe_smith@xxmanagement.com. Is the underscore the problem?
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

You should use the version 1.5.2 for the moment, the problem have been added with RecipientRule and SenderRule support.

I need to make the test to check if the problem is the underscore in the email address... but it's a interesting case to try.

<!-- gh-comment-id:38188722 --> @AlexLaroche commented on GitHub (Mar 20, 2014): You should use the version 1.5.2 for the moment, the problem have been added with RecipientRule and SenderRule support. I need to make the test to check if the problem is the underscore in the email address... but it's a interesting case to try.
Author
Owner

@networkthinking commented on GitHub (Mar 20, 2014):

I will try to reload the new version tonight and test again with a non underscore email address.

<!-- gh-comment-id:38189286 --> @networkthinking commented on GitHub (Mar 20, 2014): I will try to reload the new version tonight and test again with a non underscore email address.
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

Sorry, I didn't receive any error with the email address test_test@rhezo.com. With version of the Dkim Signer, are you using? With version of Exchange server?

But if a try to send to auth-jsmith=yourdomain.com@rhezo.com...

Signing a mail item according to DKIM failed with an exception. Check the logged exception for details.
System.FormatException: La chaîne spécifiée n'est pas de la forme requise pour une adresse de messagerie.
à System.Net.Mime.MailBnfHelper.ReadMailAddress(String data, Int32& offset, String& displayName)
à System.Net.Mail.MailAddress.ParseValue(String address)
à System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
à Exchange.DkimSigner.DefaultDkimSigner.CanSign(Stream inputStream)
à Exchange.DkimSigner.DkimSigningRoutingAgent.SignMailItem(MailItem mailItem)
à Exchange.DkimSigner.DkimSigningRoutingAgent.WhenMessageCategorized(CategorizedMessageEventSource source, QueuedMessageEventArgs e)

<!-- gh-comment-id:38192927 --> @AlexLaroche commented on GitHub (Mar 20, 2014): Sorry, I didn't receive any error with the email address test_test@rhezo.com. With version of the Dkim Signer, are you using? With version of Exchange server? But if a try to send to auth-jsmith=yourdomain.com@rhezo.com... Signing a mail item according to DKIM failed with an exception. Check the logged exception for details. System.FormatException: La chaîne spécifiée n'est pas de la forme requise pour une adresse de messagerie. à System.Net.Mime.MailBnfHelper.ReadMailAddress(String data, Int32& offset, String& displayName) à System.Net.Mail.MailAddress.ParseValue(String address) à System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding) à Exchange.DkimSigner.DefaultDkimSigner.CanSign(Stream inputStream) à Exchange.DkimSigner.DkimSigningRoutingAgent.SignMailItem(MailItem mailItem) à Exchange.DkimSigner.DkimSigningRoutingAgent.WhenMessageCategorized(CategorizedMessageEventSource source, QueuedMessageEventArgs e)
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

@Pro Why the .pdb file are no more locate in the release folder of each DKIM Signer version (Exchange 2007, 2010, 2013)?

<!-- gh-comment-id:38194078 --> @AlexLaroche commented on GitHub (Mar 20, 2014): @Pro Why the .pdb file are no more locate in the release folder of each DKIM Signer version (Exchange 2007, 2010, 2013)?
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

@networkthinking Can you said me what is the email address of your recipient? The problem isn't with the sending email address.

<!-- gh-comment-id:38196504 --> @AlexLaroche commented on GitHub (Mar 20, 2014): @networkthinking Can you said me what is the email address of your recipient? The problem isn't with the sending email address.
Author
Owner

@networkthinking commented on GitHub (Mar 20, 2014):

wally.hass@gmail.com

<!-- gh-comment-id:38196592 --> @networkthinking commented on GitHub (Mar 20, 2014): wally.hass@gmail.com
Author
Owner

@Pro commented on GitHub (Mar 20, 2014):

@AlexLaroche I just added the .pdb files (they were never there :) )
@networkthinking I uploaded a new version which has a fallback and doesn't throw an exception, if the email address is invalid. Can you please try the new version and post the error message.
To install it copy the .dll AND .pdb to your server (the .pdb gives more debug infos).

<!-- gh-comment-id:38197315 --> @Pro commented on GitHub (Mar 20, 2014): @AlexLaroche I just added the .pdb files (they were never there :) ) @networkthinking I uploaded a new version which has a fallback and doesn't throw an exception, if the email address is invalid. Can you please try the new version and post the error message. To install it copy the .dll AND .pdb to your server (the .pdb gives more debug infos).
Author
Owner

@Pro commented on GitHub (Mar 20, 2014):

@networkthinking Btw: you can check the version by Right click on the .dll -> Properties -> Details -> File Version

<!-- gh-comment-id:38197864 --> @Pro commented on GitHub (Mar 20, 2014): @networkthinking Btw: you can check the version by Right click on the .dll -> Properties -> Details -> File Version
Author
Owner

@networkthinking commented on GitHub (Mar 20, 2014):

1.5.2.0 from 1/18 is working fine

Should I just download from the home page or someplace special?

<!-- gh-comment-id:38198344 --> @networkthinking commented on GitHub (Mar 20, 2014): 1.5.2.0 from 1/18 is working fine Should I just download from the home page or someplace special?
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

Work for me... The exception is catch a new entry is created in the eventlog.

Couldn't parse to address: ' "auth-jsmith=yourdomain.com@test.local" <auth-jsmith=yourdomain.com@test.local> Ignoring recipient rule

But the email no more signed... By default, the email was signed before the rules was implemented. Is this is the desired behavior?

<!-- gh-comment-id:38199850 --> @AlexLaroche commented on GitHub (Mar 20, 2014): Work for me... The exception is catch a new entry is created in the eventlog. `Couldn't parse to address: ' "auth-jsmith=yourdomain.com@test.local" <auth-jsmith=yourdomain.com@test.local> Ignoring recipient rule ` But the email no more signed... By default, the email was signed before the rules was implemented. Is this is the desired behavior?
Author
Owner

@Pro commented on GitHub (Mar 20, 2014):

@AlexLaroche indeed, that's not correct. It should sign. Just fixed the signing. Is this exactly the error message which you got? Because it seems there's the closing ' missing? The E-Mail adress is then "auth-jsmith=yourdomain.com@test.local" <auth-jsmith=yourdomain.com@test.local> including the newline?
Can you debug into the code and check if there's a newline.

@networkthinking You can take the current master branch: https://github.com/Pro/dkim-exchange/archive/master.zip

<!-- gh-comment-id:38204631 --> @Pro commented on GitHub (Mar 20, 2014): @AlexLaroche indeed, that's not correct. It should sign. Just fixed the signing. Is this exactly the error message which you got? Because it seems there's the closing `'` missing? The E-Mail adress is then `"auth-jsmith=yourdomain.com@test.local" <auth-jsmith=yourdomain.com@test.local>` including the newline? Can you debug into the code and check if there's a newline. @networkthinking You can take the current master branch: https://github.com/Pro/dkim-exchange/archive/master.zip
Author
Owner

@Pro commented on GitHub (Mar 20, 2014):

@AlexLaroche I just wrote a short app to validate the function of MailAddress. It parses the mail address above just fine... Can you tell me the exact charaters which cause MailAddress to fail?

<!-- gh-comment-id:38205381 --> @Pro commented on GitHub (Mar 20, 2014): @AlexLaroche I just wrote a short app to validate the function of MailAddress. It parses the mail address above just fine... Can you tell me the exact charaters which cause MailAddress to fail?
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

May be, I remove some characters bu error when I pass the error message from eventlog. I remove some text before "Ignoring recipient rule" because it wasn't in English for sure.

The bad char is "=". The recipient email address is "auth-jsmith=yourdomain.com@test.local". I didn't not have time now to test your modification. I will try to get some time tonight...

<!-- gh-comment-id:38211047 --> @AlexLaroche commented on GitHub (Mar 20, 2014): May be, I remove some characters bu error when I pass the error message from eventlog. I remove some text before "Ignoring recipient rule" because it wasn't in English for sure. The bad char is "=". The recipient email address is "auth-jsmith=yourdomain.com@test.local". I didn't not have time now to test your modification. I will try to get some time tonight...
Author
Owner

@Pro commented on GitHub (Mar 20, 2014):

@AlexLaroche Please post error messages by using backticks: http://superuser.com/questions/254076/how-do-i-type-the-tick-and-backtick-characters-on-windows and https://help.github.com/articles/github-flavored-markdown#syntax-highlighting
This makes sure the message is posted without missing chars

Also this email address works fine, I used the following console app to validate it:

string addr = "auth-jsmith=yourdomain.com@test.local";
MailAddress a = null;
try
{
    a = new MailAddress(addr);
}
catch (System.FormatException ex)
{
    Console.WriteLine(ex.Message);
}
if (a != null)
{
    Console.WriteLine("OK: " + a.User + "@" + a.Host);
}
Console.ReadKey();
<!-- gh-comment-id:38212335 --> @Pro commented on GitHub (Mar 20, 2014): @AlexLaroche Please post error messages by using backticks: http://superuser.com/questions/254076/how-do-i-type-the-tick-and-backtick-characters-on-windows and https://help.github.com/articles/github-flavored-markdown#syntax-highlighting This makes sure the message is posted without missing chars Also this email address works fine, I used the following console app to validate it: ``` c# string addr = "auth-jsmith=yourdomain.com@test.local"; MailAddress a = null; try { a = new MailAddress(addr); } catch (System.FormatException ex) { Console.WriteLine(ex.Message); } if (a != null) { Console.WriteLine("OK: " + a.User + "@" + a.Host); } Console.ReadKey(); ```
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

screenshot
screenshot2
screenshot3

<!-- gh-comment-id:38231679 --> @AlexLaroche commented on GitHub (Mar 20, 2014): ![screenshot](https://f.cloud.github.com/assets/5282389/2478615/7e1b8a86-b083-11e3-8766-dba420c9d053.jpg) ![screenshot2](https://f.cloud.github.com/assets/5282389/2478634/da8a0676-b083-11e3-98e5-2a03986bbfb5.jpg) ![screenshot3](https://f.cloud.github.com/assets/5282389/2478636/e02083f8-b083-11e3-8684-2f2ace4b75a2.jpg)
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

exchange_eventlog

<!-- gh-comment-id:38231892 --> @AlexLaroche commented on GitHub (Mar 20, 2014): ![exchange_eventlog](https://f.cloud.github.com/assets/5282389/2478647/4e439d2a-b084-11e3-8112-7da1cf0f1dce.jpg)
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

I am oblige to confirm that your code work in .net 4.5.1. I will try with .net 3.5...

<!-- gh-comment-id:38232088 --> @AlexLaroche commented on GitHub (Mar 20, 2014): I am oblige to confirm that your code work in .net 4.5.1. I will try with .net 3.5...
Author
Owner

@Pro commented on GitHub (Mar 20, 2014):

I just tested
\"auth-jsmith=yourdomain.com@test.local\"\r\n\t<auth-jsmith=yourdomain.com@test.local>\r\n
Result: in .NET 4.5 it works, but 3.5 there's the exact same exception.
So this is related to 3.5 (Exchange 2007 & 2010)

<!-- gh-comment-id:38232195 --> @Pro commented on GitHub (Mar 20, 2014): I just tested `\"auth-jsmith=yourdomain.com@test.local\"\r\n\t<auth-jsmith=yourdomain.com@test.local>\r\n` Result: in .NET 4.5 it works, but 3.5 there's the exact same exception. So this is related to 3.5 (Exchange 2007 & 2010)
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

Same result! This is a very interesting problem... :)

<!-- gh-comment-id:38232304 --> @AlexLaroche commented on GitHub (Mar 20, 2014): Same result! This is a very interesting problem... :)
Author
Owner

@Pro commented on GitHub (Mar 20, 2014):

The problem for .NET 3.5 is the newline between the first (name) part and the second (address). If I replace it with space, also .NET 3.5 recognizes it correctly.

<!-- gh-comment-id:38232427 --> @Pro commented on GitHub (Mar 20, 2014): The problem for .NET 3.5 is the newline between the first (name) part and the second (address). If I replace it with space, also .NET 3.5 recognizes it correctly.
Author
Owner

@AlexLaroche commented on GitHub (Mar 20, 2014):

We should look the two MailAddress class difference between .net 3.5 and .net 4.5 to be sure to avoid any others problems...

Here the source code for 4.5.1 : http://referencesource.microsoft.com/#System/net/System/Net/mail/MailAddress.cs#b23cf10c5d2b82f1

<!-- gh-comment-id:38232621 --> @AlexLaroche commented on GitHub (Mar 20, 2014): We should look the two MailAddress class difference between .net 3.5 and .net 4.5 to be sure to avoid any others problems... Here the source code for 4.5.1 : http://referencesource.microsoft.com/#System/net/System/Net/mail/MailAddress.cs#b23cf10c5d2b82f1
Author
Owner

@Pro commented on GitHub (Mar 20, 2014):

QuickFix (for now): github.com/Pro/dkim-exchange@a1a145b50a

<!-- gh-comment-id:38233192 --> @Pro commented on GitHub (Mar 20, 2014): QuickFix (for now): https://github.com/Pro/dkim-exchange/commit/a1a145b50aff6c17b492355bcde8d6322cbfee6e
Author
Owner

@Pro commented on GitHub (Mar 20, 2014):

@networkthinking You can use version 1.8.3 now: https://github.com/Pro/dkim-exchange/releases/tag/v1.8.3

@AlexLaroche if you find the source code for 3.5 we can look for differences, but please create a new Issue for that. Thanks for your help!!

<!-- gh-comment-id:38233588 --> @Pro commented on GitHub (Mar 20, 2014): @networkthinking You can use version 1.8.3 now: https://github.com/Pro/dkim-exchange/releases/tag/v1.8.3 @AlexLaroche if you find the source code for 3.5 we can look for differences, but please create a new Issue for that. Thanks for your help!!
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#18
No description provided.