Exim bugzilla – Bug 385
Cannot add Content-Transfer-Encoding header with extra_headers statement
Last modified: 2010-06-05 16:29:17
You need to log in before you can comment on or make changes to this bug.
Hi, In a personal filter, I have a mail statement with an extra_headers option allowing the use of German Umlauts: extra_headers "Mime-Version: 1.0\nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" This is rejected with the error message: Filter error: \n not followed by space or valid header name in "Mime-Version: 1.0\nContent-Type: text/plain; charset=iso-8859-1\nContent-Transfer-Encoding: 8bit" in mail command When I change Content-Transfer-Encoding to Content-TransferEncoding, omitting the second dash, debugging shows that these headers would indeed be added. This looks to me like exim doesn't consider a Header name with two dashes valid. Am I doing something wrong? Greetings Marc
Fascinating. I can reproduce it, but there's no clue in the code as to why it would happen. The code doesn't handle hyphens specially; it just checks that if a line doesn't begin with whitespace, there's at least one character and no whitespace before the colon. It's around lines 2060 through 2200 in filter.c. And the string is written to the log exactly as that piece of code sees it, except that non-printing characters are escaped. Changing "Content-Transfer-Encoding" to "Content-Transfer-Encodin" also works, but just deleting the Content-Type field doesn't. WTF?
Oh, and *adding* a character also makes it go through, but not changing one or more. So apparently it only fails with field names with exactly 25 characters.