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

Parser deduplicates reports by Report-ID only, but should consider the reporter, too #112

Closed
mwander opened this issue Mar 6, 2023 · 0 comments · Fixed by #113
Closed

Comments

@mwander
Copy link
Contributor

mwander commented Mar 6, 2023

dmarcts has the useful feature to overwrite or ignore duplicate reports. It identifies duplicate reports via Report-ID:

    # see if already stored
    my $sth = $dbh->prepare(qq{SELECT org, serial FROM report WHERE reportid=?});
    $sth->execute($id);

However, different reporters might use the same Report-ID. I have observed this in the wild with IDs in the form of "reportdomain.starttime.endtime".

To ensure uniqueness, the deduplication should also consider the Reporter Orgname. An alternative to org_name from the XML is the Submitter-Domain from the subject. Either of them is fine.
Better yet, deduplicate over the following three fields: Report-ID, Reporter Orgname (or Submitter-Domain), and Report-Domain.

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