From: Wietse Venema Date: Fri, 4 Nov 2005 05:00:00 +0000 (-0500) Subject: postfix-2.3-20051104 X-Git-Tag: v2.3-RC1~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=867787eb3c4b1e42492b9dc1531b717e99c29dd8;p=thirdparty%2Fpostfix.git postfix-2.3-20051104 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index fc583f8eb..b40bd193e 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -11277,13 +11277,14 @@ Apologies for any names omitted. Completion of support for time stamps from different stages of message delivery. The information is now logged as "delays=a/b/c/d" where a=time before queue manager, b=time - in queue manager, c=connection setup time, d=message - transmission time. Unlike Victor's example which used time - differences, this implementation uses absolute times. The - decision of what numbers to subtract actually depends on - program history, so we want to do it in one place. Files: - global/log_adhoc.c, smtp/smtp_connect.c, smtp/smtp_proto.c, - smtp/smtp_trouble.c, lmtp/lmtp_proto.c, lmtp/lmtp_trouble.c. + in queue manager, c=connection setup including HELO and + TLS, d=message transmission time. Unlike Victor's example + which used time differences, this implementation uses + absolute times. The decision of what numbers to subtract + actually depends on program history, so we want to do it + in one place. Files: global/log_adhoc.c, smtp/smtp_connect.c, + smtp/smtp_proto.c, smtp/smtp_trouble.c, lmtp/lmtp_proto.c, + lmtp/lmtp_trouble.c. 20051103 @@ -11294,6 +11295,13 @@ Apologies for any names omitted. second. Files: *qmgr/qmgr_deliver.c, global/deliver_request.c, global/log_adhoc.c. +20051104 + + New parameter delay_logging_time_resolution (default: 10000 + microseconds, or 0.01 second) that controls the detail in + the new "delays=a/b/c/d" logging. Specify a power of 10 + in the range from 1 to 100000. File: global/log_adhoc.c. + Open problems: Is it safe to cache a connection after it has been used diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index fa4d681c0..cdc3fa4eb 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -42,7 +42,7 @@ Postfix logfile records. detailed logging of delays in various stages of message delivery. Postfix logs additional delay information as "delays=a/b/c/d" where a=time before queue manager, b=time in queue manager, c=connection -setup time, d=message transmission time. +setup time including HELO and TLS, d=message transmission time. - Logging of the connection reuse count when SMTP connections are used for more than one message delivery. This information is needed @@ -50,6 +50,18 @@ because Postfix can now reuse connections hundreds of times or more, and can help to diagnose interoperability problems with servers that suffer from memory leaks or other resource leaks. +At this point the Postfix logging for a recipient looks like this: + + Nov 3 16:04:31 myname postfix/smtp[30840]: 19B6B2900FE: + to=, orig_to=, + relay=mail.example.com[1.2.3.4], conn_use=2, delay=0, + delays=0/0.01/0.05/0.1, dsn=2.0.0, status=sent (250 2.0.0 Ok) + +The following two logfile fields may or may not be present: + + orig_to This is omitted when the address did not change. + conn_use This is omitted when a connection is used once. + Incompatibility with snapshot 20051026 ====================================== diff --git a/postfix/html/cleanup.8.html b/postfix/html/cleanup.8.html index a0b5b8964..11c472408 100644 --- a/postfix/html/cleanup.8.html +++ b/postfix/html/cleanup.8.html @@ -322,6 +322,11 @@ CLEANUP(8) CLEANUP(8) handle a request before it is terminated by a built-in watchdog timer. + delay_logging_time_resolution (10000) + The time resolution (microseconds) of the sub-sec- + ond delay values that are logged for subsequent + message delivery stages. + delay_warning_time (0h) The time after which the sender receives the mes- sage headers of mail that is still queued. diff --git a/postfix/html/discard.8.html b/postfix/html/discard.8.html index 1106eba20..87a1d1f8b 100644 --- a/postfix/html/discard.8.html +++ b/postfix/html/discard.8.html @@ -63,6 +63,11 @@ DISCARD(8) DISCARD(8) handle a request before it is terminated by a built-in watchdog timer. + delay_logging_time_resolution (10000) + The time resolution (microseconds) of the sub-sec- + ond delay values that are logged for subsequent + message delivery stages. + double_bounce_sender (double-bounce) The sender address of postmaster notifications that are generated by the mail system. diff --git a/postfix/html/error.8.html b/postfix/html/error.8.html index c70ff5f01..0e085182e 100644 --- a/postfix/html/error.8.html +++ b/postfix/html/error.8.html @@ -73,6 +73,11 @@ ERROR(8) ERROR(8) handle a request before it is terminated by a built-in watchdog timer. + delay_logging_time_resolution (10000) + The time resolution (microseconds) of the sub-sec- + ond delay values that are logged for subsequent + message delivery stages. + double_bounce_sender (double-bounce) The sender address of postmaster notifications that are generated by the mail system. diff --git a/postfix/html/lmtp.8.html b/postfix/html/lmtp.8.html index 1802920c3..107312ea3 100644 --- a/postfix/html/lmtp.8.html +++ b/postfix/html/lmtp.8.html @@ -217,6 +217,11 @@ LMTP(8) LMTP(8) handle a request before it is terminated by a built-in watchdog timer. + delay_logging_time_resolution (10000) + The time resolution (microseconds) of the sub-sec- + ond delay values that are logged for subsequent + message delivery stages. + disable_dns_lookups (no) Disable DNS lookups in the Postfix SMTP and LMTP clients. diff --git a/postfix/html/local.8.html b/postfix/html/local.8.html index 344e4613b..42cb05ce9 100644 --- a/postfix/html/local.8.html +++ b/postfix/html/local.8.html @@ -521,6 +521,11 @@ LOCAL(8) LOCAL(8) handle a request before it is terminated by a built-in watchdog timer. + delay_logging_time_resolution (10000) + The time resolution (microseconds) of the sub-sec- + ond delay values that are logged for subsequent + message delivery stages. + export_environment (see 'postconf -d' output) The list of environment variables that a Postfix process will export to non-Postfix processes. diff --git a/postfix/html/oqmgr.8.html b/postfix/html/oqmgr.8.html index c0429054f..2c8de10eb 100644 --- a/postfix/html/oqmgr.8.html +++ b/postfix/html/oqmgr.8.html @@ -271,9 +271,14 @@ OQMGR(8) OQMGR(8) defer_transports (empty) The names of message delivery transports that - should not be delivered to unless someone issues + should not deliver mail unless someone issues "sendmail -q" or equivalent. + delay_logging_time_resolution (10000) + The time resolution (microseconds) of the sub-sec- + ond delay values that are logged for subsequent + message delivery stages. + helpful_warnings (yes) Log warnings about problematic configuration set- tings, and provide helpful suggestions. diff --git a/postfix/html/pipe.8.html b/postfix/html/pipe.8.html index 05599514e..bcb094041 100644 --- a/postfix/html/pipe.8.html +++ b/postfix/html/pipe.8.html @@ -368,6 +368,11 @@ PIPE(8) PIPE(8) handle a request before it is terminated by a built-in watchdog timer. + delay_logging_time_resolution (10000) + The time resolution (microseconds) of the sub-sec- + ond delay values that are logged for subsequent + message delivery stages. + export_environment (see 'postconf -d' output) The list of environment variables that a Postfix process will export to non-Postfix processes. diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index 107acd8fb..4533c2c5a 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -1900,6 +1900,34 @@ Example: + + +
delay_logging_time_resolution +(default: 10000)
+ +

