Re: [exim] Logging the entire message from $spam_report

Etusivu
Poista viesti
Vastaa
Lähettäjä: Marius Stan
Päiväys:  
Vastaanottaja: soumya tr, exim-users@exim.org
Aihe: Re: [exim] Logging the entire message from $spam_report
On 15.01.2014 14:40, soumya tr wrote:


> Hi,
>
> I am trying to get the spam reports in logs. But the entire message is not
> shown, only starting line is shown.
>
> The acl condition used is:
>
>    warn
>          condition   = ${if <= {$message_size}{200K}{${if forall{<,
> $recipients}{match_domain{${domain:$item}}{+local_domains}}{0}{1}}}{0}}
>          condition   = ${if eq{$originator_uid}{0}{0}{1}}
>          ! condition = ${if eq {$h_X-OutGoing-Spam-Status:}{}{0}{1}}
>          set acl_c_outgoing_spam_scan = 1

>
>    deny  message     = This message was classified as SPAM and may not be
> delivered
>          condition   = ${if eq{$acl_c_outgoing_spam_scan}{1}{1}{0}}
>          ! condition = ${if eq {$h_X-OutGoing-Spam-Status:}{}{0}{1}}
>          spam        = cpaneleximscanner/defer_ok
>          log_message = "SpamAssassin as cpaneleximscanner detected OUTGOING
> not smtp message as spam ($spam_score) [ Spam Report: $spam_report ] "

>
>    warn
>          log_message = "SpamAssassin as cpaneleximscanner detected OUTGOING
> not smtp message as NOT spam ($spam_score)"
>          condition   = ${if eq{$acl_c_outgoing_spam_scan}{1}{1}{0}}
>          ! condition = ${if eq {$h_X-OutGoing-Spam-Status:}{}{0}{1}}
>          add_header = X-OutGoing-Spam-Status: No, score=$spam_score

>
> The message in the logs is:
>
> ---------------------
> 2014-01-15 12:21:29 1W3PTN-000IAQ-QI F=<user@hostname> rejected by non-SMTP
> ACL: "SpamAssassin as cpaneleximscanner detected OUTGOING not smtp message
> as spam (7.8) [ Spam Report: Spam detection software, running on the system
> "server_hostname", has
> ---------------------
>
> How can I have the entire message logged.

The culprit is the "\n" in the spam report.
use something like this:

log_message = ${tr {$spam_report}{\n}{#}}

Marius
> Thanks in advance.
>