On Thu, 6 Jun 2002, Juha Saarinen wrote:
> Experimenting with deny hosts under acl_check_rcpt, to shut out some
> spammers.
>
> If I've got a text file in this format:
>
> 65.124.104.0/24 # Aibusiness.net, etc. CopyDVD spammer.
> 65.124.105.0/24
> 65.124.106.0/24
> 65.124.107.0/24
> 65.124.108.0/24
> 65.124.109.0/24
> 65.124.110.0/24
> 65.124.111.0/24
> 206.239.10.142 # Reply.net
>
> etc., which is the appropriate lookup type to use?
>
> Would lsearch work if I terminate the entries before the #'s with a : ?
1. A plain file inclusion (i.e. no lookup type) would work.
deny hosts = /the/file
2. If you want to use lookups, you will have to use two lookups
deny hosts = net24-lsearch;/the/file : net-lsearch;/the/file
but since lsearch is going to do a linear scan of the file anyway, I
would stick to (1). If your file is very big, then it might be worth
converting it to a dbm or cdb file and using the two lookups.
3. You don't need to put a : on the lines for lsearch. It also accepts
end of line or white space as a key terminator.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.