Subject: | Missing <> on email address in bounce |
We've started seeing errors like this:
Use of uninitialized value $email in hash element at /usr/share/perl5/Mail/DeliveryStatus/BounceParser.pm line 1331.
Use of uninitialized value $email in hash element at /usr/share/perl5/Mail/DeliveryStatus/BounceParser.pm line 1332.
I believe this is because the code is failing to parse the email address, and thus throwing an undef warning.
I added the code to github & created a branch with a failing test & a patch that fixes this error.
# 1.534
https://github.com/minty/Mail-DeliveryStatus-BounceParser
# Test & Patch
https://github.com/minty/Mail-DeliveryStatus-BounceParser/tree/addy
You can see the details here:
https://github.com/minty/Mail-DeliveryStatus-BounceParser/compare/addy
If you'd prefer the patch in another format, please let me know.
ps. The bug will persist if for any message it cannot set $email correctly. I think setting $email = '' would silence the warning, but I'm not clear if this is a wise patch or not.