Have a question for the list....
Exim 4.20 with Exiscan-acl patch
I would like to check spam using individual user settings in a mysql
db. I am ok with using the default settings for multiple recipients (at
least for now). Here is what I did:
****
warn message = X-Spam-Score: $spam_score ($spam_bar)
spam = $recipients:true
condition = ${if >{$recipients_count}{1}{0}{1}}
warn message = X-Spam-Report: $spam_report
spam = $recipients:true
condition = ${if >{$recipients_count}{1}{0}{1}}
warn message = X-Spam-Flag: YES
spam = $recipients
condition = ${if >{$recipients_count}{1}{0}{1}}
****
and a similar set of acl's for $recipients_count > 1.
This works great except for one small problem. We accept mail for
multiple domains for a single account. For example, we own
mydomain.net, mydomain.com, mydomain.biz, and mydomain.info. The user
can send/receive mail at any of these domains, but will only be in the
mysql db under the .com. (note we also have mydomain2.com, .net, etc
which will be in mysql as user@???, so I have to do lookups on
the whole address)
I had thought of doing something like this in the rcpt acl:
****
accept domains = +mydomain1_domains
set domain = mydomain.com
****
but $domain can't be set like that (and this didn't seem like a very
good idea).
Another idea (even more undesireable) would be to hack spamassassin so
that it does username LIKE blah instead of equals.
I would like to keep this domain rewrite local to the data acl as it
would have less chance of breaking things. I'm just not sure how to go
about it in an acl.
In a perfect world, exim would understand me if I did this:
****
($user, $dom) = split("@", $recipients);
warn message = X-Spam-Score: $spam_score ($spam_bar)
spam = $user@???:true
$dom = +mydomain_domains
condition = ${if >{$recipients_count}{1}{0}{1}}
****
Is there a good way to rip apart the $recipients, keeping in mind that
there is only a single address in it? (I know $dom is not a proper
condition either)
Thanks!
--
Dennis Skinner
Systems Administrator
BlueFrog Internet
http://www.bluefrog.com