On Wed, 12 Aug 2009, Todd Lyons wrote:
> In the case of this simple ACL statement:
>
> deny condition = ${if eq{$acl_c_reject}{yes}}
> message = Your message has been rejected\nThe reason is
> $acl_c_reject_reason
>
> However, in the log, it only logs the part up to the newline. In the
> exim manual, there is an example which shows multiple lines:
>
> # deny message = rejected because $sender_host_address \
> # is in a black list at $dnslist_domain\n\
> # $dnslist_text
> # dnslists = black.list.example
>
> Why is it that my message statement above only logs the info before
> the \n? I cannot find anything in the manual that says the verbage
> logged is different from what is actually sent in the SMTP
> transaction. I have verified that the full message is what is sent
> during the SMTP transaction.
http://www.exim.org/exim-html-current/doc/html/spec_html/ch40.html#SECTACLmodi
in the description of "message =".
"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 any
text for logging contains newlines, only the first line is logged. In the
absence of both log_message and message, a default built-in message is
used for logging rejections."
I suggest using log_message with a simpler one-line message for the log
message. It only needs to be brief, since you know what is generating it,
and it doesn't need to explain itself, just contain the relevant detail.
So you might have:
deny condition = ${if eq{$acl_c_reject}{yes}}
message = Your message has been rejected\nThe reason is $acl_c_reject_reason
log_message = Rejected: $acl_c_reject_reason
Jethro.
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK