[Exim] using host list to deny accept router

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Adam Henry
Datum:  
To: exim-users
Betreff: [Exim] using host list to deny accept router
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