[exim] How do I skip a router when I get an expansion failur…

Top Page
Delete this message
Reply to this message
Author: Alex King
Date:  
To: exim-users
Subject: [exim] How do I skip a router when I get an expansion failure?
I check spamassassin the ACLs, but not for every message, e.g. skip
messages that are too large.

In the routers, I want to make copy of the spammy messages, something
like this:

local_score_spamcopy:
  debug_print = "R: local_score_spamcheck for $local_part@$domain"
  driver = accept
  condition = ${if >={$spam_score_int}{400}{1}{0}}
  user = spamduser
  transport = LOCAL_DELIVERY
  transport_home_directory = /home/spamduser/
  unseen
  no_expn
  no_verify

I want this copy to be made if spam_score_int is above the threshold,
but to be skipped if it's lower, or if spam_score_int isn't defined.

However the docs on condition say "If the expansion fails (other than
forced failure) delivery is deferred."  I don't want to defer, I want
this router to skip.

There is also a def:<variable name>  condition, which you might think
means "if the variable name is defined". But " If the variable does not
exist, the expansion fails."

Any ideas how to achieve what I want to do?

Thanks,
Alex