Yves Goergen wrote:
> I want to make my users aware of the new spam filter service and make
> them find an appropriate spam score threshold to deny incoming mails at.
> There is already added a X-Spam-Score header to all incoming mails but
> most of the users probably don't know how to read mail header lines. So
> I thought it would be best to add the spam score to the subject of every
> message if it's greater than 5.
Below is a method that I worked out which is simpler than all those
suggested, including in the wiki, since it all takes place in the DATA
ACL. (No messing around with system filters etc. - I felt that was
rather ugly and wanted a better solution)
# Add a "*****SPAM***** " prefix to the Subject header, if the
# X-Spam-Flag header is set to 'YES'
headers_remove = Subject
headers_add = ${if { eq{$h_X-Spam-Flag:}{YES} } \
{Subject: *****SPAM***** $h_Subject:} \
{Subject: $h_Subject:} \
}
I've used this myself for some time. Works great.
Tim