Re: [exim] exiscan-acl, $spam_report

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Magnus Holmgren
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] exiscan-acl, $spam_report
onsdag 05 april 2006 03:05 skrev Stanislaw Halik:
> hello,
>
> exiscan-acl works really well, except for one thing i'm not able to
> figure out. $spam_report contains a large, verbose message with excerpts
> from bodies and individual rule scoring.
>
> is there a way to only fetch the rule scoring part or is matching it by
> a regexp the only method?
>
> -- sh


The content of $spam_report is essentially the output from spamc -R (minus the
first line containing the score/needed_points, which is used for the other
$spam_ variables, and indented for putting in the headers). I have
experimented with the following in local.cf:

clear_report_template
report X-Spam-Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on
_HOSTNAME_
report X-Spam-Status: _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_
autolearn=_AUTOLEARN_ version=_VERSION_
report X-Spam-Report: _REPORT_

and the following in the ACL:

  warn    message = ${sg{$spam_report}{\tX-Spam-}{X-Spam-}}


(which un-indents the appropriate lines).

Ugly as hell, yes, which is why I prefer the SA-Exim local_scan() plugin until
the integration with Exiscan is made better. See also my post from Monday.

--
Magnus Holmgren