Skip to content

Repository files navigation

DMARC Report Tool

Displays a nicely formatted report in your terminal from a DMARC XML report.

Installation

This works best when installed with uv tool or pipx.

# With uv:
uv tool install dmarc-report

# Or with pipx:

pipx install dmarc-report

You can also run the tool without installing it:

# With uvx:
uvx dmarc-report long-dmarc-report-filename.xml

Usage

Run the dmarc-report command-line utility followed by a DMARC report file. The DMARC report can have one of the following file extensions:

  • .xml.gz
  • .zip
  • .xml
dmarc-report long-dmarc-report-filename.xml.gz
# or
dmarc-report long-dmarc-report-filename.xml
# or
dmarc-report long-dmarc-report-filename.zip

Note: if using a zip file, it will only parse the first xml file found in the zip file.

You'll see a nicely formatted report in your terminal:

╭────────────────────────── DMARC Report for example.com ──────────────────────────╮
│                               DMARC Policy Details                               │
│ ╭───────────────────────┬──────────────────────────────────────────────────────╮ │
│ │ Domain:               │ example.com                                          │ │
│ │ DKIM Alignment:       │ r                                                    │ │
│ │ SPF Alignment:        │ r                                                    │ │
│ │ Policy:               │ quarantine                                           │ │
│ │ Subdomain Policy:     │ quarantine                                           │ │
│ │ Percent:              │ 100%                                                 │ │
│ ╰───────────────────────┴──────────────────────────────────────────────────────╯ │
│                              DMARC Report Metadata                               │
│ ╭───────────────────────┬──────────────────────────────────────────────────────╮ │
│ │ Org name:             │ Google, Inc.                                         │ │
│ │ Email:                │ noreply-dmarc-support@google.com                     │ │
│ │ Extra contact info:   │ https://support.google.com/a/answer/2466580          │ │
│ │ Report ID:            │ 1234567890                                           │ │
│ │ Date range:           │ 2020-01-01 00:00:00 UTC to 2020-01-01 23:59:59 UTC   │ │
│ ╰───────────────────────┴──────────────────────────────────────────────────────╯ │
│                                     Summary                                      │
│ ╭───────────────────────┬──────────────────────────────────────────────────────╮ │
│ │ Total Messages:       │ 2                                                    │ │
│ │ Unique Sources:       │ 1                                                    │ │
│ │ DMARC Pass Rate:      │ 100.0%                                               │ │
│ │ DKIM Alignment:       │ 100.0%                                               │ │
│ │ SPF Alignment:        │ 100.0%                                               │ │
│ ╰───────────────────────┴──────────────────────────────────────────────────────╯ │
│                                 Message Records                                  │
│ ╭─────────────┬───────┬──────────────┬─────────────┬───────────────────────────╮ │
│ │ Source IP   │ Count │ DKIM Aligned │ SPF Aligned │ Authentication Results    │ │
│ ├─────────────┼───────┼──────────────┼─────────────┼───────────────────────────┤ │
│ │ 123.0.456.1 │ 2     │ pass         │ pass        │ dkim: example.com (pass)  │ │
│ │             │       │              │             │ spf: example.com (pass)   │ │
│ ╰─────────────┴───────┴──────────────┴─────────────┴───────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────╯

About

Displays a nicely formatted report in your terminal from a DMARC XML report.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages