[Exim] CRLF input through pipe causes mangled headers

Top Page
Delete this message
Reply to this message
Author: Barry Pederson
Date:  
To: exim-users
Subject: [Exim] CRLF input through pipe causes mangled headers
I was trying to use Exim with Cyrus IMAP 2.1.14, and found that messages
generated by Cyrus' sieve filters, for vacations, forwards, and such - were
getting mangled by Exim 4.20. Exim adds an extra blank line after the first
header line - which makes the rest of the headers end up being part of the
message body.

You can reproduce this, without having to have Cyrus-IMAP, but making a
simple file, named "test.msg" for example, that has CRLF line endings - such as:

--------
x-foo: bar
Subject: test

This is a test
---------

Send it to yourself using Exim with something like:

    exim -i -f "<>" -- my@??? <test.msg


and you'll see the extra blank line after "x-foo: bar", and the remaining
headers now treated as body.

This doesn't happen if the file has plain unix-style LF endings, and the CRLF
line-endings don't seem to bother genuine Sendmail (whatever version FreeBSD
4.8 uses).

I wonder if this has to do with the bit mentioned in the docs for the "-bm"
option where messages may, for compatibility with Sendmail and Smail, have
things like:


From sender Fri Jan 5 12:55 GMT 1997
From sender Fri, 5 Jan 97 12:55:01

as their first line. Could it be processing that first line specially, and
mishandling the "\r\n" at the end.

    Barry