DomainKey script

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
jp_reed
New user
New user
Posts: 10
Joined: 2009-02-03 20:36

DomainKey script

Post by jp_reed » 2010-01-15 08:19

I searched the internet far and wide to find the C# CERN library mentioned at sourceforge for domainkeys and was unable to locate it.

I also reviewed the documentation for the hmail scripting API. It appears that a script for DomainKeys is not possible because the Header collection available in the API is read only. The script would have to be able to add a header ("Domainkey-signature") to the collection prior to the message being sent.

However, I am very new at scripting for hmail, so let me know if I'm incorrect.

User avatar
mattg
Moderator
Moderator
Posts: 21268
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: DomainKey script

Post by mattg » 2010-01-15 08:43

It certainly is possible to add email headers via the COM API.

It would be something like

oMessage.HeaderValue("Domainkey-signature") = string
oMessage.save
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

jp_reed
New user
New user
Posts: 10
Joined: 2009-02-03 20:36

Re: DomainKey script

Post by jp_reed » 2010-01-15 08:45

Ahh, then the docs are wrong. Wouldn't be the first time that's happened to me. :)

Thanks!

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Re: DomainKey script

Post by ^DooM^ » 2010-01-15 10:29

Which docs specifically are you referring to?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

User avatar
mattg
Moderator
Moderator
Posts: 21268
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: DomainKey script

Post by mattg » 2010-01-15 14:52

jp_reed wrote:Ahh, then the docs are wrong.
No I don't think so. This is in the documentation...
jp_reed wrote:I also reviewed the documentation for the hmail scripting API. It appears that a script for DomainKeys is not possible because the Header collection available in the API is read only.
http://www.hmailserver.com/documentatio ... ct_message
The very next item after the headers collection that you mention is Headervalue
MessageHeaders Headers
Collection of message heades.
(read-only)

string HeaderValue(string FieldName)
Value of the given header field.
:wink:
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

jp_reed
New user
New user
Posts: 10
Joined: 2009-02-03 20:36

Re: DomainKey script

Post by jp_reed » 2010-01-16 00:25

The fact that the docs state that the MessageHeaders collection is read only is what I was referring to. It's just a bit ambiguous, no big deal.

Thanks!

User avatar
mattg
Moderator
Moderator
Posts: 21268
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: DomainKey script

Post by mattg » 2010-01-16 04:17

Yes quite a few items are flagged as read only. It is fairly safe to assume that those not so marked, ie HeaderValue are not read only. The quantity of read only items is in all less than 5% I'd reckon at a guess.

To be honest, I am unsure how it could be less ambiguous. But you are correct, this is no big deal.

Please share your DomainKeys script when you get it going. There is the occasional request for DomainKeys, it would be nice to point to something that works as a starting point.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

jp_reed
New user
New user
Posts: 10
Joined: 2009-02-03 20:36

Re: DomainKey script

Post by jp_reed » 2010-01-16 21:45

I am working on the domainkey script. Is the RSA encryption routine that does the DKIM encryption available anywhere within the COM API? As far as I can tell, the encryption for DKIM is the exact same as DomainKeys.

Thanks!

Post Reply