Re: [exim] Block connections based on HELO

Etusivu
Poista viesti
Vastaa
Lähettäjä: Always Learning
Päiväys:  
Vastaanottaja: Exim
Aihe: Re: [exim] Block connections based on HELO
On Thu, 2015-03-26 at 11:33 -0500, Scott Neader wrote:
> 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!


How about something like this ?

EXDIR previous defined (in my setups as) /data/config/exim

drop condition = ${lookup{$sender_helo_name}lsearch{EXDIR/helo.reject} \
                         {1}{0}}


It is untested.

The idea is you simply add or delete entries in helo.reject - and that
does NOT require a restart of Exim.


--
Regards,

Paul.
England, EU.      Je suis Charlie.



--
Regards,

Paul.
England, EU.      Je suis Charlie.