Skip to main content

RFC 7489 & 8460 SMTP Report Monitoring Utilities.

Project description

https://readthedocs.org/projects/email-report-checker/badge/?version=latest https://img.shields.io/pypi/v/email-report-checker?color=success

RFC 7489 & 8460 SMTP Report Monitoring Utilities.

Install

python3 -m pip install email-report-checker

Note these are for my hobby domain, do not try running them on even moderate traffic MTAs

RFC 7489 Domain-based Message Authentication, Reporting, and Conformance (DMARC)

First ensure your DMARC DNS TXT record contains rua and ruf to request reports:

_dmarc.zi.is. 3600 IN TXT “v=DMARC1; p=reject; pct=100; ruf=mailto:b+dmarc@zi.is; rua=mailto:b+dmarc@zi.is; adkim=s; aspf=s”

Then load the reports via IMAP:

dmarc-report-checker m.zi.is b@zi.is Archive > dmarc.json

And report your statistics

jq '[ .[].record.row | select(.source_ip == "68.183.35.248") | select(.policy_evaluated.dkim == "pass") | .count | tonumber] | add' dmarc.json
jq '[ .[].record.row | select(.source_ip == "68.183.35.248") | select(.policy_evaluated.dkim == "fail") | .count | tonumber] | add' dmarc.json

RFC 8460 SMTP TLS Reporting

First create a DNS TXT record to request reports:

_smtp._tls.zi.is.   3600    IN      TXT     "v=TLSRPTv1;rua=mailto:b+tls@zi.is"

Then load the reports via IMAP:

tls-report-cheker m.zi.is b@zi.is Archive > tls.json

And report your statistics

jq '[.[] | [.policies[].summary["total-successful-session-count"]] | add] | add' tls.json
jq '[.[] | [.policies[].summary["total-failure-session-count"]] | add] | add' tls.json

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

email-report-checker-0.0.1.tar.gz (8.7 kB view hashes)

Uploaded source

Built Distribution

email_report_checker-0.0.1-py2.py3-none-any.whl (6.1 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page