-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.460 2007/01/23 12:33:08 magnus Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.461 2007/01/23 14:34:02 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
successful authentication. This usually meant that the value preserved by
the server_setid option was incorrect.
+PH/08 Added $smtp_count_at_connection_start, deliberately with a long name.
+
Exim version 4.66
-----------------
-$Cambridge: exim/doc/doc-txt/NewStuff,v 1.129 2007/01/22 16:29:54 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/NewStuff,v 1.130 2007/01/23 14:34:02 ph10 Exp $
New Features in Exim
--------------------
When ENABLE_DISABLE_FSYNC is not set, a reference to disable_fsync in a
runtime configuration generates an "unknown option" error.
+ 5. There is a new variable called $smtp_count_at_connection_start. The name
+ is deliberately long, in order to emphasize what the contents are. This
+ variable is set greater than zero only in processes spawned by the Exim
+ daemon for handling incoming SMTP connections. When the daemon accepts a
+ new connection, it increments this variable. A copy of the variable is
+ passed to the child process that handles the connection, but its value is
+ fixed, and never changes. It is only an approximation of how many incoming
+ connections there actually are, because many other connections may come and
+ go while a single connection is being processed. When a child process
+ terminates, the daemon decrements the variable.
+
Version 4.66
------------
-/* $Cambridge: exim/src/src/daemon.c,v 1.21 2007/01/17 11:29:39 ph10 Exp $ */
+/* $Cambridge: exim/src/src/daemon.c,v 1.22 2007/01/23 14:34:02 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
struct sigaction act;
#endif
+ smtp_accept_count++; /* So that it includes this process */
+
/* May have been modified for the subprocess */
log_write_selector = use_log_write_selector;
configured value and may therefore already be TRUE. Leave logging
till later so it will have a message id attached. */
- if (smtp_accept_queue > 0 && smtp_accept_count >= smtp_accept_queue)
+ if (smtp_accept_queue > 0 && smtp_accept_count > smtp_accept_queue)
{
local_queue_only = TRUE;
queue_only_reason = 1;
-/* $Cambridge: exim/src/src/expand.c,v 1.76 2007/01/08 11:56:41 ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.77 2007/01/23 14:34:02 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
{ "smtp_active_hostname", vtype_stringptr, &smtp_active_hostname },
{ "smtp_command", vtype_stringptr, &smtp_cmd_buffer },
{ "smtp_command_argument", vtype_stringptr, &smtp_cmd_argument },
+ { "smtp_count_at_connection_start", vtype_int, &smtp_accept_count },
{ "sn0", vtype_filter_int, &filter_sn[0] },
{ "sn1", vtype_filter_int, &filter_sn[1] },
{ "sn2", vtype_filter_int, &filter_sn[2] },
-/* $Cambridge: exim/src/src/smtp_in.c,v 1.51 2007/01/18 15:35:42 ph10 Exp $ */
+/* $Cambridge: exim/src/src/smtp_in.c,v 1.52 2007/01/23 14:34:02 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
}
#endif
- /* Check for reserved slots. Note that the count value doesn't include
- this process, as it gets upped in the parent process. */
+ /* Check for reserved slots. The value of smtp_accept_count has already been
+ incremented to include this process. */
if (smtp_accept_max > 0 &&
- smtp_accept_count + 1 > smtp_accept_max - smtp_accept_reserve)
+ smtp_accept_count > smtp_accept_max - smtp_accept_reserve)
{
if ((rc = verify_check_host(&smtp_reserve_hosts)) != OK)
{
log_write(L_connection_reject,
LOG_MAIN, "temporarily refused connection from %s: not in "
"reserve list: connected=%d max=%d reserve=%d%s",
- host_and_ident(FALSE), smtp_accept_count, smtp_accept_max,
+ host_and_ident(FALSE), smtp_accept_count - 1, smtp_accept_max,
smtp_accept_reserve, (rc == DEFER)? " (lookup deferred)" : "");
smtp_printf("421 %s: Too many concurrent SMTP connections; "
"please try again later\r\n", smtp_active_hostname);
accept
freeze:
- accept control = freeze
+ accept logwrite = Connections=$smtp_count_at_connection_start
+ control = freeze
queue_only:
accept control = queue_only
+1999-03-02 09:44:33 Connections=0
1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex U=CALLER P=local-smtp S=sss
1999-03-02 09:44:33 10HmaX-0005vi-00 frozen by ACL
1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@test.ex U=CALLER P=local-smtp S=sss
******** SERVER ********
1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 Connections=1
1999-03-02 09:44:33 10HmbB-0005vi-00 <= x@y H=[127.0.0.1] P=smtp S=sss
1999-03-02 09:44:33 10HmbB-0005vi-00 frozen by ACL
1999-03-02 09:44:33 10HmbC-0005vi-00 <= x@y H=[127.0.0.1] P=smtp S=sss
LOG: SMTP connection from [V4NET.9.8.7] closed by QUIT
LOG: smtp_connection MAIN
SMTP connection from CALLER
+LOG: MAIN
+ Connections=0
LOG: MAIN
<= CALLER@test.ex U=CALLER P=local-smtp S=sss
LOG: MAIN