Re: [Exim] ${if or { ... : expansion problem

Página Inicial
Delete this message
Reply to this message
Autor: Wakko Warner
Data:  
Para: ODHIAMBO G. Washington, exim-users
Assunto: Re: [Exim] ${if or { ... : expansion problem
> condition = ${if or {
>                     {${lookup {$domain} cdb{/usr/local/etc/exim/scan_spam_domains.cdb}{$value}}}
>                     {${lookup {$local_part@$domain} cdb{/usr/local/etc/exim/scan_spam_domains.cdb}{$value}}}
>                     } {1}{0}}

>
> Testing this with `exim -be` gives
>
> Failed: condition name expected, but found "${lookup{$domain"


It's not a condition, it's an expression. You need a condition.
You can do something like this assuming I understand what you want:

condition = ${if or {
                    {eq{${lookup{$domain}cdb{/usr/local/etc/exim/scan_spam_domains.cdb}{yes}}}{yes}}
                    {eq{${lookup{$local_part@$domain}cdb{/usr/local/etc/exim/scan_spam_domains.cdb}{yes}}}{yes}}
                    } {1}{0}}


That's just a mod of what you're doing. Now, a slightly better solution
might be to change to a single lookup and modify your cdb file.
The modification is any line that doesn't have an @, put *@ before it.
Thus:
spammerdomain.com
randomspammer@???
becomes:
*@spammerdomain.com
randomspammer@???

then simply use the senders option and do:
senders = cdb*@;/usr/local/etc/exim/scan_spam_domains.cdb

This is untested and partially assumed because I don't know what you're
doing. Is this in ACLs or Routers?

--
Lab tests show that use of micro$oft causes cancer in lab animals