Giter Club home page Giter Club logo

dmarc-report's Introduction

DMARC report CLI (pretty print DMARC reports)

This is a command-line tool to parse DMARC aggregate reports and output the results in an easy to read manner.

This tools does not download the DMARC reports from a mailbox, but consumes the previously downloaded reports from a local directory. This tool does not connect to the Internet.

Given a directory, it will parse all reports for a given domain (from .xml, .xml.gz, .zip files) and output a simplified DMARC report summary.

For example:

$ dmarc-report ~/Downloads example.com

DKIM report for domain: example.com

Reporter: google.com
Begin                   End                     Policy: DKIM    SPF     Auth:   DKIM    SPF
2023-09-22 02:00:00     2023-09-24 01:59:59             pass    pass            pass    pass
2023-10-06 02:00:00     2023-10-07 01:59:59             pass    pass            pass    pass
2023-10-29 02:00:00     2023-10-30 00:59:59             pass    pass            pass    pass
2023-11-13 01:00:00     2023-11-14 00:59:59             pass    pass            pass    pass
2023-12-04 01:00:00     2023-12-05 00:59:59             FAIL    pass            FAIL    pass
2023-12-07 01:00:00     2023-12-08 00:59:59             pass    pass            pass    pass

Reporter: Outlook.com
Begin                   End                     Policy: DKIM    SPF     Auth:   DKIM    SPF
2023-09-28 02:00:00     2023-09-29 02:00:00             pass    pass            pass    pass
2023-10-03 02:00:00     2023-10-04 02:00:00             pass    pass            pass    pass
2023-10-06 02:00:00     2023-10-07 02:00:00             pass    pass            pass    pass
2023-11-12 01:00:00     2023-11-14 01:00:00             pass    pass            pass    pass
2023-12-07 01:00:00     2023-12-08 01:00:00             pass    pass            pass    pass

Installation

go install github.com/candidtim/[email protected]

Usage

Usage (show with dmarc-report -h):

dmarc-report [OPTIONS] DIRECTORY DOMAIN

Options:
  -c    Show color output (default true)
  -f    Show only the failures

Example:

dmarc-report ~/Downloads example.com

Latter will look for all files matching the DMARC report file name format (receiver "!" policy-domain "!" begin-timestamp "!" end-timestamp "." extension), decompress .gz and .zip files if necessary, and output an aggregated summary.

Features and limitations

  • Parses DMARC aggregate reports only (what is normally received by email when DMARC is set up for a domain)
  • Ignores duplicate reports (if there are multiple copies of the same report in the same directory; typically the case if some reports were extracted manually after they have been downloaded)
  • Merges subsequent reports (where the start time of a subsequent report is the same as the end time of a previous one)
  • Tested on most popular DMARC reports (Google, Outlook). Not extensively tested in various complex scenarios.

Note that this tool is originally implemented for individuals who own their domains, set up DMARC, and want to review the reports regularly. Some more complex scenarios may not be supported. However, feel free to submit issues, propose features, or better yet - pull requests.

dmarc-report's People

Contributors

candidtim avatar

Watchers

 avatar  avatar

Forkers

tomasgvivo

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.