Re: [Exim] Multiline log_message (Exim 4.20, bug?)

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Lutz Pressler, Lutz Pressler
CC: exim-users
Betreff: Re: [Exim] Multiline log_message (Exim 4.20, bug?)
On Thu, 17 Jul 2003, Lutz Pressler wrote:

> If "log_message" is not present and there is no underlying error message
> (for example, from the failure of address verification), but "message" is
> present, the "message" text is used for logging rejections. However, if it
> contains newlines, only the first line of the text is logged. In the
> absence of both "log_message" and "message", a default built-in message is
> used.
>
> My interpretation is that "only the first line of the text is logged" is
> for message in contrast to log_message.


This is a badly written paragraph of documentation. What it should say
is that, however the message for logging is derived, only the first line
is actually logged.

Since log entries in the main log always consist of a single line, I
hadn't considered the case of log_message=<something-containing-newlines>.
It was the multiline "message" case that I was thinking about. I chose
to log just the first line instead of the alternative, which is to turn
all the newlines into something else, such as "\n".

> I'm using log_message = SPAM ($spam_score) ${tr {$spam_report}{\n}{#}}
> now.


That is exactly what I was going to suggest that you should do.



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