First Last Prev Next    No search results available
Details
: Cannot add Content-Transfer-Encoding header with extra_he...
Bug#: 385
: Exim
: Filters
Status: RESOLVED
Resolution: FIXED
: All
: Linux
: 4.62
: medium
: bug
: Exim 4.73

:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Marc Haber <mh+exim-bugzilla@zugschlus.de>
Assigned To: Philip Hazel <ph10@hermes.cam.ac.uk>
: Exim developer list <exim-dev@exim.org>

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions
Votes: 0


Description:   Opened: 2006-08-20 00:07
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
------- Comment #1 From Magnus Holmgren 2006-08-20 23:02:51 -------
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?
------- Comment #2 From Magnus Holmgren 2006-08-20 23:13:19 -------
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.

First Last Prev Next    No search results available