Daryl C. W. O'Shea wrote:
Well sort of. The headers only get set if the message ends up being
classified as spam. If you receive a virus from a whitelisted user, or
in a message that would otherwise score less than -5.0 (at least with
the default score CLAMAV 10), the X-Spam-Virus: Yes ($virus) header
won't be added since the headers are only added to %headers_spam. Of
course, clean messages won't have a header added in ham messages either.
Adding the "Virus" headers to the headers_ham hash, as in the attached
file, correct this.
You're perfectly right, of course. I did notice this problem, but I
wasn't aware of headers_ham so I didn't find a way to fix it. In fact I
was wondering about the legality of manipulating
$permsgstatus->{main}->{conf} from a plugin. Is it considered bad practice?
I was expecting a $permsgstatus->add_header() function or similar, and
when I didn't find I grepped the SA source until I found an alternative
way to add headers to the mail.
Thanks for your fix!
Otherwise a pretty cool plugin for those who can't for whatever reason
do it another way.
Thank you.
Troels