[exim] Per domain ACL condition

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jason Stanley
Dátum:  
Címzett: exim-users
Tárgy: [exim] Per domain ACL condition
Hello

I can't seem to see what is wrong with my condition statement, maybe one of you will be able to help.

root@prepbox:/usr/exim/bin# ./exim -bV
Exim version 4.62 #3 built 28-Jun-2006 09:12:19
Copyright (c) University of Cambridge 2006
Berkeley DB: Sleepycat Software: Berkeley DB 3.3.11: (July 12, 2001)
Support for: iconv() Content_Scanning
Lookups: lsearch wildlsearch nwildlsearch iplsearch dbm dbmnz dsearch mysql
Authenticators:
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir autoreply pipe smtp
Fixed never_users: 0
Size of off_t: 8
Configuration file is /usr/exim/configure
root@prepbox:/usr/exim/bin#

<snip>
        warn malware = *
        condition = ${if eq {${lookup mysql{SELECT virus_chk FROM domains WHERE domains='${domain}'}}}{yes}}
        message = X-Virus: Yes
        log_message = VIRUS_FOUND:$malware_name FROM:$sender_address TO:$recipients
</snip>


What i want it to do is lookup in the mysql database using the varible $domain, and checking if the "virus_chk" field equals "yes", if so it must run the virus check.
It seems as if the $domain variable is not working because if i manually change the ${domain} value to "test.co.za" then the condition evaluates and the virus is caught.
Am I possibly using the $domain variable incorrectly?

Thanks in advance
Jason