Files
parsedmarc/parsedmarc
Sean WhalenandClaude Fable 5.2 bbd7b04417 Skip a message with an invalid report attachment instead of aborting the mbox (#955)
* Skip a message with an invalid report attachment instead of aborting the mbox

parse_report_email() raised a bare ParserError when a report attachment was
invalid, which get_dmarc_reports_from_mbox() re-raises, so one such message
ended the whole file. Raise InvalidDMARCReport (a ParserError subclass), which
the mbox loop skips with a warning.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Skip an invalid SMTP TLS attachment in an mbox too

Address the Copilot review of #955. An invalid SMTP TLS attachment raised
InvalidSMTPTLSReport, which is not an InvalidDMARCReport, so it still
stopped the mbox. parse_report_email() now names the message's subject in
that error, and both mbox loops skip it with a warning. A message that
cannot be parsed at all still raises a plain ParserError.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:09:45 -05:00
..
2026-10-31 17:14:00 -04:00
2026-11-09 14:10:30 -05:00
2026-10-30 20:50:01 -04:00
2026-11-09 14:10:30 -05:00
2026-10-31 17:14:00 -04:00