Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbled headers after remove-headers action #86

Open
dezifit opened this issue Nov 25, 2020 · 3 comments
Open

Garbled headers after remove-headers action #86

dezifit opened this issue Nov 25, 2020 · 3 comments

Comments

@dezifit
Copy link

dezifit commented Nov 25, 2020

Using the remove-headers function leaves all multi line headers unwrapped. This affects the received lines and some other headers, which now are all written in a single line.

I'm trying to strip some X-MS-* headers (partly multi line also) before writing mails in mbox format. It seems that deliver-remove-header fails to restore the wrapping, possibly as a result of wrong offset calculation.

@nicm
Copy link
Owner

nicm commented Nov 26, 2020

Am I meant to use my ESP powers to work out your fdm version and see your config and -vv output?

@dezifit
Copy link
Author

dezifit commented Nov 26, 2020

It's the latest released version 2.0 (from VOID linux), see attached files. I also tested with sources compiled from git-master: same issue.
header-removal-test.zip

@dezifit
Copy link
Author

dezifit commented Nov 26, 2020

After some more tests and reading the code I'm sure that the issue is caused by calling set_wrapped inside the loop of headers to remove. The first call of set_wrapped works as expected, while the 2nd fails to find any multi-line headers (as they are already wrapped) - the wrap position array is empty now, which suppresses the final unwrap step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants