dkim-signer
DKIM signing code extracted from mailcomposer
Last updated 9 years ago by andris .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install dkim-signer 
SYNC missed versions from official npm registry.

DKIM Signer

Sign RFC822 messages with DKIM. This module is extracted from mailcomposer.

Usage

// require signer function
var DKIMSign = require("dkim-signer").DKIMSign;

// generate a RFC822 message
var rfc822message = "Subject: test\r\n\r\nHello world";

// setup DKIM options
var dkimOptions = {
    domainName: "müriaad-polüteism.info",
    keySelector: "dkim",
    privateKey: require("fs").readFileSync("./test_private.pem")
};

// generate signature header field
var signature = DKIMSign(rfc822message, dkimOptions);

// join signature header field with the message
console.log(signature + "\r\n" + rfc822message);

License

MIT

Current Tags

  • 0.2.2                                ...           latest (9 years ago)

6 Versions

  • 0.2.2                                ...           9 years ago
  • 0.2.1                                ...           9 years ago
  • 0.2.0                                ...           10 years ago
  • 0.1.2                                ...           11 years ago
  • 0.1.1                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE