Autor: Jan Suchanek Data: Para: exim-users Asunto: [Exim] Use of "condition"
Hello!
Again a question about the use of "condition". I found a lot of
question/answers in the archive but none of them really helped. So I try
it this way. I really hope the question was not answered already...
I want to give my local users the opportunity to reject mail coming from
a certain e-mail address or domain. So I inserted a condition in the
local user director. It looks like this:
localuser:
driver = aliasfile
search_type=pgsql
condition = { if or {${lookup pgsql{select username from
domain_reject where lower(username)=lower('$local_part') and
lower(reject)=lower('$sender_address_domain')}{yes}{no}}} {${lookup
pgsql{select username from reject where
lower(username)=lower('$local_part') and
lower(reject)=lower('$sender_address')}{yes}{no}}} {{no}{yes}}}
query = "select username from passwd where lower(username) = lower
('$local_part')"
transport = local
The idea is that the message is rejected if an entry is found in the
database. This works fine with one condition (without the or) but as
soon as I try to join them with the "or" the message gets delivered in
every case (-d 10 says that one of the conditions is fullfilled...).
Any ideas where my mistake is? I am thankful for any help...