1.0.3 • Published 5 months ago

sddm v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

SDDM

This is a package to check the SPF, DKIM, DMARC and MX records by DNS Lookup.

Usage

npm install sddm
import { checkDkim, checkSpf, checkDmarc, checkMx } from "sddm";

async function main() {
    const dkim = await checkDkim("reachinbox.ai");
    const spf = await checkSpf("reachinbox.ai");
    const dmarc = await checkDmarc("reachinbox.ai");
    const mx = await checkMx("reachinbox.ai");

    console.log(dkim);
    /**
     * {
     * isValid: true,
     * reason: 'DKIM records found',
     * dkimSelectors: [ 'google' ]
     * }
     */
    console.log(spf);
    /**
     * {
     * isValid: true,
     * reason: 'Valid SPF record',
     * spf: 'v=spf1 include:_spf.google.com ~all'
     * }
     */
    console.log(dmarc);
    /**
     * {
     * isValid: false,
     * reason: 'Multiple DMARC records found'
     * }
     */
    console.log(mx);
    /**
     * {
     *  isValid: true,
     *  reason: 'All MX records are valid',
     *  mx: [
     *    { preference: 1, exchange: 'smtp.google.com' }
     *  ]
     * }
     */
}

main();
1.0.3

5 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago