Metadata-Version: 2.3
Name: dmarc-report
Version: 1.0.2
Summary: Displays a nicely formatted report in your terminal from a DMARC XML report.
Project-URL: Homepage, https://github.com/stuartmaxwell/dmarc-report
Project-URL: Repository, https://github.com/stuartmaxwell/dmarc-report
Project-URL: Issues, https://github.com/stuartmaxwell/dmarc-report/issues
Author-email: Stuart Maxwell <stuart@amanzi.nz>
License: MIT License
        
        Copyright (c) 2024 Stuart Maxwell
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Keywords: dkim,dmarc,dmarc-report,dmarc-xml,email,security,spf
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Requires-Dist: defusedxml>=0.7.1
Requires-Dist: rich>=13.9.4
Provides-Extra: test
Requires-Dist: nox>=2024.10.9; extra == 'test'
Requires-Dist: pytest>=8.3.4; extra == 'test'
Description-Content-Type: text/markdown

# 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`.

```bash
# With uv:
uv tool install dmarc-report

# Or with pipx:

pipx install dmarc-report
```

You can also run the tool without installing it:

```bash
# 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`

```bash
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:

```text
╭──────────────────────────────────── DMARC Report for example.com ─────────────────────────────────────╮
│                                                                                                       │
│ Domain: example.com                                                                                   │
│ Report Period: 2020-01-01 00:00:00 UTC to 2020-01-01 23:59:59 UTC                                     │
│                                                                                                       │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯
   Summary Statistics
╭────────────────┬──────╮
│ Total Messages │ 2    │
│ Unique Sources │ 1    │
│ DKIM Pass Rate │ 0.0% │
│ SPF Pass Rate  │ 0.0% │
╰────────────────┴──────╯
                           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 │
╰────────────────────┴────────────────────────────────────────────────────╯

       DMARC Policy Details
╭──────────────────┬─────────────╮
│ Domain           │ example.com │
│ DKIM Alignment   │ r           │
│ SPF Alignment    │ r           │
│ Policy           │ quarantine  │
│ Subdomain Policy │ reject      │
│ Percent          │ 100         │
╰──────────────────┴─────────────╯

                                      Message Records
╭─────────────┬───────┬─────────────┬──────┬──────┬─────────────┬──────────────────────────╮
│ Source IP   │ Count │ Disposition │ DKIM │ SPF  │ Header From │ Auth Results             │
├─────────────┼───────┼─────────────┼──────┼──────┼─────────────┼──────────────────────────┤
│ 203.0.113.1 │ 2     │ none        │ pass │ pass │             │ dkim: example.com (pass) │
│             │       │             │      │      │             │ spf: example.com (pass)  │
╰─────────────┴───────┴─────────────┴──────┴──────┴─────────────┴──────────────────────────╯

 🚀 End of report
─────────────────────────────────────────────────────────────────────────────────────────────────────────
```
