[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]lib/2023-06-15 18:19 -  
[TXT]README.md2016-03-02 16:09 712 d7c1522 post receive test [كارل مبارك]
[   ]package.json2023-06-15 18:21 1.4K 
# DKIM Signer

Sign RFC822 messages with DKIM. This module is extracted from [mailcomposer](https://github.com/andris9/mailcomposer).

## Usage

```javascript
// 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**