[exim] Multiple conditions in router

Página Inicial
Delete this message
Reply to this message
Autor: Ninad Gupte
Data:  
Para: exim-users
Assunto: [exim] Multiple conditions in router
Hi,
I am trying to setup a mail archiving router, for one of the several domains
hosted on the server. I need a copy of the incoming and outgoing mails of that
domain to be forwarded to another MTA. I have the following router currently
which works for incoming mails:
traffic_tap: unseen no_expn no_verify transport = remote_smtp_arch driver =
manualroute domains = foo.bar
self = send require_files = /etc/MAIL_TAP_HOST route_data =
${readfile{/etc/MAIL_TAP_HOST}{:}}
I would like the same router to also handle the outgoing mail archiving. I
created a file /etc/archivedomains containing foo.bar
I wrote a condition to replace "domains = foo.bar" as follows:
condition = \ ${if or { {lookup {$sender_address_domain} lsearch
{/etc/archivedomains}} \ {lookup {$local_part} lsearch {/etc/archivedomains}} }
\ {1}{0}}

This resulted in the following error in the logs:
failed to expand condition "${if and{{bool_lax{NULL}}{bool_lax{${if or { {lookup
{$sender_address_domain} lsearch {/etc/archivedomains}} {lookup {$local_part}
lsearch {/etc/archivedomains}} } {1}{0}}}}}}" for traffic_tap router: unknown
condition "lookup" inside "or{...}" condition inside "and{...}" condition
Can you please advise where I am going wrong?
Regards,Ninad