Re: [EXIM] The Body Vanishes (or: a nasty gotcha with use_cr…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Malcolm Beattie
Datum:  
To: Philip Hazel
CC: exim-users
Betreff: Re: [EXIM] The Body Vanishes (or: a nasty gotcha with use_crlf and prefix)
Philip Hazel writes:
> On Fri, 18 Sep 1998, Malcolm Beattie wrote:
>
> > I finally discovered the "prefix = " option of Exim which has a
> > default of "From ...\n". Note the hard-coded "\n" terminator,
> > unaffected by the use_crlf option.
>
> The terminator was put in the (configurable) string by design, so that
> the whole thing was under the administrator's control. This was an
> attempt at being as flexible as possible, and indeed is necessary so
> that you can set the string to "" - that is, have no prefix at all.


If my mail seemed to heap any blame on exim, I apologise. This was
just one of those "FYI" messages about a problem with an odd symptom
that was hard to track down and that I wouldn't wish anyone else to
have to debug from scratch. Exim was working as designed--no problem.

> Needless to say, I didn't forsee this kind of problem - and use_crlf was
> implemented quite a long time afterwards.
>
> > So tmail was seeing the "From "
> > line first, seeing the \n-only terminator and deciding to prepend
> > \r to the \n terminator on all subsequent lines.
>
> Dare I suggest that a more robust coding would check each line
> independently?


To be fair to Mark: tmail documents that it only supports \r\n
termination and that it attempts to deal with \n termination only
under protest (and logs to stderr when it does so). That's why I
turned on use_crlf when I found it--so that I would be using tmail
"properly".

> I will certainly update the documentation of use_crlf to point out the
> problem. And add something to the FAQ.


I had almost wondered whether it was worth having an Exim variable
${transport_line_terminator} (only with a better name--I'm no good at
thinking up names) which was \n if use_crlf was false ad \r\n if it
was true. Then "prefix" could default to
    "From ... ${transport_line_terminator}"
However, it's maybe a bit too heavy handed adding that for what is
probably a rarely-used and esoteric part of exim configuration.


--Malcolm

--
Malcolm Beattie <mbeattie@???>
Unix Systems Programmer
Oxford University Computing Services

--
*** Exim information can be found at http://www.exim.org/ ***