Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

conditional dnslists

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


tewari.mohit at gmail

May 8, 2008, 12:03 PM

Post #1 of 3 (81 views)
Permalink
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
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


jgh at wizmail

May 8, 2008, 1:54 PM

Post #2 of 3 (71 views)
Permalink
Re: conditional dnslists [In reply to]

Mohit Tewari wrote:
> dnslists = dnsbl.sorbs.net
> condition = ${if == {USE_RBL} {1}}

We'd need a few more lines around that pair for context,
but it's likely that you'd want them the other way
around.

Cheers,
Jeremy

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


wbh at conducive

May 9, 2008, 10:01 AM

Post #3 of 3 (60 views)
Permalink
Re: conditional dnslists [In reply to]

Mohit Tewari wrote:
> 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

We do it the other way 'round.

Instead of using the user or domain prefs to decide to check an RBL or
not, we just go ahead and check local and remote BL's on all traffic,
save separate and cumulative flags (hit/no hit) and/or 'point scores',
drop 'em outright only if the sins are serious enough to clearly ID the
senders as bad actors.

Lookups done, (once only) scores & flags for the survivors are carried
forward in acl_m variables.

User/domain preferences can then be compared to flags and scores at one
or more later stages - whole domains during the session, individual user
deliveries in-session for soem, in router/transport sets for others.

There are more total lines of configure-file code, but each part of it
is dead-simple and can be more selectively skipped based on other flags.

I'd also suggest that complex SQL 'WHERE AND OR' code will ordinarily
reqire more machine resources than comparably complex Exim acl code.

Better to use SQL for storage and retreival and let Exim do the
comparisons and decision-making.

HTH,

Bill

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.