Skip to content

📧 Parse SPF (sender policy framework) records

License

Notifications You must be signed in to change notification settings

softvu/spf-parse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spf-parse Build Status Coverage Status Dependency Status XO code style

Parse SPF records into their constituent parts. Note that this module does no network lookups. It only validates and parses SPF syntax.

Install

npm install --save spf-parse

Usage

const spf = require('spf-parse');

let records = spf('v=spf1 include:some.sender.org -all');

// {
//    mechanisms: [
//       {
//          prefix: 'v',
//          type: 'version',
//          description: 'The SPF record version',
//          value: 'spf1'
//       },
//       {
//          prefix: '+',
//          prefixdesc: 'Pass',
//          type: 'include',
//          description: 'The specified domain is searched for an \'allow\'',
//          value: 'some.sender.org'
//       },
//       {
//          prefix: '-',
//          prefixdesc: 'Fail',
//          type: 'all',
//          description: 'Always matches. It goes at the end of your record'
//       }
//    ]
// }

License

MIT © SoftVu

About

📧 Parse SPF (sender policy framework) records

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published