qmail-inject: fix header parse regression #229
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When attempting to catch incorrectly formatted headers like "To: foo: bar, baz" to avoid errors when injecting bounces the host expansion of headers like "To: root" was also broken.
Instead of completely ignoring these lines when the recipient list was already given on the command line using -a option try to process these lines as before, but allow the parsing of these lines to silently fail. If a broken line is encountered this now simply does not reformat them to insert the hostname.
Bug introduced in commit 56e7c4a in 1.08.
Fixes: #147
As I already said in that bug: I think we should just merge this without the tests so we can get a 1.09 out of the door. This fixes the regression, and when comparing the code before the breaking commit and this branch you see that it now only adds the "ignore errors" flag and routes the
doordie()calls through a little helper that checks that flag. @schmonz verified that his usecase with the installed version now works.