rjbs/mail-deliverystatus-bounceparser — pull request #2 by brablc (2011-12-13 00:29:40+00:00)
Title: My attempt to improve status code parsing

I have a lot of emails like this:

Final-Recipient: rfc822; xxx@example.com
Original-Recipient: rfc822;xxx@example.com
Action: failed
Status: 5.2.2
Diagnostic-Code: X-Postfix; Mailbox is full

The parser did not return any smtp_code and did not return any std_reason. There were two reasons as far as I can see it:

1) Usage of Mail::Header instead of Mail::DeliveryStatus::Report - the status code was not stripped and it was not possible to compare.
2) If no diagnostic code could be found, Status is not used as fallback.

I made some changes to make it pass, but I'm not sure about the various-unknown.t.