[Pkg-exim4-users] spamassassin headers

Andreas Metzler ametzler at downhill.at.eu.org
Thu Apr 20 17:36:24 UTC 2006

On 2006-04-20 Chris <nws at cevnet.mine.nu> wrote:
> Something seems to go wrong with the headers, reporting and ultimately
> delivery of spam-positives though.

> I have a similar setup running exim4-light with spamassassin via
> router-transport on Sarge/Debian-stable. There the "X-Spam-Flag: YES"
> header is inserted and the spam-body of a positive is kept out of view
> and attached to a warning message.

Running spamassassin by router-transport works differently, exim hands
off the message to spamassassin, spamassassin modifies it and exim
works on the modified copy.

OTOH if spamassassin is invoked via ACL exim passes a copy of the
message to spamassassin, and exim checks whether spamassassin tagged
it as spam (depending on this the spam=... condition is true or false)
saves *some* of its output (score and report) into exim expansion
variables but any changes spamassassin made to the message like report
safe are discarded, as exim does not use the modified copy.

> Here exim has the protective message hiding in the headers under
> "X-Spam_report" (see below), leaving the spam-body unshielded in the
> Inbox, in full view for the unsuspecting user. This is neither a good
> nor a pretty thing.

> Not setting the header "X-Spam-Flag: YES" on spam breaks the filtering
> with .forward and Spam gets delivered into the inbox. 
> I cannot seem to set this header manually: adding "X-Spam-Flag: YES\n\"
> to the ACL(below) ends up as header: "X-ACL-Warn: X-Spam-Flag: YES"

You are claiming that
> ACL: 
> 	warn
> 	spam = Debian-exim
> 	message =  X-Spam_score: $spam_score\n\
>         X-Spam_score_int: $spam_score_int\n\
>         X-Spam_bar: $spam_bar\n\
>         X-Spam-Flag: YES\n\
>         X-Spam_report: $spam_report

results in X-ACL-Warn: X-Spam-Flag: YES?
or are you using

> ACL: 
> 	warn
> 	spam = Debian-exim
> 	message =  X-Spam_score: $spam_score\n\
>         X-Spam_score_int: $spam_score_int\n\
>         X-Spam_bar: $spam_bar\n\
>         X-Spam_report: $spam_report
>         X-Spam-Flag: YES\n\

which should result in a syntax error.

> Negatives get no X-Spam headers at all by default, which is confusing
> since it took a trip to /var/log/syslog (or /var/log/mail.info) to find
> out that spamd actually processed the message.

That is how you configured it. You told exim to check whether the
message was spam (spam = Debian-exim) and *if* this was true to add
some headers.

> Is it exim that doesn't
> pass on the X-Spam headers set by spamassassin?

see above.

> Why? I sure didn't override that in order to have to set different
> ones manually in exim.  Is it a bug or a feature?

It is documented. ;-) 

cu andreas

The 'Galactic Cleaning' policy undertaken by Emperor Zhark is a personal
vision of the emperor's, and its inclusion in this work does not constitute
tacit approval by the author or the publisher for any such projects,
howsoever undertaken.                                (c) Jasper Ffforde

More information about the Pkg-exim4-users mailing list