[Exim] Error in Condition

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Jerry
Fecha:  
A: exim-users
Asunto: [Exim] Error in Condition
Hi, All,

I'm rather new here, and not familiar with PERL (I do PHP, C, C++,
etc.), so this is a very basic question. However, I can't figure out
for the life of me what I'm doing wrong.

I'm using Exim 4.34. Basically, I have a couple of email addresses
which I want to only be available to people signed onto the system (not
routed from external networks). So, I built the following router:

bwlist_router_2:
   driver = redirect
   condition = ${if and {or {eq {$local_part} {addr1} \
                            {eq {$local_part} {addr2}} \
               {eq {$interface_address}{127.0.0.1}}}} {1} {0}}
   data = "|/usr/local/mail/doit -t$local_part"
   allow_fail
   allow_defer
   user = mail
   pipe_transport = address_pipe


The idea here is - if local part is "addr1" or "addr2" AND the interface
address is 127.0.0.1, process it. Otherwise, don't.

However, I have something wrong in my condition. The exim log indicates:

2004-06-29 18:19:19 1BfQwZ-0004nB-0n failed to expand condition "${if
and {or {eq {$local_part} {addr1} {eq {$local_part} {addr2}} {eq
{$interface_address}{127.0.0.1}}}} {1} {0}}" for bwlist_router_2 router:
subcondition in {} expected inside "and{...}" condition


Can someone please tell me what this means - and what to do to correct it?

Also, some tips on books/websites on how to write these expressions
would help <G>.

TIA.

Jerry