I'm trying to figure out how to selectively scan messages for spam based on
header information. I am running Exim 4.20 with the
exiscan-acl-4.20-07.patch.
My understanding of the new Exiscan ACL patch is that it will perform
content scanning on all messages that are checked with the acl_smtp_data =
acl_check_content ACLs. Below is a sample config of what I think the
relevant Exiscan ACLs look like.
acl_smtp_data = acl_check_content
.
acl_check_content:
warn message = X-Spam-Score: $spam_score ($spam_bar)
spam = nobody:true
warn message = X-Spam-Report: $spam_report
spam = nobody:true
warn message = X-Spam-Flag: YES
spam = nobody
deny message = This message scored $spam_score points.
spam = nobody:true
condition = ${if >{$spam_score_int}{45}{1}{0}}
accept
The question is, I do not want messages originating from local_domains to be
scanned, and I would also like to omit messages destined for certain
local_part@local_domains from the scan.
It seems that if one should use Exim rules to selectively send messages to
the content-checking acl based on header content, that would be the
solution, but I'm not if this is possible.
It almost seems that the previous (non-acl) version of exiscan would be more
efficient for this particular need. Then I could simply have a condition
which defines which messages are scanned and which are passed on.
Something to the effect of:
exiscan_spamd_condition = \
${if or {{eq{$received_protocol}{esmtp}} \
{eq{$received_protocol}{smtp}} \
{!eq{$sender_address_domain}{mydomain.com}}} \
{1}{0} }
(I know the above is incorrect, but I'm not sure about the syntax )
Any suggestions would be appreciated!
- David