From: Philip Hazel Date: Wed, 24 Nov 2004 14:38:13 +0000 (+0000) Subject: Added log_selector=+queue_time_overall. X-Git-Tag: exim-4_50~93 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2ac0e484077ee1b4e45fe8b45d57cd2bcf050c11;p=exim.git Added log_selector=+queue_time_overall. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 1d294c857..51ca5f64f 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.36 2004/11/22 11:30:03 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.37 2004/11/24 14:38:13 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -164,6 +164,8 @@ Exim version 4.44 a list of IP addresses and/or domains to be looked up in a particular DNS domain. +39. Added log_selector=+queue_time_overall. + Exim version 4.43 ----------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index be1bbfe16..3525e84dc 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/NewStuff,v 1.14 2004/11/22 11:30:03 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/NewStuff,v 1.15 2004/11/24 14:38:13 ph10 Exp $ New Features in Exim -------------------- @@ -196,6 +196,12 @@ Version 4.44 Once a DNS record has been found (that matches a specific IP return address, if specified), no further lookups are done. +16. The log selector queue_time_overall causes Exim to output the time spent on + the queue as an addition to the "Completed" message. Like queue_time (which + puts the queue time on individual delivery lines), the time is tagged with + "QT=", and it is measured from the time that the message starts to be + received, so it includes the reception time. + Version 4.43 ------------ diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS index e6af9f53e..4ca8ffbb7 100644 --- a/src/ACKNOWLEDGMENTS +++ b/src/ACKNOWLEDGMENTS @@ -1,4 +1,4 @@ -$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.5 2004/11/12 15:03:40 ph10 Exp $ +$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.6 2004/11/24 14:38:13 ph10 Exp $ EXIM ACKNOWLEDGEMENTS @@ -20,7 +20,7 @@ relatively small patches. Philip Hazel Lists created: 20 November 2002 -Last updated: 10 November 2004 +Last updated: 24 November 2004 THE OLD LIST @@ -85,6 +85,7 @@ Brian Candler Use h_errno for gethostbyname() Several minor fixes and suggestions Oliver Cook Suggested patch for exigrep & rejected messages Patch to add sender/host info to local_scan() rejects + Suggested patch to add queue time to "Completed" Jennifer Corley Designing the new Exim logo John Dalbec Patch for quota_warn_threshold bug Vivek Dasmohapatra Suggested patch for CRL support diff --git a/src/src/deliver.c b/src/src/deliver.c index 2bf141c16..b2e9ea58c 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/deliver.c,v 1.2 2004/11/18 10:35:19 ph10 Exp $ */ +/* $Cambridge: exim/src/src/deliver.c,v 1.3 2004/11/24 14:38:13 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -6315,14 +6315,21 @@ if (addr_defer == NULL) } /* Remove the two message files. */ - + sprintf(CS spoolname, "%s/input/%s/%s-D", spool_directory, message_subdir, id); if (Uunlink(spoolname) < 0) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s", spoolname); sprintf(CS spoolname, "%s/input/%s/%s-H", spool_directory, message_subdir, id); if (Uunlink(spoolname) < 0) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s", spoolname); - log_write(0, LOG_MAIN, "Completed"); + + /* Log the end of this message, with queue time if requested. */ + + if ((log_extra_selector & LX_queue_time_overall) != 0) + log_write(0, LOG_MAIN, "Completed QT=%s", + readconf_printtime(time(NULL) - received_time)); + else + log_write(0, LOG_MAIN, "Completed"); } /* If there are deferred addresses, we are keeping this message because it is diff --git a/src/src/globals.c b/src/src/globals.c index 3ea8d7d20..53a9f0a00 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/globals.c,v 1.6 2004/11/10 10:29:56 ph10 Exp $ */ +/* $Cambridge: exim/src/src/globals.c,v 1.7 2004/11/24 14:38:13 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -601,6 +601,7 @@ bit_table log_options[] = { { US"outgoing_port", LX_outgoing_port }, { US"queue_run", L_queue_run }, { US"queue_time", LX_queue_time }, + { US"queue_time_overall", LX_queue_time_overall }, { US"received_recipients", LX_received_recipients }, { US"received_sender", LX_received_sender }, { US"rejected_header", LX_rejected_header }, diff --git a/src/src/macros.h b/src/src/macros.h index bc685dac8..3b4407851 100644 --- a/src/src/macros.h +++ b/src/src/macros.h @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/macros.h,v 1.2 2004/11/04 10:42:11 ph10 Exp $ */ +/* $Cambridge: exim/src/src/macros.h,v 1.3 2004/11/24 14:38:13 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -361,16 +361,17 @@ only in the name table to set all options in both bit maps. */ #define LX_incoming_port 0x80000020 #define LX_outgoing_port 0x80000040 #define LX_queue_time 0x80000080 -#define LX_received_sender 0x80000100 -#define LX_received_recipients 0x80000200 -#define LX_rejected_header 0x80000400 -#define LX_return_path_on_delivery 0x80000800 -#define LX_sender_on_delivery 0x80001000 -#define LX_smtp_confirmation 0x80002000 -#define LX_subject 0x80004000 -#define LX_tls_certificate_verified 0x80008000 -#define LX_tls_cipher 0x80010000 -#define LX_tls_peerdn 0x80020000 +#define LX_queue_time_overall 0x80000100 +#define LX_received_sender 0x80000200 +#define LX_received_recipients 0x80000400 +#define LX_rejected_header 0x80000800 +#define LX_return_path_on_delivery 0x80001000 +#define LX_sender_on_delivery 0x80002000 +#define LX_smtp_confirmation 0x80004000 +#define LX_subject 0x80008000 +#define LX_tls_certificate_verified 0x80010000 +#define LX_tls_cipher 0x80020000 +#define LX_tls_peerdn 0x80040000 #define L_default (L_connection_reject | \ L_delay_delivery | \