Re: [exim] Set smtp_accept_max per host

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Ian FREISLICH
CC: exim-users, Doug
Subject: Re: [exim] Set smtp_accept_max per host
On Thu, 28 Apr 2005, Ian FREISLICH wrote:

> Philip Hazel wrote:
> > On Tue, 19 Apr 2005, Ian FREISLICH wrote:
> >
> > > Yes, it would be very nice to have smtp_accept_max_per_host expanded.
> >
> > It is.
> >
> > > A $host_connection_count expansion variable would be exceedingly nice.
> >
> > For what? Number of connected hosts? Number of connections from this
> > host? Either way, it isn't possible to do, given the way Exim is
> > implemented as a number of independent processes.
>
> For the number of connectons from this host at the time time this
> processs was spawned.


The problem with providing this is the expense. Exim would have to scan
all its connections (hundreds on a big system) in order to compute the
count, and it would have to do this in the daemon mainline loop. At
present, it only does such a scan if accept_max_per_host is set, and
even then the code contains some optimizations to minimize the work
(e.g. if the total connection count is less than accept_max_per_host,
it skips the scan).

I would not want to add this overhead to every incoming connection, just
in case $host_connection_count happened to be used later on.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book