RE: [Exim] wildcard blacklisting by HELO?

Top Page
Delete this message
Reply to this message
Author: Scott Truman
Date:  
To: Victor Forsyuk
CC: exim-users
Subject: RE: [Exim] wildcard blacklisting by HELO?
Hi, thanks very much for that...but I can't seem to get it to work.

I have the following acl:

deny condition = ${lookup {$sender_helo_name}nwildlsearch{REJECTHELO}{yes}{no}}
       hosts   = ! +relay_from_hosts
       message = "Blacklisted host"
     #message = Mail is blocked: ${lookup {$sender_helo_name}nwildlsearch{REJECTHELO}{$value}}


As I don't need the specific $value for each, I take it I can just list the helos in the /etc/exim/acls/helorejectrcpt file as such (without colons?). Also are my regex additions correct (is the leading question mark required)?:

?\.cable\.?\.blueyonder\.co\.uk
?\.abo\.wanadoo\.fr
?\.ipt\.aol\.com
^adsl-?\.adslplus.ch

If I was to want specific strings used in messages would the following be correct?

?\.cable\.?\.blueyonder\.co\.uk : you are blacklisted message 1
?\.abo\.wanadoo\.fr : you are blacklisted message 2
etc

Thanks for your help.

Scott

-----Original Message-----

On Wed, Feb 18, 2004 at 12:37:53AM +1300, Scott Truman wrote:
> Can anybody help here, please?


My config snippet:

# define macro to refer in ACL
REJECTHELO=/etc/exim/acls/helorejectrcpt

And, in appropriate place at RCPT ACL:

  deny condition = ${lookup {$sender_helo_name}nwildlsearch{REJECTHELO}{yes}{no}}
       hosts   = ! +relay_from_hosts
       message = Mail is blocked: ${lookup {$sender_helo_name}nwildlsearch{REJECTHELO}{$value}}



My REJECTHELO file contains entries like:

^\d+-\d+-\d+
^ip[0-9a-f]{8}\.speed\.planet\.nl
^h\d+n\d+fls\d+o\d+\.telia\.com
^dialup-
^user\d{1,3}\.net\d{2,3}

and so on (with corresponding message in each line, naturally).


> --------------------
> Hi there,
> I wish to black list at smtp time based on the HELO command. At the
> moment I have a number of ACLs such as the one that follows, hardwired
> into my exim.conf file.
>
> deny message = "Blacklisted HELO"
> condition = ${if eq{$sender_helo_name}{youkickedmydog.net}{yes}{no}}
>
> What I wish to do is actually be able to place all the restricted HELO
> hosts into an external file and include wild cards.
>
> i.e the file would have one host per line and would include entries such
> as:
>
> youkickedmydog.net
> *.dialup.comcast.net