Skip to content

enbits/nodejs-dkim-dns-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS DKIM DNS Validator

A simple DKIM DNS validator for NodeJS.

Usage:

Using index.js from node console:

node index.js {selector} {domain}

Use the function directly in your own code:

var dns = require('dns');
var dkimValidator = require('./dkimValidator');

//build host based on selector and domain
var selector = 'selector';
var domain = 'example.com';
var host = selector + '._domainkey.' + domain;

dns.resolveTxt(host, function(err, response) {

  if (err) {
    //do something
    return;
  }

  var result = dkimValidator.validate(response);
  console.log(result);
});

This is a work in progress. Issue reporting, pull requests and feedback is much appreciated.

About

A simple dkim dns validator for nodejs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published