node-opendkim
node.js native language binding to libopendkim
Install/Test Locally (from source)
git clone git@github.com:godsflaw/node-opendkim.git
cd node-opendkim
npm install
npm test -- --verbose
Install Locally (npm)
npm install --save node-opendkim
Install Globally (npm)
npm install --global node-opendkim
Compile (Development)
node-gyp rebuild
Usage
Verify (async/await)
const OpenDKIM = ; { var opendkim = ; try await opendkim; await opendkim; await opendkim; catch err console; console; }
Verify (sync)
const OpenDKIM = ; { var opendkim = ; try opendkim; opendkim; opendkim; catch err console; console; }
Verify (errback)
const OpenDKIM = ; { opendkim;} var opendkim = ; ;
API Administration
- OpenDKIM.new(): new instance of OpenDKIM object.
- opendkim.flush_cache(): Flush the key cache.
- opendkim.lib_feature(): Check for supported features.
API Processing
- opendkim.chunk(): Process a message chunk.
- opendkim.chunk_end(): called when done with chunk.
- opendkim.header(): Process a header.
- opendkim.eoh(): Identify end of headers.
- opendkim.body(): Process a body chunk.
- opendkim.eom(): Identify end of message.
API Signing
- opendkim.sign(): get ready to sign a message.
API Utility
- opendkim.query_info(): get/set query info.
- opendkim.query_method(): get/set query method.
- opendkim.tmpdir(): get/set tmp dir.
API Verifying
- opendkim.get_signature(): sets the signature info handle.
- opendkim.ohdrs(): Retrieve the original header set from the "z=" tag in a received signature if present.
- opendkim.sig_getcanonlen(): get the canonicalized message length from the signature handle and message.
- opendkim.sig_getdomain(): get the domain from the signature handle.
- opendkim.sig_geterror(): Retrieve the error code associated with a rejected/disqualified signature.
- opendkim.sig_geterrorstr(): get the error string specified by the error code.
- opendkim.sig_getidentity(): get the identity from the signature handle.
- opendkim.sig_getselector(): get the selector from the signature handle.
- opendkim.verify(): get ready to verify a message.
License
MIT © Christopher Mooney