dmarc-solution
One stop solution for all DMARC Problems. This package includes fetching of dmarc record, parsing the provided/fetched record, validation of DMARC record, generating a new DMARC record
Install
npm install --save dmarc-solution
Usage
DMARC Generator
const dmarc = require('dmarc-solution');
var generateInputs = {
v: 'DMARC1',
p: 'quarantine',
rua: ['dmarc@example.com'],
ruf: ['dmarc@example.com'],
fo: ['0', '1', 'd'],
pct: 75,
rf: 'afrf',
ri: 1,
sp: 'none',
aspf: 'r',
adkim: 's',
}
dmarc.generate(generateInputs)
.then(record => {
console.log(record);
})
.catch(err => {
console.log(err);
});
DMARC Fetcher
const dmarc = require('dmarc-solution');
dmarc.fetch('github.com')
.then(record => {
console.log(record);
})
.catch(err => {
console.log(err);
});
DMARC Parser
const dmarc = require('dmarc-solution');
dmarc.parse('v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com;')
.then(record => {
console.log(record);
})
.catch(err => {
console.log(err);
});