Re: [exim] lookup in and

Top Page
Delete this message
Reply to this message
Author: Todd Lyons
Date:  
To: Klaus Ethgen
CC: exim-users
Subject: Re: [exim] lookup in and
On Thu, Dec 1, 2011 at 7:14 AM, Klaus Ethgen <Klaus+exim@???> wrote:
> While it seems to be ok to have as much "condition" lines as you wish in
> a acl, a router only accept one. That implies to use "and" for all
> conditions. But if I need to use a "lookup" inside them I get an error.
> However, after some search I found one post in this list that this is
> not possible. But there is no way out of the problem. Also I do not find
> any about this problem in the original documentation.


You must be running an older version of exim then. From the changelog:
Exim version 4.73
-----------------
PP/15 Bugzilla 816: support multiple condition rules on Routers.

As for mixing the lookup into the and condition, I didn't know that
was a limitation. However, it seems like you could do the lookup
first, stuff it into a variable, and then use that variable.

     set acl_m_blah = ${lookup ... }
     condition = ${if and{{={25}{$received_port}}{$acl_m_blah}}}


You may need to add some qualifiers to your lookup in order to prevent
unexpected results from being returned.

Regards...              Todd
-- 
If Americans could eliminate sugary beverages, potatoes, white bread,
pasta, white rice and sugary snacks, we would wipe out almost all the
problems we have with weight and diabetes and other metabolic
diseases. -- Dr. Walter Willett, Harvard School of Public Health