Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for MTA-STS reports #43

Open
kimdre opened this issue Oct 8, 2023 · 4 comments
Open

Support for MTA-STS reports #43

kimdre opened this issue Oct 8, 2023 · 4 comments

Comments

@kimdre
Copy link
Contributor

kimdre commented Oct 8, 2023

For some time now, part of the reports I receive regularly are SMTP-TLS (MTA-STS) reports in JSON format (generally from google.com). Would it be possible to add support for this report format?

{
   "organization-name":"Google Inc.",
   "date-range":{
      "start-datetime":"2023-10-06T00:00:00Z",
      "end-datetime":"2023-10-06T23:59:59Z"
   },
   "contact-info":"smtp-tls-reporting@google.com",
   "report-id":"2023-10-06T00:00:00Z_mydomain.com",
   "policies":[
      {
         "policy":{
            "policy-type":"sts",
            "policy-string":[
               "version: STSv1",
               "mode: enforce",
               "max_age: 259200",
               "mx: mail.mydomain.com",
               "mx: *.mydomain.com"
            ],
            "policy-domain":"mydomain.com",
            "mx-host":[
               "mail.mydomain.com",
               "*.mydomain.com"
            ]
         },
         "summary":{
            "total-successful-session-count":4,
            "total-failure-session-count":0
         }
      }
   ]
}
@kimdre kimdre changed the title Support for json reports Support for MTA-STS reports Oct 8, 2023
@vipergts450
Copy link

vipergts450 commented Oct 11, 2023

This additional feature would be great and I was coming here to make the same request. This is a great little project and a small enhancement like adding MTA-STS support would be handy.

@gutmensch
Copy link
Owner

Good input, thanks for reporting! "Unfortunately" the code for the parser is just taken from another source https://github.com/techsneeze/dmarcts-report-parser/blob/master/dmarcts-report-parser.pl - a perl script, which is potentially cumbersome to enhance with more functionality, but not impossible. At the moment it would be best to request the feature there and/or contribute via PR.

@gdnmhr
Copy link

gdnmhr commented Jan 17, 2024

Seems like there is already a working script, these two PRs just have not been merged yet: techsneeze/dmarcts-report-parser#65 (comment)

@gutmensch
Copy link
Owner

@kimdre @gdnmhr Thanks again for the pointers! I started rewriting the parser to a more extensible golang application. I think I can add support for RFC8640 and RFC8641 related reports to this. For the unit tests I'd appreciate any possible anonymized reports/payloads (like the one from the original post here) from different sender organizations if you have any as I currently don't have it enabled myself. Also if the data was sent with mime type json or compressed, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants