Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barnabyshearer/email-report-checker
RFC 7489 & 8460 SMTP Report Monitoring Utilities.
https://github.com/barnabyshearer/email-report-checker
dmarc email smtp tls
Last synced: about 5 hours ago
JSON representation
RFC 7489 & 8460 SMTP Report Monitoring Utilities.
- Host: GitHub
- URL: https://github.com/barnabyshearer/email-report-checker
- Owner: BarnabyShearer
- License: bsd-3-clause
- Created: 2020-05-29T14:35:55.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-08T00:13:50.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T06:15:48.202Z (26 days ago)
- Topics: dmarc, email, smtp, tls
- Language: Python
- Homepage: https://email-report-checker.readthedocs.io/en/latest/
- Size: 32.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
..
Autogenerated by https://github.com/BarnabyShearer/meta====================
email-report-checker
====================
.. image:: https://readthedocs.org/projects/email-report-checker/badge/?version=latest
:target: https://email-report-checker.readthedocs.io/en/latest/
.. image:: https://img.shields.io/pypi/v/email-report-checker?color=success
:target: https://pypi.org/project/email-report-checkerRFC 7489 & 8460 SMTP Report Monitoring Utilities.
Install
-------.. code-block:: bash
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:[email protected]; rua=mailto:[email protected]; adkim=s; aspf=s"
Then load the reports via IMAP:
.. code-block:: bash
dmarc-report-checker m.zi.is [email protected] Archive > dmarc.json
And report your statistics
.. code-block:: bash
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.jsonRFC 8460 SMTP TLS Reporting
---------------------------First create a DNS TXT record to request reports:
::
_smtp._tls.zi.is. 3600 IN TXT "v=TLSRPTv1;rua=mailto:[email protected]"
Then load the reports via IMAP:
.. code-block:: bash
tls-report-cheker m.zi.is [email protected] Archive > tls.json
And report your statistics
.. code-block:: bash
jq '[.[] | [.policies[].summary["total-successful-session-count"]] | add] | add' tls.json
jq '[.[] | [.policies[].summary["total-failure-session-count"]] | add] | add' tls.json