Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: Signing with a Domain Key Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Neil_Knight
Newbie
Newbie


Joined: 06 December 2011
Location: United Kingdom
Online Status: Offline
Posts: 30
Posted: 12 December 2011 at 7:13am | IP Logged Quote Neil_Knight

I am using the following code:

DomainKeys dk = new DomainKeys();
msg = dk.Sign(msg, null, domainKey, true, "_domainkey.email", DomainKeysTypes.DKIM);

And I add my headers before this to the message, but when I look at the output of the header, the headers aren't populated. Your documentation says:

headersToSign
The array of the names of the headers to be included in the signature, or a null reference (Nothing in Visual Basic) if all the message headers should be included in the signature.

Below is the output of my DKIM signature

DKIM-Signature: v=1; a=rsa-sha1; bh=xxx=;
c=relaxed/relaxed; d=email.xxxxxxxx.co.uk; s=_domainkey.email;
h=MIME-Version:Reply-To:From:To:List-Unsubscribe:Subject:Message-ID:Content-Type;
b=Q2e46cK+1FrKtCmM1l35av3HCJk7
Back to Top View Neil_Knight's Profile Search for other posts by Neil_Knight
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6044
Posted: 13 December 2011 at 11:16pm | IP Logged Quote Igor

I've asked the developer in charge of MailBee.NET Security component to take a look into this. Will be back to you once there are news.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6044
Posted: 14 December 2011 at 2:01am | IP Logged Quote Igor

Can you please provide us with the code you are using to add the headers? If you'd rather not post that on public forum, you can open a ticket in our HelpDesk.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Neil_Knight
Newbie
Newbie


Joined: 06 December 2011
Location: United Kingdom
Online Status: Offline
Posts: 30
Posted: 14 December 2011 at 2:17am | IP Logged Quote Neil_Knight

Code:

mailer.Message.Headers.Add("Reply-To", "<" + senderEmail + ">", false);
mailer.Message.Headers.Add("From", "\"" + senderName + "\" <" + senderEmail + ">", false);
mailer.Message.Headers.Add("List-Unsubscribe", string.Format("<mailto:unsubscribe@{0}>", senderEmail.Substring(senderEmail.IndexOf('@') + 1)), false);
Back to Top View Neil_Knight's Profile Search for other posts by Neil_Knight
 
Neil_Knight
Newbie
Newbie


Joined: 06 December 2011
Location: United Kingdom
Online Status: Offline
Posts: 30
Posted: 14 December 2011 at 3:25am | IP Logged Quote Neil_Knight

Hi Igor,
From the code that I have posted, does this look right? I've looked at your documentation and this is how you are suggesting it works.
Back to Top View Neil_Knight's Profile Search for other posts by Neil_Knight
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6044
Posted: 14 December 2011 at 3:35am | IP Logged Quote Igor

Yes, that seems to be OK. And according to the information from your initial post, signature seems to include all the headers you add:

Code:
h=MIME-Version:Reply-To:From:To:List-Unsubscribe:Subject:Message-ID:Content-Type;


Considering this, can you please explain what exactly is wrong? Are you saying the headers are present in the signature but not in the header block of the message itself?

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Neil_Knight
Newbie
Newbie


Joined: 06 December 2011
Location: United Kingdom
Online Status: Offline
Posts: 30
Posted: 14 December 2011 at 5:25am | IP Logged Quote Neil_Knight

I was actually expecting to see the Reply-To email address etc. Is not that the correct output?
Back to Top View Neil_Knight's Profile Search for other posts by Neil_Knight
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6044
Posted: 14 December 2011 at 5:34am | IP Logged Quote Igor

DomainKeys standard assumes the "h=" parameter holds the list of headers which were included into the signature, and this is only about header names, not values.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Neil_Knight
Newbie
Newbie


Joined: 06 December 2011
Location: United Kingdom
Online Status: Offline
Posts: 30
Posted: 14 December 2011 at 6:49am | IP Logged Quote Neil_Knight

Excellent, so it's working as expected. Thanks.
Back to Top View Neil_Knight's Profile Search for other posts by Neil_Knight
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide