Re: [exim] How to throttle SMTP connections from specific ho…

Pàgina inicial
Delete this message
Reply to this message
Autor: Dave Evans
Data:  
A: exim-users
Assumpte: Re: [exim] How to throttle SMTP connections from specific hosts
On Thu, Mar 05, 2009 at 05:36:39PM +0300, Eric Kiara wrote:
> Question 1:
> I need help on throttling connections from a specific host. I want to allow
> only 4 SMTP connections from this host at a time.


Read what the fine documentation has to say about "smtp_accept_max_per_host".
In particular, "The option is expanded, to enable different limits to be
applied to different hosts by reference to $sender_host_address".

> Question 2:
> Also, how can I progressively delay allowed connections from hosts that
> connect and attempt delivery to non-existent accounts
>
> I would like to progressively delay connections like these so that for each
> delivery attempt to a non-existent account the delay before I accept a new
> SMTP connection from this hos will be doubled.


Read up on rate limiting
(search http://exim.org/exim-html-current/doc/html/spec_html/index.html for
"rate"). It sounds like you'll need combine a ratelimit in whatever part of
your ACL detects invalid accounts, with a ratelimit in the ACL for new
connections. (But IMO it's far easier to simply apply the delay at RCPT time,
so that each failed RCPT delays for longer and longer).

--
Dave Evans
http://djce.org.uk/
http://djce.org.uk/pgpkey