No description
Find a file
Heiko Schlittermann (HS12-RIPE) 8599f5ee08
Merge branch 'split-mbox'
* split-mbox:
  add: missing (previously symlinked) files
  chg: outsource the mbox package to go.schlittermann.de/heiko/mbox
  chg: split mbox into mbox and xml package
2024-02-21 21:59:05 +01:00
internal chg: outsource the mbox package to go.schlittermann.de/heiko/mbox 2024-02-21 21:55:37 +01:00
templates src: flatten structure 2023-12-16 14:54:32 +01:00
testdata add: missing (previously symlinked) files 2024-02-21 21:58:41 +01:00
.gitignore lint: use wsl 2023-12-16 18:21:38 +01:00
.golangci.yaml lint: use wsl 2023-12-16 18:21:38 +01:00
foldmeta.go lint: use wsl 2023-12-16 18:21:38 +01:00
go.mod chg: outsource the mbox package to go.schlittermann.de/heiko/mbox 2024-02-21 21:55:37 +01:00
go.sum chg: outsource the mbox package to go.schlittermann.de/heiko/mbox 2024-02-21 21:55:37 +01:00
jobs.go chg: outsource the mbox package to go.schlittermann.de/heiko/mbox 2024-02-21 21:55:37 +01:00
main.go lint: use wsl 2023-12-16 18:21:38 +01:00
main_test.go chg: split mbox into mbox and xml package 2024-02-21 21:12:30 +01:00
Makefile disable CGO to create a true statically linked binary 2023-12-15 09:22:10 +01:00
readcloser.go src: flatten structure 2023-12-16 14:54:32 +01:00
README.md initial working commit 2023-06-09 09:00:38 +02:00

DMARC

This simple tool helps to decode and analyze DMARC reports on the command line. Its primary goal is not to replace other tools that create metrics for monitoring systems.

Usage

Dmarc accepts a list of files (.zip, .gz, .eml, .mbox) containing aggregated DMARC reports in XML format.

Structure of a DMARC report

This is the XML report converted into JSON:

{
    "XMLName": {
        "Space": "",
        "Local": "feedback"
    },
    "Metadata": {
        "OrgName": "MAILIN11.telekom.de",
        "Email": "MAILER-DAEMON@MAILIN11.telekom.de",
        "ExtraContactInfo": "",
        "ReportID": "99c3d5$fffc9ac=fbecf05f20c12bbf@MAILIN11.telekom.de",
        "DateRange": {
            "begin": "2023-06-04T00:00:03+02:00",
            "end": "2023-06-05T00:00:04+02:00"
        }
    },
    "PolicyPublished": {
        "Domain": "example.com",
        "ADKIM": "r",
        "ASPF": "r",
        "Policy": "none",
        "SPolicy": "",
        "Percentage": 100
    },
    "Records": [
        {
            "Row": {
                "SourceIP": "91.208.68.56",
                "Count": 11,
                "PolicyEvaluated": {
                    "Disposition": "none",
                    "DKIM": "pass",
                    "SPF": "fail"
                }
            },
            "Identifiers": {
                "HeaderFrom": "example.com"
            },
            "AuthResults": {
                "DKIM": {
                    "Domain": "example.com",
                    "Result": "pass",
                    "Selector": "smg20230530"
                },
                "SPF": {
                    "Domain": "lima.example.com",
                    "Result": "none",
                    "Scope": "helo"
                }
            }
        },
        {
            "Row": {
                "SourceIP": "91.208.68.57",
                "Count": 12,
                "PolicyEvaluated": {
                    "Disposition": "none",
                    "DKIM": "pass",
                    "SPF": "fail"
                }
            },
            "Identifiers": {
                "HeaderFrom": "example.com"
            },
            "AuthResults": {
                "DKIM": {
                    "Domain": "example.com",
                    "Result": "pass",
                    "Selector": "smg20230530"
                },
                "SPF": {
                    "Domain": "victor.example.com",
                    "Result": "none",
                    "Scope": "helo"
                }
            }
        }
    ]
}