Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

Is it possible to deny IP range in Exim?

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


mkp_71 at yahoo

Feb 3, 2010, 12:53 AM

Post #1 of 3 (677 views)
Permalink
Is it possible to deny IP range in Exim?

Hi , is it possible to deny IP range(like 192.168.0.0/16) in Exim? Something
like this:

begin acl

accept hosts = :
deny hosts = /etc/exim/blacklist #my own blacklist

Thanks in advance.
--
View this message in context: http://old.nabble.com/Is-it-possible-to-deny-IP-range-in-Exim--tp27433136p27433136.html
Sent from the Exim Users mailing list archive at Nabble.com.


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


james at digitalciti

Feb 3, 2010, 7:38 AM

Post #2 of 3 (650 views)
Permalink
Re: Is it possible to deny IP range in Exim? [In reply to]

mkp_71 wrote:
> Hi , is it possible to deny IP range(like 192.168.0.0/16) in Exim? Something
> like this:
>
> begin acl
>
> accept hosts = :
> deny hosts = /etc/exim/blacklist #my own blacklist
>
> Thanks in advance.
>
I believe its as simple as defining a hostlist at the top of your config
and then referencing it with a deny in your ACL kind of like the following:

hostlist block_hosts = /path/to/your/file/blocked_hosts.txt

begin acl
# You could do this in your smtp connect ACL
acl_check_smtp:
accept hosts = :
accept hosts = +relay_hosts
deny hosts = +block_hosts # Where this goes is up to you, if you
want to deny these hosts before your allowed relay hosts (assuming thats
defined or including relay hosts in this block list) you could move it
above the accept +relay_hosts.
# likely additional rules in this ACL follow
# Final accept
accept
# End of acl_check_smtp

# Contents of your file blocked_hosts.txt
xxx.xxx.xxx.xxx
xxx.xxx.xxx.xxx/24
# You can specify single IP's as well as ranges with CIDR notation, no
need for : separator there as long as theres a <CR> between lines.

Thanks,
James




--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


eximusers at downhill

Feb 3, 2010, 10:54 AM

Post #3 of 3 (646 views)
Permalink
Re: Is it possible to deny IP range in Exim? [In reply to]

mkp_71 <mkp_71 [at] yahoo> wrote:

> Hi , is it possible to deny IP range(like 192.168.0.0/16) in Exim? Something
> like this:

> begin acl

> accept hosts = :
> deny hosts = /etc/exim/blacklist #my own blacklist

Hello,

I am not 100 % sure, but I think this should work exactly the way you
suggested.

<mode="reading the fine manual">
The argument to "host =" is a accepts a hostlist
http://docs.exim.org/current/spec_html/ch40.html#SECTaclconditions and
hostlists can contain filenames
http://docs.exim.org/current/spec_html/ch10.html#SECTfilnamlis network
ranges are specified as 192.168.0.0/16
http://docs.exim.org/current/spec_html/ch10.html#SECThoslispatip
</>
cu andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.