Git Product home page Git Product logo

email-security-research's Introduction

email-security-research

Are you curious about SPF and DMARC record usage? I was too. So I wrote this small script to run through and look for the SPF and DMARC records for given domains. A large dataset was needed, so I decided to use the Quantcast top million sites. Granted some of the domain names are hidden, and some are not top level sites, so we don't get a million rows of data back. However we do get more than enough.

How to use it

  • run $ ./getdata.sh to fetch and unzip the data
  • run $ php check-domain-dns.php to crawl the domains
  • Look in /results/ for the resulting CSV file

By default, the PHP script only checks the "Top 50" domains. To do the whole shebang, un-comment the #$infile = "Quantcast-Top-Million.txt"; line. Speed of results will depend on your internet connection and DNS resolver. My initial test took 8 hours.

Why no DKIM?

DMARC records are always located at _dmarc.domain.tld per RFC. SPF records are always stored in a root level TXT record. However DKIM records can be stored under any name, as long as it matches what the sending mail server uses. Since we could only guess, our data there would be wildly inaccurate at best, and completely blank at worst.

License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.