Coder Social home page Coder Social logo

Latest Version Issues about dkim-exchange HOT 25 CLOSED

 avatar commented on August 15, 2024
Latest Version Issues

from dkim-exchange.

Comments (25)

AlexLaroche avatar AlexLaroche commented on August 15, 2024

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=[email protected].

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

from dkim-exchange.

 avatar commented on August 15, 2024

That is interesting. I was sending from [email protected]. Is the underscore the problem?

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

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.

from dkim-exchange.

 avatar commented on August 15, 2024

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

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

Sorry, I didn't receive any error with the email address [email protected]. With version of the Dkim Signer, are you using? With version of Exchange server?

But if a try to send to auth-jsmith=[email protected]...

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)

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

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

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

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

from dkim-exchange.

 avatar commented on August 15, 2024

[email protected]

from dkim-exchange.

Pro avatar Pro commented on August 15, 2024

@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).

from dkim-exchange.

Pro avatar Pro commented on August 15, 2024

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

from dkim-exchange.

 avatar commented on August 15, 2024

1.5.2.0 from 1/18 is working fine

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

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

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

Couldn't parse to address: ' "[email protected]" <[email protected]> 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?

from dkim-exchange.

Pro avatar Pro commented on August 15, 2024

@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 "[email protected]" <[email protected]> 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

from dkim-exchange.

Pro avatar Pro commented on August 15, 2024

@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?

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

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=[email protected]". I didn't not have time now to test your modification. I will try to get some time tonight...

from dkim-exchange.

Pro avatar Pro commented on August 15, 2024

@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 = "[email protected]";
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();

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

screenshot
screenshot2
screenshot3

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

exchange_eventlog

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

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

from dkim-exchange.

Pro avatar Pro commented on August 15, 2024

I just tested
\"[email protected]\"\r\n\t<[email protected]>\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)

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

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

from dkim-exchange.

Pro avatar Pro commented on August 15, 2024

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.

from dkim-exchange.

AlexLaroche avatar AlexLaroche commented on August 15, 2024

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

from dkim-exchange.

Pro avatar Pro commented on August 15, 2024

QuickFix (for now): a1a145b

from dkim-exchange.

Pro avatar Pro commented on August 15, 2024

@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!!

from dkim-exchange.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.