The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. +Specify a power of 10 in the range from 1 to 100000.

+ +

The format of the "delays=a/b/c/d" logging is as follows:

+ +
    + +
  • a = time before the queue manager selected the queue file + +
  • b = time in queue manager + +
  • c = time in connection setup, including EHLO and TLS + +
  • d = time in message transfer + +
+ +

Delay values less than delay_logging_time_resolution are logged +as "0", while delay values less than 10s are logged with at most +two-digit precision.

+ +
delay_notice_recipient diff --git a/postfix/html/qmgr.8.html b/postfix/html/qmgr.8.html index 5ed0e0424..70a51b8d8 100644 --- a/postfix/html/qmgr.8.html +++ b/postfix/html/qmgr.8.html @@ -326,9 +326,14 @@ QMGR(8) QMGR(8) defer_transports (empty) The names of message delivery transports that - should not be delivered to unless someone issues + should not deliver mail unless someone issues "sendmail -q" or equivalent. + delay_logging_time_resolution (10000) + The time resolution (microseconds) of the sub-sec- + ond delay values that are logged for subsequent + message delivery stages. + helpful_warnings (yes) Log warnings about problematic configuration set- tings, and provide helpful suggestions. diff --git a/postfix/html/smtp.8.html b/postfix/html/smtp.8.html index b96588b21..76f5c6541 100644 --- a/postfix/html/smtp.8.html +++ b/postfix/html/smtp.8.html @@ -418,6 +418,11 @@ SMTP(8) SMTP(8) handle a request before it is terminated by a built-in watchdog timer. + delay_logging_time_resolution (10000) + The time resolution (microseconds) of the sub-sec- + ond delay values that are logged for subsequent + message delivery stages. + disable_dns_lookups (no) Disable DNS lookups in the Postfix SMTP and LMTP clients. diff --git a/postfix/html/virtual.8.html b/postfix/html/virtual.8.html index c2831d778..535d63fc3 100644 --- a/postfix/html/virtual.8.html +++ b/postfix/html/virtual.8.html @@ -238,6 +238,11 @@ VIRTUAL(8) VIRTUAL(8) handle a request before it is terminated by a built-in watchdog timer. + delay_logging_time_resolution (10000) + The time resolution (microseconds) of the sub-sec- + ond delay values that are logged for subsequent + message delivery stages. + ipc_timeout (3600s) The time limit for sending or receiving information over an internal communication channel. diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5 index b1395b898..5768d998b 100644 --- a/postfix/man/man5/postconf.5 +++ b/postfix/man/man5/postconf.5 @@ -1034,6 +1034,24 @@ defer_transports = smtp .fi .ad .ft R +.SH delay_logging_time_resolution (default: 10000) +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. +Specify a power of 10 in the range from 1 to 100000. +.PP +The format of the "delays=a/b/c/d" logging is as follows: +.IP \(bu +a = time before the queue manager selected the queue file +.IP \(bu +b = time in queue manager +.IP \(bu +c = time in connection setup, including EHLO and TLS +.IP \(bu +d = time in message transfer +.PP +Delay values less than delay_logging_time_resolution are logged +as "0", while delay values less than 10s are logged with at most +two-digit precision. .SH delay_notice_recipient (default: postmaster) The recipient of postmaster notifications with the message headers of mail that cannot be delivered within $delay_warning_time time diff --git a/postfix/man/man8/cleanup.8 b/postfix/man/man8/cleanup.8 index d86c2cd85..3ba92cf0f 100644 --- a/postfix/man/man8/cleanup.8 +++ b/postfix/man/man8/cleanup.8 @@ -270,6 +270,9 @@ configuration files. .IP "\fBdaemon_timeout (18000s)\fR" How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. +.IP "\fBdelay_logging_time_resolution (10000)\fR" +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. .IP "\fBdelay_warning_time (0h)\fR" The time after which the sender receives the message headers of mail that is still queued. diff --git a/postfix/man/man8/discard.8 b/postfix/man/man8/discard.8 index 1ede41979..aa0cfca19 100644 --- a/postfix/man/man8/discard.8 +++ b/postfix/man/man8/discard.8 @@ -64,6 +64,9 @@ configuration files. .IP "\fBdaemon_timeout (18000s)\fR" How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. +.IP "\fBdelay_logging_time_resolution (10000)\fR" +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. .IP "\fBdouble_bounce_sender (double-bounce)\fR" The sender address of postmaster notifications that are generated by the mail system. diff --git a/postfix/man/man8/error.8 b/postfix/man/man8/error.8 index 62804888a..a63044145 100644 --- a/postfix/man/man8/error.8 +++ b/postfix/man/man8/error.8 @@ -71,6 +71,9 @@ configuration files. .IP "\fBdaemon_timeout (18000s)\fR" How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. +.IP "\fBdelay_logging_time_resolution (10000)\fR" +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. .IP "\fBdouble_bounce_sender (double-bounce)\fR" The sender address of postmaster notifications that are generated by the mail system. diff --git a/postfix/man/man8/lmtp.8 b/postfix/man/man8/lmtp.8 index 8f2202039..a967cd08f 100644 --- a/postfix/man/man8/lmtp.8 +++ b/postfix/man/man8/lmtp.8 @@ -200,6 +200,9 @@ configuration files. .IP "\fBdaemon_timeout (18000s)\fR" How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. +.IP "\fBdelay_logging_time_resolution (10000)\fR" +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. .IP "\fBdisable_dns_lookups (no)\fR" Disable DNS lookups in the Postfix SMTP and LMTP clients. .IP "\fBipc_timeout (3600s)\fR" diff --git a/postfix/man/man8/local.8 b/postfix/man/man8/local.8 index c5fb993bd..562098ffc 100644 --- a/postfix/man/man8/local.8 +++ b/postfix/man/man8/local.8 @@ -511,6 +511,9 @@ configuration files. .IP "\fBdaemon_timeout (18000s)\fR" How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. +.IP "\fBdelay_logging_time_resolution (10000)\fR" +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. .IP "\fBexport_environment (see 'postconf -d' output)\fR" The list of environment variables that a Postfix process will export to non-Postfix processes. diff --git a/postfix/man/man8/oqmgr.8 b/postfix/man/man8/oqmgr.8 index b7f7c0ce4..62a715c3d 100644 --- a/postfix/man/man8/oqmgr.8 +++ b/postfix/man/man8/oqmgr.8 @@ -253,8 +253,11 @@ configuration files. How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. .IP "\fBdefer_transports (empty)\fR" -The names of message delivery transports that should not be delivered -to unless someone issues "\fBsendmail -q\fR" or equivalent. +The names of message delivery transports that should not deliver mail +unless someone issues "\fBsendmail -q\fR" or equivalent. +.IP "\fBdelay_logging_time_resolution (10000)\fR" +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. .IP "\fBhelpful_warnings (yes)\fR" Log warnings about problematic configuration settings, and provide helpful suggestions. diff --git a/postfix/man/man8/pipe.8 b/postfix/man/man8/pipe.8 index 9e4dbc660..4661ff376 100644 --- a/postfix/man/man8/pipe.8 +++ b/postfix/man/man8/pipe.8 @@ -320,6 +320,9 @@ configuration files. .IP "\fBdaemon_timeout (18000s)\fR" How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. +.IP "\fBdelay_logging_time_resolution (10000)\fR" +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. .IP "\fBexport_environment (see 'postconf -d' output)\fR" The list of environment variables that a Postfix process will export to non-Postfix processes. diff --git a/postfix/man/man8/qmgr.8 b/postfix/man/man8/qmgr.8 index f187bdb33..150f03913 100644 --- a/postfix/man/man8/qmgr.8 +++ b/postfix/man/man8/qmgr.8 @@ -292,8 +292,11 @@ configuration files. How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. .IP "\fBdefer_transports (empty)\fR" -The names of message delivery transports that should not be delivered -to unless someone issues "\fBsendmail -q\fR" or equivalent. +The names of message delivery transports that should not deliver mail +unless someone issues "\fBsendmail -q\fR" or equivalent. +.IP "\fBdelay_logging_time_resolution (10000)\fR" +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. .IP "\fBhelpful_warnings (yes)\fR" Log warnings about problematic configuration settings, and provide helpful suggestions. diff --git a/postfix/man/man8/smtp.8 b/postfix/man/man8/smtp.8 index 6ad4bc411..d4691ded2 100644 --- a/postfix/man/man8/smtp.8 +++ b/postfix/man/man8/smtp.8 @@ -340,6 +340,9 @@ configuration files. .IP "\fBdaemon_timeout (18000s)\fR" How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. +.IP "\fBdelay_logging_time_resolution (10000)\fR" +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. .IP "\fBdisable_dns_lookups (no)\fR" Disable DNS lookups in the Postfix SMTP and LMTP clients. .IP "\fBfallback_relay (empty)\fR" diff --git a/postfix/man/man8/virtual.8 b/postfix/man/man8/virtual.8 index 37c68c7e0..4bf9f9b8b 100644 --- a/postfix/man/man8/virtual.8 +++ b/postfix/man/man8/virtual.8 @@ -245,6 +245,9 @@ configuration files. .IP "\fBdaemon_timeout (18000s)\fR" How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. +.IP "\fBdelay_logging_time_resolution (10000)\fR" +The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. .IP "\fBipc_timeout (3600s)\fR" The time limit for sending or receiving information over an internal communication channel. diff --git a/postfix/mantools/postlink b/postfix/mantools/postlink index ca87611f3..11960f7a4 100755 --- a/postfix/mantools/postlink +++ b/postfix/mantools/postlink @@ -139,6 +139,7 @@ while (<>) { s;\bdefer_code\b;$&;g; s;\bdefer_service_name\b;$&;g; s;\bdefer_transports\b;$&;g; + s;\bdelay_logging_time_resolution\b;$&;g; s;\bdelay_notice_recip[-]*\n* *[]*ient\b;$&;g; s;\bdelay_warning_time\b;$&;g; s;\bdeliver_lock_attempts\b;$&;g; diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index 00b60b9b8..e5169dbba 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -8649,3 +8649,27 @@ the name matches the client IP address. A client name is set to "unknown" when it cannot be looked up or verified, or when name lookup is disabled. Turning off name lookup reduces delays due to DNS lookup and increases the maximal inbound delivery rate.

+ +%PARAM delay_logging_time_resolution 10000 + +

The time resolution (microseconds) of the sub-second delay +values that are logged for subsequent message delivery stages. +Specify a power of 10 in the range from 1 to 100000.

+ +

The format of the "delays=a/b/c/d" logging is as follows:

+ +
    + +
  • a = time before the queue manager selected the queue file + +
  • b = time in queue manager + +
  • c = time in connection setup, including EHLO and TLS + +
  • d = time in message transfer + +
+ +

Delay values less than delay_logging_time_resolution are logged +as "0", while delay values less than 10s are logged with at most +two-digit precision.

diff --git a/postfix/src/cleanup/cleanup.c b/postfix/src/cleanup/cleanup.c index 48a1a5c3a..3c5a98bc3 100644 --- a/postfix/src/cleanup/cleanup.c +++ b/postfix/src/cleanup/cleanup.c @@ -242,6 +242,9 @@ /* .IP "\fBdaemon_timeout (18000s)\fR" /* How much time a Postfix daemon process may take to handle a /* request before it is terminated by a built-in watchdog timer. +/* .IP "\fBdelay_logging_time_resolution (10000)\fR" +/* The time resolution (microseconds) of the sub-second delay +/* values that are logged for subsequent message delivery stages. /* .IP "\fBdelay_warning_time (0h)\fR" /* The time after which the sender receives the message headers of /* mail that is still queued. diff --git a/postfix/src/discard/discard.c b/postfix/src/discard/discard.c index b2feeaeb2..ecd01a253 100644 --- a/postfix/src/discard/discard.c +++ b/postfix/src/discard/discard.c @@ -50,6 +50,9 @@ /* .IP "\fBdaemon_timeout (18000s)\fR" /* How much time a Postfix daemon process may take to handle a /* request before it is terminated by a built-in watchdog timer. +/* .IP "\fBdelay_logging_time_resolution (10000)\fR" +/* The time resolution (microseconds) of the sub-second delay +/* values that are logged for subsequent message delivery stages. /* .IP "\fBdouble_bounce_sender (double-bounce)\fR" /* The sender address of postmaster notifications that are generated /* by the mail system. diff --git a/postfix/src/error/error.c b/postfix/src/error/error.c index 11343129c..dbf7111e4 100644 --- a/postfix/src/error/error.c +++ b/postfix/src/error/error.c @@ -57,6 +57,9 @@ /* .IP "\fBdaemon_timeout (18000s)\fR" /* How much time a Postfix daemon process may take to handle a /* request before it is terminated by a built-in watchdog timer. +/* .IP "\fBdelay_logging_time_resolution (10000)\fR" +/* The time resolution (microseconds) of the sub-second delay +/* values that are logged for subsequent message delivery stages. /* .IP "\fBdouble_bounce_sender (double-bounce)\fR" /* The sender address of postmaster notifications that are generated /* by the mail system. diff --git a/postfix/src/global/Makefile.in b/postfix/src/global/Makefile.in index 27dda27a0..a03f2a014 100644 --- a/postfix/src/global/Makefile.in +++ b/postfix/src/global/Makefile.in @@ -882,6 +882,7 @@ log_adhoc.o: dsn.h log_adhoc.o: dsn_buf.h log_adhoc.o: log_adhoc.c log_adhoc.o: log_adhoc.h +log_adhoc.o: mail_params.h log_adhoc.o: msg_stats.h log_adhoc.o: recipient_list.h mail_addr.o: ../../include/stringops.h diff --git a/postfix/src/global/log_adhoc.c b/postfix/src/global/log_adhoc.c index ebb1ce193..7eb9d3648 100644 --- a/postfix/src/global/log_adhoc.c +++ b/postfix/src/global/log_adhoc.c @@ -67,6 +67,7 @@ /* Global library. */ #include +#include /* log_adhoc - ad-hoc logging */ @@ -163,13 +164,19 @@ void log_adhoc(const char *id, MSG_STATS *stats, RECIPIENT *recipient, if (stats->reuse_count > 0) vstring_sprintf_append(buf, ", conn_use=%d", stats->reuse_count + 1); +#define MILLION 1000000 +#define DMILLION ((double) MILLION) + #define PRETTY_FORMAT(b, x) \ do { \ - if ((x).tv_sec > 0 || (x).tv_usec < 10000) { \ - vstring_sprintf_append((b), "/%ld", (long) (x).tv_sec); \ + if ((x).tv_sec > 9 \ + || ((x).tv_sec == 0 && (x).tv_usec < var_delay_resolution)) { \ + vstring_sprintf_append((b), "/%ld", \ + (long) (x).tv_sec + ((x).tv_usec > (MILLION / 2))); \ } else { \ - vstring_sprintf_append((b), "/%.1g", \ - (x).tv_sec + (x).tv_usec / 1000000.0); \ + vstring_sprintf_append((b), "/%.2g", \ + (x).tv_sec + ((x).tv_usec / var_delay_resolution) \ + * (var_delay_resolution / DMILLION)); \ } \ } while (0) diff --git a/postfix/src/global/mail_params.c b/postfix/src/global/mail_params.c index 8f8873f42..bd7729bad 100644 --- a/postfix/src/global/mail_params.c +++ b/postfix/src/global/mail_params.c @@ -104,6 +104,7 @@ /* int var_strict_encoding; /* int var_verify_neg_cache; /* int var_oldlog_compat; +/* int var_delay_resolution; /* /* void mail_params_init() /* @@ -298,6 +299,7 @@ int var_strict_8bit_body; int var_strict_encoding; int var_verify_neg_cache; int var_oldlog_compat; +int var_delay_resolution; const char null_format_string[1] = ""; @@ -561,6 +563,7 @@ void mail_params_init() VAR_SMTP_TLS_LOGLEVEL, DEF_SMTP_TLS_LOGLEVEL, &var_smtp_tls_loglevel, 0, 0, VAR_TLS_DAEMON_RAND_BYTES, DEF_TLS_DAEMON_RAND_BYTES, &var_tls_daemon_rand_bytes, 1, 0, #endif + VAR_DELAY_RESOLUTION, DEF_DELAY_RESOLUTION, &var_delay_resolution, MIN_DELAY_RESOLUTION, MAX_DELAY_RESOLUTION, 0, }; static CONFIG_TIME_TABLE time_defaults[] = { diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index da7930180..bb895ea20 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -2388,6 +2388,15 @@ extern char *var_msg_strip_chars; #define DEF_FROZEN_DELIVERED 1 extern bool var_frozen_delivered; + /* + * Delay logging time resolution. + */ +#define VAR_DELAY_RESOLUTION "delay_logging_time_resolution" +#define MAX_DELAY_RESOLUTION 100000 +#define DEF_DELAY_RESOLUTION 10000 +#define MIN_DELAY_RESOLUTION 1 +extern int var_delay_resolution; + /* LICENSE /* .ad /* .fi diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 274e921fd..16ea26f21 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20051103" +#define MAIL_RELEASE_DATE "20051104" #define MAIL_VERSION_NUMBER "2.3" #ifdef SNAPSHOT diff --git a/postfix/src/global/msg_stats_print.c b/postfix/src/global/msg_stats_print.c index cffc2f1d4..5765e3e33 100644 --- a/postfix/src/global/msg_stats_print.c +++ b/postfix/src/global/msg_stats_print.c @@ -4,7 +4,7 @@ /* SUMMARY /* write MSG_STATS structure to stream /* SYNOPSIS -/* #include +/* #include /* /* int msg_stats_print(print_fn, stream, flags, ptr) /* ATTR_PRINT_MASTER_FN print_fn; @@ -12,9 +12,10 @@ /* int flags; /* void *ptr; /* DESCRIPTION -/* msg_stats_print() writes a MSG_STATS structure to the named stream using -/* the specified attribute print routine. msg_stats_print() is meant -/* to be passed as a call-back to attr_print(), thusly: +/* msg_stats_print() writes an MSG_STATS structure to the named +/* stream using the specified attribute print routine. +/* msg_stats_print() is meant to be passed as a call-back to +/* attr_print(), thusly: /* /* ... ATTR_PRINT_FUNC, msg_stats_print, (void *) stats, ... /* DIAGNOSTICS diff --git a/postfix/src/global/msg_stats_scan.c b/postfix/src/global/msg_stats_scan.c index bc7d3c4fb..cff239032 100644 --- a/postfix/src/global/msg_stats_scan.c +++ b/postfix/src/global/msg_stats_scan.c @@ -12,9 +12,9 @@ /* int flags; /* void *ptr; /* DESCRIPTION -/* msg_stats_scan() reads a MSG_STATS from the named stream using the -/* specified attribute scan routine. msg_stats_scan() is meant -/* to be passed as a call-back to attr_scan(), thusly: +/* msg_stats_scan() reads an MSG_STATS from the named stream +/* using the specified attribute scan routine. msg_stats_scan() +/* is meant to be passed as a call-back to attr_scan(), thusly: /* /* ... ATTR_SCAN_FUNC, msg_stats_scan, (void *) &stats, ... /* DIAGNOSTICS diff --git a/postfix/src/lmtp/lmtp.c b/postfix/src/lmtp/lmtp.c index f095c8a6d..c18ab7715 100644 --- a/postfix/src/lmtp/lmtp.c +++ b/postfix/src/lmtp/lmtp.c @@ -174,6 +174,9 @@ /* .IP "\fBdaemon_timeout (18000s)\fR" /* How much time a Postfix daemon process may take to handle a /* request before it is terminated by a built-in watchdog timer. +/* .IP "\fBdelay_logging_time_resolution (10000)\fR" +/* The time resolution (microseconds) of the sub-second delay +/* values that are logged for subsequent message delivery stages. /* .IP "\fBdisable_dns_lookups (no)\fR" /* Disable DNS lookups in the Postfix SMTP and LMTP clients. /* .IP "\fBipc_timeout (3600s)\fR" diff --git a/postfix/src/local/local.c b/postfix/src/local/local.c index d505469a1..e3b8373d7 100644 --- a/postfix/src/local/local.c +++ b/postfix/src/local/local.c @@ -469,6 +469,9 @@ /* .IP "\fBdaemon_timeout (18000s)\fR" /* How much time a Postfix daemon process may take to handle a /* request before it is terminated by a built-in watchdog timer. +/* .IP "\fBdelay_logging_time_resolution (10000)\fR" +/* The time resolution (microseconds) of the sub-second delay +/* values that are logged for subsequent message delivery stages. /* .IP "\fBexport_environment (see 'postconf -d' output)\fR" /* The list of environment variables that a Postfix process will export /* to non-Postfix processes. diff --git a/postfix/src/oqmgr/qmgr.c b/postfix/src/oqmgr/qmgr.c index 5fc49ffbc..5e16f7e79 100644 --- a/postfix/src/oqmgr/qmgr.c +++ b/postfix/src/oqmgr/qmgr.c @@ -219,8 +219,11 @@ /* How much time a Postfix daemon process may take to handle a /* request before it is terminated by a built-in watchdog timer. /* .IP "\fBdefer_transports (empty)\fR" -/* The names of message delivery transports that should not be delivered -/* to unless someone issues "\fBsendmail -q\fR" or equivalent. +/* The names of message delivery transports that should not deliver mail +/* unless someone issues "\fBsendmail -q\fR" or equivalent. +/* .IP "\fBdelay_logging_time_resolution (10000)\fR" +/* The time resolution (microseconds) of the sub-second delay +/* values that are logged for subsequent message delivery stages. /* .IP "\fBhelpful_warnings (yes)\fR" /* Log warnings about problematic configuration settings, and provide /* helpful suggestions. diff --git a/postfix/src/pipe/pipe.c b/postfix/src/pipe/pipe.c index 921f6e40e..8ea5e1695 100644 --- a/postfix/src/pipe/pipe.c +++ b/postfix/src/pipe/pipe.c @@ -298,6 +298,9 @@ /* .IP "\fBdaemon_timeout (18000s)\fR" /* How much time a Postfix daemon process may take to handle a /* request before it is terminated by a built-in watchdog timer. +/* .IP "\fBdelay_logging_time_resolution (10000)\fR" +/* The time resolution (microseconds) of the sub-second delay +/* values that are logged for subsequent message delivery stages. /* .IP "\fBexport_environment (see 'postconf -d' output)\fR" /* The list of environment variables that a Postfix process will export /* to non-Postfix processes. diff --git a/postfix/src/qmgr/qmgr.c b/postfix/src/qmgr/qmgr.c index 02907c604..e3efb58d9 100644 --- a/postfix/src/qmgr/qmgr.c +++ b/postfix/src/qmgr/qmgr.c @@ -254,8 +254,11 @@ /* How much time a Postfix daemon process may take to handle a /* request before it is terminated by a built-in watchdog timer. /* .IP "\fBdefer_transports (empty)\fR" -/* The names of message delivery transports that should not be delivered -/* to unless someone issues "\fBsendmail -q\fR" or equivalent. +/* The names of message delivery transports that should not deliver mail +/* unless someone issues "\fBsendmail -q\fR" or equivalent. +/* .IP "\fBdelay_logging_time_resolution (10000)\fR" +/* The time resolution (microseconds) of the sub-second delay +/* values that are logged for subsequent message delivery stages. /* .IP "\fBhelpful_warnings (yes)\fR" /* Log warnings about problematic configuration settings, and provide /* helpful suggestions. diff --git a/postfix/src/smtp/smtp.c b/postfix/src/smtp/smtp.c index bf124e6ce..377d9cf13 100644 --- a/postfix/src/smtp/smtp.c +++ b/postfix/src/smtp/smtp.c @@ -308,6 +308,9 @@ /* .IP "\fBdaemon_timeout (18000s)\fR" /* How much time a Postfix daemon process may take to handle a /* request before it is terminated by a built-in watchdog timer. +/* .IP "\fBdelay_logging_time_resolution (10000)\fR" +/* The time resolution (microseconds) of the sub-second delay +/* values that are logged for subsequent message delivery stages. /* .IP "\fBdisable_dns_lookups (no)\fR" /* Disable DNS lookups in the Postfix SMTP and LMTP clients. /* .IP "\fBfallback_relay (empty)\fR" diff --git a/postfix/src/virtual/virtual.c b/postfix/src/virtual/virtual.c index 89ca83351..928a91006 100644 --- a/postfix/src/virtual/virtual.c +++ b/postfix/src/virtual/virtual.c @@ -211,6 +211,9 @@ /* .IP "\fBdaemon_timeout (18000s)\fR" /* How much time a Postfix daemon process may take to handle a /* request before it is terminated by a built-in watchdog timer. +/* .IP "\fBdelay_logging_time_resolution (10000)\fR" +/* The time resolution (microseconds) of the sub-second delay +/* values that are logged for subsequent message delivery stages. /* .IP "\fBipc_timeout (3600s)\fR" /* The time limit for sending or receiving information over an internal /* communication channel.