Re: [exim] Multiple conditions in router

2018-02-16 Thread Jeremy Harris via Exim-users
On 15/02/18 13:26, Ninad Gupte via Exim-users wrote:
> 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?

You're missing a $ somewhere close to that "lookup" word, and possibly
some {} also.
-- 
Jeremy

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


[exim] Multiple conditions in router

2018-02-16 Thread Ninad Gupte via Exim-users
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
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/