[exim] conditional dnslists

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Mohit Tewari
Datum:  
To: exim-users
Betreff: [exim] conditional dnslists
Hi,
I am novice as far as exim configuration and syntax is used in exim.conf.
We are using RBL list for filtering, however some of our customers do not
want any RBL filtering for their domains, so I have set up an option in the
database, which I check when the mail comes in to see if that domain has RBL
checking set to on or not if yes than only check against the dnslists else
continue without checking, I am trying to accomplish this as follows:

Query to get the value from the database if RBL filtering is to be used or
not

USE_RBL  = \
    ${lookup mysql{ \
      SELECT entity_option.value \
      FROM   entity,entity_option,optn \
      WHERE  entity.id=entity_option.entity_id \
      AND    entity_option.option_id=optn.id \
      AND    optn.name='useRBL' \
      AND    ( \
        entity.name='${quote_mysql:$local_part@$domain}' \
        OR entity.name='$domain' \
        OR entity.name='default_domain' \
      ) \
    }} \


Then Building the dnslists as follows

dnslists = dnsbl.sorbs.net
condition = ${if == {USE_RBL} {1}}

I am trying to execute the dnslists only if the value from the query
(USE_RBL) returns a value of 1.
However this is not being accomplished.
Appreciate any help in this regards.
Thanks,
Tewari