[Exim] Help with router config

Top Page
Delete this message
Reply to this message
Author: Test, James
Date:  
To: exim-users
Subject: [Exim] Help with router config
Hello,

I have a spamassassin router, and am trying to have it only route if the user is in a certain aliases file. I tried using the data option, but that only seems to work for a redirect driver. Does anyone know how I can do this? Below is my current working router section:

begin routers

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

spamcheck_router:
  no_verify
  condition = "${if and { {!def:h_X-Spam-Flag:} \
                          {!eq {$received_protocol}{spam-scanned}}} {1}{0}}"
  driver = accept
  transport = spamcheck


system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/mail/aliases}}
user = mail
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply

localuser:
driver = accept
check_local_user
transport = local_delivery