Re: [exim] Block connections based on HELO

Inizio della pagina
Delete this message
Reply to this message
Autore: Juan Bernhard
Data:  
To: exim-users
Oggetto: Re: [exim] Block connections based on HELO

El 26/03/2015 a las 01:33 p.m., Scott Neader escibió:
> If I want to block someone that sends HELO as "EXAMPLE" I can do the
> following:
>
> acl_smtp_helo = acl_smtp_helo
> ...
> drop
>    condition = ${if eq {$sender_helo_name}{EXAMPLE} {yes}{no}}
>    log_message = HELO/EHLO - EXAMPLE blocked
>    message = EXAMPLE HELO blocked
> accept

>
> However, I need a little help with trying to block more than one HELO, for
> example, if I want to block EXAMPLE and also FOO. A push in the right
> direction would be appreciated!
>
> - Scott
>


You need some kind of lookup
If you want to use a file, you can do something like:
condition = ${lookup{$sender_helo_name} lsearch \
        {<blacklist_file>} {no} {yes}}


And in the file you will have:

EXAMPLE
FOO

(Please check the sintax in the manpage, it might be wrong)

But, if you want to scale in the future (more than 500 blocked
helo_name) you will need a database search. Check the exim documentation
at chapter 9 and 11 to see the exact sintax.

Saludos, Juan.