Re: [exim] question regarding spamassassin in exim, especia…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Phil Pennock
Datum:  
To: David Mathog
CC: exim-users
Betreff: Re: [exim] question regarding spamassassin in exim, especially headers
On 2011-07-13 at 10:14 -0700, David Mathog wrote:
> Nevertheless, none of the headers defined by "add_header" in any of
> those many configuration files actually show up in the messages.
> Instead the only headers created are those defined in exim.conf in this
> section:


SpamAssassin's added headers rely upon the message itself being
transported through SA, modified by it, before delivery.

By contrast, Exim is asking spamd to take a look at the message and
report back on it; spamd doesn't get to modify the message at all.

> Is there a different exim configuration that would let spamassassin use
> the headers defined in its configuration files instead? In particular I
> want the X-Spam-Status header that results from:
>
> add_header all Status "_YESNO_, score=_SCORE_ required=_REQD_
> tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_"
>
> which is defined in those configuration files but isn't showing up in
> the scanned email messages.


Exim gets $spam_report, so you could use clear_report_template and then
add stuff explicitly to the report, to get just that data.

The spamd protocol:

http://svn.apache.org/repos/asf/spamassassin/trunk/spamd/PROTOCOL

contains a PROCESS command, and now HEADERS; I haven't thought about it
deeply, but I think that supporting this in Exim would be non-trivial,
because of the life-cycle of messages and headers. However, it might be
feasible to use HEADERS and filter the results to any headers starting
"X-Spam" and do an implicit headers_add of those.

If you want to write a patch, we'd probably accept it if the change in
behaviour is optional, triggered by an ACL control or somesuch; anything
you write (even without that control) increases the odds of it going in.
You're looking at spam.c and probably using setup_header() so that the
new headers are treated as ACL-added.

-Phil