Fix handling of 'Auto-Submitted' mail header when set to no #408
Fix handling of 'Auto-Submitted' mail header when set to no #408danpoltawski wants to merge 2 commits intobestpractical:stablefrom
Conversation
Previously if the 'Auto-Submitted' mail header was set the email was always assumed to be auto-generated, even if the header was set with the 'no' value. This fix makes the line after check that no case proprely
|
Not sure what I need to do to try and get bugs fixed in RT 😭 |
Hi Dan, you're doing the right thing and we do see your PR. We're just very busy right now with other things and haven't had time to review it. I'm assuming you have patched locally, so at least you have your immediate problem solved in your system. Thanks for the PR, and we'll get to it when we get some time! |
Looking at the existing code and the fix, it seems like the bug is that the "no" value returned from MIME::Head has a newline. The docs have a note that returned header values may have a newline, in the "get" section: https://metacpan.org/pod/MIME::Head#Getting%2Fsetting-fields . So I think just the "chomp" fixes the issue. I tried that and it passes the new tests. Are you able to try that with an email from the other ticketing system where you saw the issue? |
When the
Auto-Submittedmail header is set, it is always interpreted as the mail being auto-generated. This was causing us issues with another ticketing system mailing into RT and setting the header asAuto-Submitted: noand RT treating it as an autogeneratedThe code is clearly trying to respect this
novalue but the implementation is broken. I've added some unit test cases to demonstrate the issue.Note that I'm not much of a Perl guru so there may be a more perl-y way to do the fix.