Re: [Exim] local_part in exiscan

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Avleen Vig
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [Exim] local_part in exiscan
On Sat, Nov 01, 2003 at 11:13:15AM -0800, Avleen Vig wrote:
> Obviously $local_part cannot be expanded in
> acl_check_content/acl_smtp_data, because there might be multiple
> recipients.
> The workaround to this I'm considering is using exiscan to pass app
> messages to spamassassin and clamav, and later use routers to accept or
> reject messages.
> But I'm not too sure how to set these routers up - I have a look through
> the archives, but I can't seem to find any examples. Does anyone have
> suggestions?


Replying to my own message.. hmmm :)

Ok to make this a little more sane, I have the following router:

ditch_spam:
  driver = redirect
  allow_fail
  data = :blackhole:
  condition = ${if >{$spam_score_int}{${lookup mysql{select sa_refuse * 10 from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.spamassassin = '1' \
               and users.domain_id=domains.domain_id }}} {yes}{no}}
  local_part_suffix = -*
  local_part_suffix_optional


Unfortunately this seems to :blackhole: mail where the mysql lookup has
NOT returned a result. To make matters worse, it only :blackhole:'s
sometimes, not all the time.

I'm perplexed.