Re: [exim] how to implement a blacklist of IP addresses

Góra strony
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
Dla: Damien Moore
CC: exim-users
Temat: Re: [exim] how to implement a blacklist of IP addresses
On 2012-10-13 at 16:10 +0100, Damien Moore wrote:
> I am using Exim 4.72 on Debian 6.0.6. I have dumped the Debian
> configuration scheme and composed my own exim4.conf file based on the
> sample supplied. I have successfully implemented a blacklist of sending
> domains which works like this:
>
> acl_smtp_mail = acl_check_mail
> acl_check_mail:
>   deny    message          = Domain blacklisted locally
>           sender_domains   = lsearch;/etc/exim4/senderdomains.blacklist

>
> where the file senderdomains.blacklist contains a list of this format:
>
> dirtyspammers.org
> spamserver.lots-o-spam.net
> dishitout.spammers.com


In this case, you don't want "lsearch;", you just want to specify the
file path itself, so that the matching is "one per line". lsearch is a
way, loosely speaking, of looking for "key: value" lines by key and
grabbing the value for use.

> My question is how to do something similar with a list of IP addresses.
> Would a similar structure be appropriate and where would it be put? Hope
> this is not too easy.


It should be:
deny hosts = /etc/exim4/senderhosts.blacklist

And don't worry about "too easy". If people complain about "too easy",
I can cough at them and ask for people to help maintain the FAQ. :-D

-Phil