Re: [exim] Connection Count

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Jeremy Harris
CC: exim-users
Tárgy: Re: [exim] Connection Count
On Wed, 17 Jan 2007, Jeremy Harris wrote:

> --- src/expand.c        (revision 1686)
> +++ src.new/expand.c        (working copy)
> @@ -463,6 +463,7 @@
>    { "sender_rate_period",  vtype_stringptr,   &sender_rate_period },
>    { "sender_rcvhost",      vtype_stringptr,   &sender_rcvhost },
>    { "sender_verify_failure",vtype_stringptr,  &sender_verify_failure },
> +  { "smtp_accept_count",   vtype_int,         &smtp_accept_count },
>    { "smtp_active_hostname", vtype_stringptr,  &smtp_active_hostname },
>    { "smtp_command",        vtype_stringptr,   &smtp_cmd_buffer },
>    { "smtp_command_argument", vtype_stringptr, &smtp_cmd_argument },


The reason I have always resisted doing this is that the value you will
get will be the value that the daemon had when it spun off the process
that is accepting the incoming message. If any substantial time has
passed since then (you are doing 1-second delays after the banner, or
you are now receiving the 100th message on this connection - each one
taking a few seconds because of content scanning, or whatever), the
value may well be out-of-date, in either direction.

Maybe for some purposes this doesn't matter. However, I would suggest a
more descriptive name such as

smtp_connection_count_at_start_of_connection

but that's rather long. Maybe smtp_count_at_connection_start might do.

The *current* connection count is held only by the daemon process.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book