Re: [Exim] using host list to deny accept router

Pàgina inicial
Delete this message
Reply to this message
Autor: Adam Henry
Data:  
A: exim-users
Assumpte: Re: [Exim] using host list to deny accept router
There doesn't seem to be a net-lsearch function to be used within the
lookup function. The only place net-lsearch will work is as a host
list parameter?

It would be nice to use named host/domain lists in a router's
condition statement.

hank

On Wed, Jan 29, 2003 at 10:34:14AM -0500, Adam Henry wrote:
> Hi. Using Exim 4.12, I would like to create a whitelist in my
> spamcheck router using a hostlist. Here is what I currently have:
>
>
> spamcheck_router:
> driver = accept
> no_verify
> transport = spamcheck
>
>     condition = "${if and {                                          \
>                 {!def:h_X-Spam-Flag:}                                \
>                 {!eq {$received_protocol}{spam-scanned}}             \
>                 {!eq {$received_protocol}{local}}                    \
>                 {!eq {${lookup {$local_part@$domain} lsearch*@       \
>                         {ETC_PATH/domain/nospam_to}{1}{0}}}{1}       \
>                 }                                                    \
>                 {!eq {${lookup {$sender_address} lsearch*@           \
>                         {ETC_PATH/domain/nospam_from}{1}{0}}}{1}     \
>                 }                                                    \
>                 {!eq {${lookup {$sender_host_address} lsearch        \
>                         {ETC_PATH/host/nospam_from}{1}{0}}}{1}       \
>                 }                                                    \
>                 {!eq {${lookup {$sender_host_address} lsearch        \
>                         {ETC_PATH/host/mailservers}{1}{0}}}{1}       \
>                 }                                                    \
>                 {!eq {${lookup {$sender_host_address} lsearch        \
>                         {ETC_PATH/host/admin}{1}{0}}}{1}             \
>                 }                                                    \
>         } {1}{0} }"

>
>
> However, I would like to define addresses in 'admin' in CIDR notation.
> I'm not sure if there is a condition statement that can properly parse
> that type of information, but there doesn't appear to be an option in the
> accept router to define a 'hosts' list. Has anyone else found solution
> to similar situation?
>
> Also, I'm not sure of the overhead by such a large conditional. If there
> are quicker ways to accomplish the same end results, I would love to
> hear suggestions. (any suggestions are always welcomed)
>
> best regards,
> hank
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##