sddm
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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();

Readme

Keywords

Package Sidebar

Install

npm i sddm

Weekly Downloads

23

Version

1.0.3

License

MIT

Unpacked Size

17.5 kB

Total Files

14

Last publish

Collaborators

  • mitrajit