[Exim] (PATCH) CRLF input through pipe causes mangled header…

Góra strony
Delete this message
Reply to this message
Autor: barryp
Data:  
Dla: exim-users
Stare tematy: Re: [Exim] CRLF input through pipe causes mangled headers
Temat: [Exim] (PATCH) CRLF input through pipe causes mangled headers
This message is in MIME format.
--
Quoting barryp@???:

> From what I can tell, the write_chunk() function in transport.c is where the
> extra CRs come from. If it was made just a little smarter about when it
> adds
> CRs, Exim could handle other kinds of input more gracefully.


I'm attaching a patch that I believe does the trick. Instead of just blindly
adding a '\r' whenever a '\n' is encountered, this will have Exim check that the
previous character it processed wasn't already a '\r'.

It's complicated by how Exim breaks messages down into chunks and has to watch
for things that need escaping, but I think I followed how that all works.

    Barry
--
[ patch-src_transport.c of type application/octet-stream deleted ]
--