Re: [Exim] newlines in $message_body

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Philip Hazel
Data:  
Para: jpmg
CC: exim-users
Assunto: Re: [Exim] newlines in $message_body
On Mon, 22 Apr 2002 jpmg@??? wrote:

> I'm sure I'm missing something obvious, but is there a good reason why
> newlines get mapped to ' ' within $message_body ? I can see why the
> remapping of nulls happens, but ...


The original motivation was so that people could search for phrases
without having to worry about whether there was a linebreak in the
phrase or not. Things like

if $message_body contains "the quick brown fox jumps over the lazy dog"

This was in the very early days. Probably before I wrote PCRE and
understood as much about regular expressions as I do now. (Though not
everybody is clued up on regular expressions, of course.) And also
before I was paying much attention to attachments.

> As this behaviour makes certain filtering operations impossible, I was
> wondering if the (comparatively easy to implement) addition of another
> variable available to filters called $message_body_with_newlines would
> be a plausible thing to do?


It would probably be simpler (to explain and to implement) to have a
option called dont_turn_newlines_into_spaces_in_message_body (but I'd
try to find a shorter name).

Are there any other views on this?


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.