Re: [Exim] Can't get \n on message option in acl's.

Top Pagina
Delete this message
Reply to this message
Auteur: Philip Hazel
Datum:  
Aan: Glenn Carver
CC: exim-users
Onderwerp: Re: [Exim] Can't get \n on message option in acl's.
On Fri, 9 Aug 2002, Glenn Carver wrote:

> I'm trying to get my rejectlog file a bit more readable. At the
> moment, a log entry makes for a very long line that gets wrapped at a
> terminal or in my email report.
>
> So I've tried putting a newline \n character in the 'message' option
> for my acl's but I can't get it to work.


There is code in Exim specifically to prevent newlines getting into log
lines! This is so that scripts which scan logs can rely on the format.

> I would like a \n before the message text. But none of the following work
>
>    deny message = \nInvalid local user     -- gives me nothing after the :
>    deny message = "\nInvalid local user"   -- gives me a " after the :
>    deny message = \N\nInvalid local user\N
>          -- doesn't interpret the \n but puts it out on the log line!


It is specified that if "message" contains newlines (and log_message is
not set), then the multiple lines get sent as the SMTP response, but
only the first one is logged. This is so that people can send long,
wordy responses without filling up their logs too much.

> How do I do this?


The only way is to post-process the log, I'm afraid.

There is a WishList item to provide a hook for local code to be called
when writing log lines, but don't hold your breath.

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