[Exim] 'or' condition question

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Michael F. Sprague
Datum:  
To: exim-users
Betreff: [Exim] 'or' condition question
Hi folks,

I've been working on this 'or' condition for a day or two now and I cannot get
it to work correctly. In short, the condition wants to see if a domain is
listed in either of 2 dbm files. Here is what I have. This is in the
check rcpt ACL:

condition = ${if or {\
                     {eq {$acl_m0}\
                         {${lookup{$domain}dbm{RELAYTODB}}}\
                         {1}{0}}\
                     {eq {$acl_m0}\
                         {${lookup{$domain}dbm{LOCALDB}}}\
                         {1}{0}}\
                    }\
              }


RELAYTODB and LOCALDB are macros which get correctly expanded.

I spread it across several lines to make it easier to read. I've tried
several iterations of this and it always fails with this error:

temporarily rejected RCPT mfs@???: failed to expand ACL string "${if or {{eq {$acl_m0}{${lookup{$domain}dbm{/usr/local/exim/etc/relay-to-domains.db}}}{1}{0}}}{eq {$acl_m0}{${lookup{$domain}dbm{/usr/local/exim/etc/local-domains.db}}}{1}{0}}}}": missing } at end of condition inside "or" group

If I change the condition to not do an 'or' and look at just one dbm file like
below it works fine:

condition = ${if eq {$acl_m0}{${lookup{$domain}dbm{RELAYTODB}}}{1}{0}}

I suspect I just need another pair of eyes to see what I'm missing. I've been
using Exim for years and have poured over the docs to see what I am doing
wrong but no luck so far. Am I just making a silly syntax error?

I can provide more context if necessary but I'm assuming at this point it's
just a syntax problem. Could it be an issue with how $acl_m0 gets set?

Thanks,
mikeS
--
Michael Sprague  | mfs@???
Partner          | System and Network Engineering (SaNE), LLC
use STD::disclaimer;