]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3-20051108
authorWietse Venema <wietse@porcupine.org>
Tue, 8 Nov 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:31:39 +0000 (06:31 +0000)
57 files changed:
postfix/HISTORY
postfix/README_FILES/ADDRESS_REWRITING_README
postfix/html/ADDRESS_REWRITING_README.html
postfix/html/cleanup.8.html
postfix/html/discard.8.html
postfix/html/error.8.html
postfix/html/lmtp.8.html
postfix/html/local.8.html
postfix/html/oqmgr.8.html
postfix/html/pipe.8.html
postfix/html/postconf.5.html
postfix/html/qmgr.8.html
postfix/html/smtp.8.html
postfix/html/virtual.8.html
postfix/man/man5/postconf.5
postfix/man/man8/cleanup.8
postfix/man/man8/discard.8
postfix/man/man8/error.8
postfix/man/man8/lmtp.8
postfix/man/man8/local.8
postfix/man/man8/oqmgr.8
postfix/man/man8/pipe.8
postfix/man/man8/qmgr.8
postfix/man/man8/smtp.8
postfix/man/man8/virtual.8
postfix/mantools/postlink
postfix/pflogsumm-conn-delays-dsn-patch [new file with mode: 0644]
postfix/pflogsumm-dsn-patch [deleted file]
postfix/proto/ADDRESS_REWRITING_README.html
postfix/proto/postconf.proto
postfix/src/cleanup/cleanup.c
postfix/src/cleanup/cleanup_message.c
postfix/src/discard/discard.c
postfix/src/error/error.c
postfix/src/global/Makefile.in
postfix/src/global/log_adhoc.c
postfix/src/global/mail_params.c
postfix/src/global/mail_params.h
postfix/src/global/mail_queue.c
postfix/src/global/mail_queue.h
postfix/src/global/mail_stream.c
postfix/src/global/mail_stream.h
postfix/src/global/mail_version.h
postfix/src/lmtp/lmtp.c
postfix/src/local/local.c
postfix/src/oqmgr/qmgr.c
postfix/src/pipe/pipe.c
postfix/src/qmgr/qmgr.c
postfix/src/smtp/smtp.c
postfix/src/util/Makefile.in
postfix/src/util/format_tv.c [new file with mode: 0644]
postfix/src/util/format_tv.h [new file with mode: 0644]
postfix/src/util/format_tv.in [new file with mode: 0644]
postfix/src/util/format_tv.ref [new file with mode: 0644]
postfix/src/util/vstream.c
postfix/src/util/vstream.h
postfix/src/virtual/virtual.c

index 923d9d9c761de8a3a3ea10743a882fe3b4a02ae4..571aa23c556b4ad2c6872a03083fe29784fef654 100644 (file)
@@ -11301,6 +11301,7 @@ Apologies for any names omitted.
        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.
+       Parameter renamed 20051108.
 
 20051105
 
@@ -11314,7 +11315,7 @@ Apologies for any names omitted.
        smtpd/smtpd.c, qmqpd/qmqpd.c, *qmgr/qmgr_message.c,
        *qmgr/qmgr_active.c, local/forward.c.
 
-20061106
+20051106
 
        The SMTP client logs the remote server port in the form of
        relay=hostname[hostaddr]:port to the local maillog file.
@@ -11327,6 +11328,20 @@ Apologies for any names omitted.
        with a few simple macros, to make future changes in time
        representation less painful.
 
+20051108
+
+       Cleanup: eliminated floating point operations from the
+       ad-hoc delay logging code. Files: util/format_tv.[hc],
+       global/log_adhoc.c.
+
+       The delay logging resolution is now controlled with the
+       delay_logging_resolution_limit parameter, which specifies
+       the maximal number of digits after the decimal point.
+
+       Bugfix: under unlikely conditions two messages could get
+       the same message ID. Found by Victor. Files: global/mail_stream.c,
+       global/mail_queue.c.
+
 Open problems:
 
        "postsuper -r" no longer resets the message arrival time,
index f433ec3a5b98b05173cc801ec10241b6b609205d..20bf368d8c1463f70a9baf442ae65db7876043ad 100644 (file)
@@ -367,7 +367,7 @@ Example:
 
     /etc/postfix/master.cf:
         :10026      inet  n       -       n       -       -       smtpd
-            -o receive_override_options=no_address_mapping
+            -o receive_override_options=no_address_mappings
 
 Note: do not specify whitespace around the "=" here.
 
@@ -440,7 +440,7 @@ Example:
 
     /etc/postfix/master.cf:
         :10026      inet  n       -       n       -       -       smtpd
-            -o receive_override_options=no_address_mapping
+            -o receive_override_options=nso_address_mapping
 
 Note: do not specify whitespace around the "=" here.
 
@@ -476,7 +476,7 @@ Example:
 
     /etc/postfix/master.cf:
         :10026      inet  n       -       n       -       -       smtpd
-            -o receive_override_options=no_address_mapping
+            -o receive_override_options=no_address_mappings
 
 Note: do not specify whitespace around the "=" here.
 
@@ -525,7 +525,7 @@ Example:
 
     /etc/postfix/master.cf:
         :10026      inet  n       -       n       -       -       smtpd
-            -o receive_override_options=no_address_mapping
+            -o receive_override_options=no_address_mappings
 
 Note: do not specify whitespace around the "=" here.
 
index 226d937beb5b2d40b94f082a231911beb3e443c1..f2dd917eb374d9cfc1b1056ad06dc59c232ec033 100644 (file)
@@ -603,7 +603,7 @@ in the master.cf file.  This feature is available in Postfix version
 <pre>
 /etc/postfix/master.cf:
     :10026      inet  n       -       n       -       -       smtpd
-        -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=no_address_mapping
+        -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=<a href="postconf.5.html#no_address_mappings">no_address_mappings</a>
 </pre>
 </blockquote>
 
@@ -702,7 +702,7 @@ Postfix version 2.1 and later. </p>
 <pre>
 /etc/postfix/master.cf:
     :10026      inet  n       -       n       -       -       smtpd
-        -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=no_address_mapping
+        -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=nso_address_mapping
 </pre>
 </blockquote>
 
@@ -752,7 +752,7 @@ is available in Postfix version 2.1 and later. </p>
 <pre>
 /etc/postfix/master.cf:
     :10026      inet  n       -       n       -       -       smtpd
-        -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=no_address_mapping
+        -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=<a href="postconf.5.html#no_address_mappings">no_address_mappings</a>
 </pre>
 </blockquote>
 
@@ -816,7 +816,7 @@ in the master.cf file.  This feature is available in Postfix version
 <pre>
 /etc/postfix/master.cf:
     :10026      inet  n       -       n       -       -       smtpd
-        -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=no_address_mapping
+        -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=<a href="postconf.5.html#no_address_mappings">no_address_mappings</a>
 </pre>
 </blockquote>
 
index 11c472408d8fbfc35f49cbb2eece2ea1f2573f98..a5f60db287c5df9fba230301b5f0749307cda67b 100644 (file)
@@ -322,13 +322,12 @@ CLEANUP(8)                                                          CLEANUP(8)
               handle  a  request  before  it  is  terminated by a
               built-in watchdog timer.
 
-       <b><a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> (10000)</b>
-              The time resolution (microseconds) of the  sub-sec-
-              ond  delay  values  that  are logged for subsequent
-              message delivery stages.
+       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
+              The maximal number  of  digits  after  the  decimal
+              point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a> (0h)</b>
-              The time after which the sender receives  the  mes-
+              The  time  after which the sender receives the mes-
               sage headers of mail that is still queued.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -336,12 +335,12 @@ CLEANUP(8)                                                          CLEANUP(8)
               over an internal communication channel.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The maximum amount of time  that  an  idle  Postfix
-              daemon  process  waits for the next service request
+              The  maximum  amount  of  time that an idle Postfix
+              daemon process waits for the next  service  request
               before exiting.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
-              The maximal number of connection requests before  a
+              The  maximal number of connection requests before a
               Postfix daemon process terminates.
 
        <b><a href="postconf.5.html#myhostname">myhostname</a> (see 'postconf -d' output)</b>
@@ -349,19 +348,19 @@ CLEANUP(8)                                                          CLEANUP(8)
 
        <b><a href="postconf.5.html#myorigin">myorigin</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
               The domain name that locally-posted mail appears to
-              come from, and that locally posted mail  is  deliv-
+              come  from,  and that locally posted mail is deliv-
               ered to.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The  process  ID  of  a  Postfix  command or daemon
+              The process ID  of  a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The process name of a  Postfix  command  or  daemon
+              The  process  name  of  a Postfix command or daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The  location of the Postfix top-level queue direc-
+              The location of the Postfix top-level queue  direc-
               tory.
 
        <b><a href="postconf.5.html#soft_bounce">soft_bounce</a> (no)</b>
@@ -372,14 +371,14 @@ CLEANUP(8)                                                          CLEANUP(8)
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The  mail  system  name  that  is  prepended to the
-              process name in syslog  records,  so  that  "smtpd"
+              The mail system  name  that  is  prepended  to  the
+              process  name  in  syslog  records, so that "smtpd"
               becomes, for example, "postfix/smtpd".
 
        Available in Postfix version 2.1 and later:
 
        <b><a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> (yes)</b>
-              Enable   support   for  the  X-Original-To  message
+              Enable  support  for  the   X-Original-To   message
               header.
 
 <b>FILES</b>
@@ -402,7 +401,7 @@ CLEANUP(8)                                                          CLEANUP(8)
        <a href="ADDRESS_REWRITING_README.html">ADDRESS_REWRITING_README</a> Postfix address manipulation
 
 <b>LICENSE</b>
-       The  Secure  Mailer  license must be distributed with this
+       The Secure Mailer license must be  distributed  with  this
        software.
 
 <b>AUTHOR(S)</b>
index 87a1d1f8b41443dbe045931d6fee6c475ceb8790..01fd6d4596281ecf9ab0dd0dc0bb46562468e4e1 100644 (file)
@@ -63,10 +63,9 @@ DISCARD(8)                                                          DISCARD(8)
               handle a request  before  it  is  terminated  by  a
               built-in watchdog timer.
 
-       <b><a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> (10000)</b>
-              The  time resolution (microseconds) of the sub-sec-
-              ond delay values that  are  logged  for  subsequent
-              message delivery stages.
+       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
+              The  maximal  number  of  digits  after the decimal
+              point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#double_bounce_sender">double_bounce_sender</a> (double-bounce)</b>
               The sender address of postmaster notifications that
@@ -77,32 +76,32 @@ DISCARD(8)                                                          DISCARD(8)
               over an internal communication channel.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The  maximum  amount  of  time that an idle Postfix
-              daemon process waits for the next  service  request
+              The maximum amount of time  that  an  idle  Postfix
+              daemon  process  waits for the next service request
               before exiting.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
-              The  maximal number of connection requests before a
+              The maximal number of connection requests before  a
               Postfix daemon process terminates.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The process ID  of  a  Postfix  command  or  daemon
+              The  process  ID  of  a  Postfix  command or daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The  process  name  of  a Postfix command or daemon
+              The process name of a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The location of the Postfix top-level queue  direc-
+              The  location of the Postfix top-level queue direc-
               tory.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The  mail  system  name  that  is  prepended to the
-              process name in syslog  records,  so  that  "smtpd"
+              The mail system  name  that  is  prepended  to  the
+              process  name  in  syslog  records, so that "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>SEE ALSO</b>
@@ -115,7 +114,7 @@ DISCARD(8)                                                          DISCARD(8)
        syslogd(8), system logging
 
 <b>LICENSE</b>
-       The  Secure  Mailer  license must be distributed with this
+       The Secure Mailer license must be  distributed  with  this
        software.
 
 <b>HISTORY</b>
index 0e085182ec4a7de0d57563a4e9b497680f1eeec5..338b6c9fd037d8cab6e95808bb1be974c9ab8b13 100644 (file)
@@ -73,10 +73,9 @@ ERROR(8)                                                              ERROR(8)
               handle a request  before  it  is  terminated  by  a
               built-in watchdog timer.
 
-       <b><a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> (10000)</b>
-              The  time resolution (microseconds) of the sub-sec-
-              ond delay values that  are  logged  for  subsequent
-              message delivery stages.
+       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
+              The  maximal  number  of  digits  after the decimal
+              point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#double_bounce_sender">double_bounce_sender</a> (double-bounce)</b>
               The sender address of postmaster notifications that
@@ -87,36 +86,36 @@ ERROR(8)                                                              ERROR(8)
               over an internal communication channel.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The  maximum  amount  of  time that an idle Postfix
-              daemon process waits for the next  service  request
+              The maximum amount of time  that  an  idle  Postfix
+              daemon  process  waits for the next service request
               before exiting.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
-              The  maximal number of connection requests before a
+              The maximal number of connection requests before  a
               Postfix daemon process terminates.
 
        <b><a href="postconf.5.html#notify_classes">notify_classes</a> (resource, software)</b>
-              The list of error classes that are reported to  the
+              The  list of error classes that are reported to the
               postmaster.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The  process  ID  of  a  Postfix  command or daemon
+              The process ID  of  a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The process name of a  Postfix  command  or  daemon
+              The  process  name  of  a Postfix command or daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The  location of the Postfix top-level queue direc-
+              The location of the Postfix top-level queue  direc-
               tory.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The mail system  name  that  is  prepended  to  the
-              process  name  in  syslog  records, so that "smtpd"
+              The  mail  system  name  that  is  prepended to the
+              process name in syslog  records,  so  that  "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>SEE ALSO</b>
@@ -129,7 +128,7 @@ ERROR(8)                                                              ERROR(8)
        syslogd(8), system logging
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index 107312ea31b1678b4674fdaa73865c94287033cf..a8b4ab2cdf90cb08f2daf1e1263586898979989c 100644 (file)
@@ -217,13 +217,12 @@ LMTP(8)                                                                LMTP(8)
               handle  a  request  before  it  is  terminated by a
               built-in watchdog timer.
 
-       <b><a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> (10000)</b>
-              The time resolution (microseconds) of the  sub-sec-
-              ond  delay  values  that  are logged for subsequent
-              message delivery stages.
+       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
+              The maximal number  of  digits  after  the  decimal
+              point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#disable_dns_lookups">disable_dns_lookups</a> (no)</b>
-              Disable DNS lookups in the Postfix  SMTP  and  LMTP
+              Disable  DNS  lookups  in the Postfix SMTP and LMTP
               clients.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -231,36 +230,36 @@ LMTP(8)                                                                LMTP(8)
               over an internal communication channel.
 
        <b><a href="postconf.5.html#lmtp_tcp_port">lmtp_tcp_port</a> (24)</b>
-              The default TCP port that the Postfix  LMTP  client
+              The  default  TCP port that the Postfix LMTP client
               connects to.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The  maximum  amount  of  time that an idle Postfix
-              daemon process waits for the next  service  request
+              The maximum amount of time  that  an  idle  Postfix
+              daemon  process  waits for the next service request
               before exiting.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
-              The  maximal number of connection requests before a
+              The maximal number of connection requests before  a
               Postfix daemon process terminates.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The process ID  of  a  Postfix  command  or  daemon
+              The  process  ID  of  a  Postfix  command or daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The  process  name  of  a Postfix command or daemon
+              The process name of a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The location of the Postfix top-level queue  direc-
+              The  location of the Postfix top-level queue direc-
               tory.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The  mail  system  name  that  is  prepended to the
-              process name in syslog  records,  so  that  "smtpd"
+              The mail system  name  that  is  prepended  to  the
+              process  name  in  syslog  records, so that "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>SEE ALSO</b>
@@ -277,7 +276,7 @@ LMTP(8)                                                                LMTP(8)
        <a href="VIRTUAL_README.html">VIRTUAL_README</a>, virtual delivery agent howto
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index 42cb05ce9e41db44d3e17194d2bc8cf5b74ab7a0..35a836dbec61a78c5328721530612ae4c7cc8fa3 100644 (file)
@@ -521,13 +521,12 @@ LOCAL(8)                                                              LOCAL(8)
               handle a request  before  it  is  terminated  by  a
               built-in watchdog timer.
 
-       <b><a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> (10000)</b>
-              The  time resolution (microseconds) of the sub-sec-
-              ond delay values that  are  logged  for  subsequent
-              message delivery stages.
+       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
+              The  maximal  number  of  digits  after the decimal
+              point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#export_environment">export_environment</a> (see 'postconf -d' output)</b>
-              The  list  of  environment variables that a Postfix
+              The list of environment variables  that  a  Postfix
               process will export to non-Postfix processes.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -535,38 +534,38 @@ LOCAL(8)                                                              LOCAL(8)
               over an internal communication channel.
 
        <b><a href="postconf.5.html#local_command_shell">local_command_shell</a> (empty)</b>
-              Optional  shell  program  for  <a href="local.8.html"><b>local</b>(8)</a> delivery to
+              Optional shell program  for  <a href="local.8.html"><b>local</b>(8)</a>  delivery  to
               non-Postfix command.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The maximum amount of time  that  an  idle  Postfix
-              daemon  process  waits for the next service request
+              The  maximum  amount  of  time that an idle Postfix
+              daemon process waits for the next  service  request
               before exiting.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
-              The maximal number of connection requests before  a
+              The  maximal number of connection requests before a
               Postfix daemon process terminates.
 
        <b><a href="postconf.5.html#prepend_delivered_header">prepend_delivered_header</a> (command, file, forward)</b>
-              The  message  delivery  contexts  where the Postfix
-              <a href="local.8.html"><b>local</b>(8)</a> delivery agent  prepends  a  Delivered-To:
-              message  header  with the address that the mail was
+              The message delivery  contexts  where  the  Postfix
+              <a href="local.8.html"><b>local</b>(8)</a>  delivery  agent  prepends a Delivered-To:
+              message header with the address that the  mail  was
               delivered to.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The process ID  of  a  Postfix  command  or  daemon
+              The  process  ID  of  a  Postfix  command or daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The  process  name  of  a Postfix command or daemon
+              The process name of a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a> (canonical, virtual)</b>
-              What address lookup tables copy an  address  exten-
+              What  address  lookup tables copy an address exten-
               sion from the lookup key to the lookup result.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The  location of the Postfix top-level queue direc-
+              The location of the Postfix top-level queue  direc-
               tory.
 
        <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b>
@@ -574,15 +573,15 @@ LOCAL(8)                                                              LOCAL(8)
               sions (user+foo).
 
        <b><a href="postconf.5.html#require_home_directory">require_home_directory</a> (no)</b>
-              Whether  or  not a <a href="local.8.html"><b>local</b>(8)</a> recipient's home direc-
-              tory must exist before mail delivery is  attempted.
+              Whether or not a <a href="local.8.html"><b>local</b>(8)</a> recipient's  home  direc-
+              tory  must exist before mail delivery is attempted.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The  mail  system  name  that  is  prepended to the
-              process name in syslog  records,  so  that  "smtpd"
+              The mail system  name  that  is  prepended  to  the
+              process  name  in  syslog  records, so that "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>FILES</b>
@@ -602,14 +601,14 @@ LOCAL(8)                                                              LOCAL(8)
        syslogd(8), system logging
 
 <b>LICENSE</b>
-       The  Secure  Mailer  license must be distributed with this
+       The Secure Mailer license must be  distributed  with  this
        software.
 
 <b>HISTORY</b>
        The <b>Delivered-To:</b> message header appears in the <b>qmail</b> sys-
        tem by Daniel Bernstein.
 
-       The  <i>maildir</i>  structure  appears  in  the  <b>qmail</b> system by
+       The <i>maildir</i> structure  appears  in  the  <b>qmail</b>  system  by
        Daniel Bernstein.
 
 <b>AUTHOR(S)</b>
index 2c8de10eb6fb6564495f0d0a73fdd880f4aba1c7..6e25a01e7855b4ee43fa64527cee17a8dd2efa6e 100644 (file)
@@ -274,13 +274,12 @@ OQMGR(8)                                                              OQMGR(8)
               should  not  deliver  mail  unless  someone  issues
               "<b>sendmail -q</b>" or equivalent.
 
-       <b><a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> (10000)</b>
-              The time resolution (microseconds) of the  sub-sec-
-              ond  delay  values  that  are logged for subsequent
-              message delivery stages.
+       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
+              The maximal number  of  digits  after  the  decimal
+              point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#helpful_warnings">helpful_warnings</a> (yes)</b>
-              Log warnings about problematic  configuration  set-
+              Log  warnings  about problematic configuration set-
               tings, and provide helpful suggestions.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -288,23 +287,23 @@ OQMGR(8)                                                              OQMGR(8)
               over an internal communication channel.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The process ID  of  a  Postfix  command  or  daemon
+              The  process  ID  of  a  Postfix  command or daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The  process  name  of  a Postfix command or daemon
+              The process name of a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The location of the Postfix top-level queue  direc-
+              The  location of the Postfix top-level queue direc-
               tory.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The  mail  system  name  that  is  prepended to the
-              process name in syslog  records,  so  that  "smtpd"
+              The mail system  name  that  is  prepended  to  the
+              process  name  in  syslog  records, so that "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>FILES</b>
@@ -327,7 +326,7 @@ OQMGR(8)                                                              OQMGR(8)
        <a href="QSHAPE_README.html">QSHAPE_README</a>, Postfix queue analysis
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index bcb094041dc36a296508f9689eb0ce2d08e051d0..faa3c00f4890205415155d6959876f739692743d 100644 (file)
@@ -368,13 +368,12 @@ PIPE(8)                                                                PIPE(8)
               handle  a  request  before  it  is  terminated by a
               built-in watchdog timer.
 
-       <b><a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> (10000)</b>
-              The time resolution (microseconds) of the  sub-sec-
-              ond  delay  values  that  are logged for subsequent
-              message delivery stages.
+       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
+              The maximal number  of  digits  after  the  decimal
+              point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#export_environment">export_environment</a> (see 'postconf -d' output)</b>
-              The list of environment variables  that  a  Postfix
+              The  list  of  environment variables that a Postfix
               process will export to non-Postfix processes.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -386,24 +385,24 @@ PIPE(8)                                                                PIPE(8)
               and most Postfix daemon processes.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The  maximum  amount  of  time that an idle Postfix
-              daemon process waits for the next  service  request
+              The maximum amount of time  that  an  idle  Postfix
+              daemon  process  waits for the next service request
               before exiting.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
-              The  maximal number of connection requests before a
+              The maximal number of connection requests before  a
               Postfix daemon process terminates.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The process ID  of  a  Postfix  command  or  daemon
+              The  process  ID  of  a  Postfix  command or daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The  process  name  of  a Postfix command or daemon
+              The process name of a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The location of the Postfix top-level queue  direc-
+              The  location of the Postfix top-level queue direc-
               tory.
 
        <b><a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> (empty)</b>
@@ -414,8 +413,8 @@ PIPE(8)                                                                PIPE(8)
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The mail system  name  that  is  prepended  to  the
-              process  name  in  syslog  records, so that "smtpd"
+              The  mail  system  name  that  is  prepended to the
+              process name in syslog  records,  so  that  "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>SEE ALSO</b>
@@ -427,7 +426,7 @@ PIPE(8)                                                                PIPE(8)
        syslogd(8), system logging
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index 4a0b822f4a1c70d682f7f34171f8f0ed1edd6494..7bea38b3a190c08310afb97db49bfb08b977e130 100644 (file)
@@ -1902,12 +1902,16 @@ Example:
 
 </DD>
 
-<DT><b><a name="delay_logging_time_resolution">delay_logging_time_resolution</a>
-(default: 10000)</b></DT><DD>
+<DT><b><a name="delay_logging_resolution_limit">delay_logging_resolution_limit</a>
+(default: 2)</b></DT><DD>
 
-<p> 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. </p>
+<p> The maximal number of digits after the decimal point when logging
+sub-second delay values.  Specify a number in the range 0..6.  </p>
+
+<p> Large delay values are rounded off to an integral number seconds;
+delay values below the <a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> are logged
+as "0", and small delay values are logged with at most two-digit
+precision.  </p>
 
 <p> The format of the "delays=a/b/c/d" logging is as follows: </p>
 
@@ -1923,9 +1927,7 @@ Specify a power of 10 in the range from 1 to 100000. </p>
 
 </ul>
 
-<p>  Delay values less than <a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> are logged
-as "0", while delay values less than 10s are logged with at most
-two-digit precision.  </p>
+<p> This feature is available in Postfix 2.3 and later.  </p>
 
 
 </DD>
index 70a51b8d8c08933882065b386a6c499c40b7b47f..e74a5817ae3c28db720cd62b118ef7e9f71da488 100644 (file)
@@ -329,13 +329,12 @@ QMGR(8)                                                                QMGR(8)
               should  not  deliver  mail  unless  someone  issues
               "<b>sendmail -q</b>" or equivalent.
 
-       <b><a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> (10000)</b>
-              The time resolution (microseconds) of the  sub-sec-
-              ond  delay  values  that  are logged for subsequent
-              message delivery stages.
+       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
+              The maximal number  of  digits  after  the  decimal
+              point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#helpful_warnings">helpful_warnings</a> (yes)</b>
-              Log warnings about problematic  configuration  set-
+              Log  warnings  about problematic configuration set-
               tings, and provide helpful suggestions.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -343,23 +342,23 @@ QMGR(8)                                                                QMGR(8)
               over an internal communication channel.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The process ID  of  a  Postfix  command  or  daemon
+              The  process  ID  of  a  Postfix  command or daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The  process  name  of  a Postfix command or daemon
+              The process name of a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The location of the Postfix top-level queue  direc-
+              The  location of the Postfix top-level queue direc-
               tory.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The  mail  system  name  that  is  prepended to the
-              process name in syslog  records,  so  that  "smtpd"
+              The mail system  name  that  is  prepended  to  the
+              process  name  in  syslog  records, so that "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>FILES</b>
@@ -383,7 +382,7 @@ QMGR(8)                                                                QMGR(8)
        <a href="QSHAPE_README.html">QSHAPE_README</a>, Postfix queue analysis
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index 76f5c65419031d6c8eb65dbd4df7db084b83ca76..e01c21b07967810e395827997d004340773ee905 100644 (file)
@@ -418,17 +418,16 @@ SMTP(8)                                                                SMTP(8)
               handle a request  before  it  is  terminated  by  a
               built-in watchdog timer.
 
-       <b><a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> (10000)</b>
-              The  time resolution (microseconds) of the sub-sec-
-              ond delay values that  are  logged  for  subsequent
-              message delivery stages.
+       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
+              The  maximal  number  of  digits  after the decimal
+              point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#disable_dns_lookups">disable_dns_lookups</a> (no)</b>
-              Disable  DNS  lookups  in the Postfix SMTP and LMTP
+              Disable DNS lookups in the Postfix  SMTP  and  LMTP
               clients.
 
        <b><a href="postconf.5.html#fallback_relay">fallback_relay</a> (empty)</b>
-              Optional list of relay hosts for SMTP  destinations
+              Optional  list of relay hosts for SMTP destinations
               that can't be found or that are unreachable.
 
        <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> (all)</b>
@@ -436,7 +435,7 @@ SMTP(8)                                                                SMTP(8)
               tem receives mail on.
 
        <b><a href="postconf.5.html#inet_protocols">inet_protocols</a> (ipv4)</b>
-              The Internet protocols Postfix will attempt to  use
+              The  Internet protocols Postfix will attempt to use
               when making or accepting connections.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
@@ -444,55 +443,55 @@ SMTP(8)                                                                SMTP(8)
               over an internal communication channel.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The maximum amount of time  that  an  idle  Postfix
-              daemon  process  waits for the next service request
+              The  maximum  amount  of  time that an idle Postfix
+              daemon process waits for the next  service  request
               before exiting.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
-              The maximal number of connection requests before  a
+              The  maximal number of connection requests before a
               Postfix daemon process terminates.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The  process  ID  of  a  Postfix  command or daemon
+              The process ID  of  a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The process name of a  Postfix  command  or  daemon
+              The  process  name  of  a Postfix command or daemon
               process.
 
        <b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> (empty)</b>
               The network interface addresses that this mail sys-
-              tem receives mail on by way of a proxy  or  network
+              tem  receives  mail on by way of a proxy or network
               address translation unit.
 
        <b><a href="postconf.5.html#smtp_bind_address">smtp_bind_address</a> (empty)</b>
               An optional numerical network address that the SMTP
-              client should bind to when making an  IPv4  connec-
+              client  should  bind to when making an IPv4 connec-
               tion.
 
        <b><a href="postconf.5.html#smtp_bind_address6">smtp_bind_address6</a> (empty)</b>
               An optional numerical network address that the SMTP
-              client should bind to when making an  IPv6  connec-
+              client  should  bind to when making an IPv6 connec-
               tion.
 
        <b><a href="postconf.5.html#smtp_helo_name">smtp_helo_name</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
-              The  hostname to send in the SMTP EHLO or HELO com-
+              The hostname to send in the SMTP EHLO or HELO  com-
               mand.
 
        <b><a href="postconf.5.html#smtp_host_lookup">smtp_host_lookup</a> (dns)</b>
-              What mechanisms when the SMTP client uses  to  look
+              What  mechanisms  when the SMTP client uses to look
               up a host's IP address.
 
        <b><a href="postconf.5.html#smtp_randomize_addresses">smtp_randomize_addresses</a> (yes)</b>
-              Randomize  the  order  of  equal-preference MX host
+              Randomize the order  of  equal-preference  MX  host
               addresses.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The mail system  name  that  is  prepended  to  the
-              process  name  in  syslog  records, so that "smtpd"
+              The  mail  system  name  that  is  prepended to the
+              process name in syslog  records,  so  that  "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>SEE ALSO</b>
@@ -510,7 +509,7 @@ SMTP(8)                                                                SMTP(8)
        <a href="TLS_README.html">TLS_README</a>, Postfix STARTTLS howto
 
 <b>LICENSE</b>
-       The  Secure  Mailer  license must be distributed with this
+       The Secure Mailer license must be  distributed  with  this
        software.
 
 <b>AUTHOR(S)</b>
index 535d63fc31a627ef45dbf144ab392be6e8ac475c..2af3c6a2dc6ca6c960541ef5f2ae4d489e97dd1d 100644 (file)
@@ -238,42 +238,41 @@ VIRTUAL(8)                                                          VIRTUAL(8)
               handle a request  before  it  is  terminated  by  a
               built-in watchdog timer.
 
-       <b><a href="postconf.5.html#delay_logging_time_resolution">delay_logging_time_resolution</a> (10000)</b>
-              The  time resolution (microseconds) of the sub-sec-
-              ond delay values that  are  logged  for  subsequent
-              message delivery stages.
+       <b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
+              The  maximal  number  of  digits  after the decimal
+              point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
               The time limit for sending or receiving information
               over an internal communication channel.
 
        <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
-              The maximum amount of time  that  an  idle  Postfix
-              daemon  process  waits for the next service request
+              The  maximum  amount  of  time that an idle Postfix
+              daemon process waits for the next  service  request
               before exiting.
 
        <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
-              The maximal number of connection requests before  a
+              The  maximal number of connection requests before a
               Postfix daemon process terminates.
 
        <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
-              The  process  ID  of  a  Postfix  command or daemon
+              The process ID  of  a  Postfix  command  or  daemon
               process.
 
        <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
-              The process name of a  Postfix  command  or  daemon
+              The  process  name  of  a Postfix command or daemon
               process.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The  location of the Postfix top-level queue direc-
+              The location of the Postfix top-level queue  direc-
               tory.
 
        <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The mail system  name  that  is  prepended  to  the
-              process  name  in  syslog  records, so that "smtpd"
+              The  mail  system  name  that  is  prepended to the
+              process name in syslog  records,  so  that  "smtpd"
               becomes, for example, "postfix/smtpd".
 
 <b>SEE ALSO</b>
@@ -286,20 +285,20 @@ VIRTUAL(8)                                                          VIRTUAL(8)
        <a href="VIRTUAL_README.html">VIRTUAL_README</a>, domain hosting howto
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>HISTORY</b>
-       This  delivery  agent  was originally based on the Postfix
-       local delivery agent. Modifications  mainly  consisted  of
-       removing  code  that either was not applicable or that was
-       not safe in this context: aliases,  ~user/.forward  files,
+       This delivery agent was originally based  on  the  Postfix
+       local  delivery  agent.  Modifications mainly consisted of
+       removing code that either was not applicable or  that  was
+       not  safe  in this context: aliases, ~user/.forward files,
        delivery to "|command" or to /file/name.
 
        The <b>Delivered-To:</b> message header appears in the <b>qmail</b> sys-
        tem by Daniel Bernstein.
 
-       The <b>maildir</b> structure  appears  in  the  <b>qmail</b>  system  by
+       The  <b>maildir</b>  structure  appears  in  the  <b>qmail</b> system by
        Daniel Bernstein.
 
 <b>AUTHOR(S)</b>
index 2622fa1c0049355803502b5f5bffe3d3177295b8..b1b5b6768d53a90419bc044e87b53597e4059c78 100644 (file)
@@ -1034,10 +1034,14 @@ 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.
+.SH delay_logging_resolution_limit (default: 2)
+The maximal number of digits after the decimal point when logging
+sub-second delay values.  Specify a number in the range 0..6.
+.PP
+Large delay values are rounded off to an integral number seconds;
+delay values below the delay_logging_resolution_limit are logged
+as "0", and small delay values are logged with at most two-digit
+precision.
 .PP
 The format of the "delays=a/b/c/d" logging is as follows:
 .IP \(bu
@@ -1049,9 +1053,7 @@ c = time in connection setup, including DNS, EHLO and TLS
 .IP \(bu
 d = time in message transmission
 .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.
+This feature is available in Postfix 2.3 and later.
 .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
index 3ba92cf0f7e58dc670780dd68b98616fdf48af6c..8e2dad32aff2b4a90f9d03e8c6df08834936e35b 100644 (file)
@@ -270,9 +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_logging_resolution_limit (2)\fR"
+The maximal number of digits after the decimal point when logging
+sub-second delay values.
 .IP "\fBdelay_warning_time (0h)\fR"
 The time after which the sender receives the message headers of
 mail that is still queued.
index aa0cfca19a3c1aa67e24a65424f98bb988f1af2f..48256947bf3371083af2a7f1577f511921a97200 100644 (file)
@@ -64,9 +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 "\fBdelay_logging_resolution_limit (2)\fR"
+The maximal number of digits after the decimal point when logging
+sub-second delay values.
 .IP "\fBdouble_bounce_sender (double-bounce)\fR"
 The sender address of postmaster notifications that are generated
 by the mail system.
index a6304414503001482da23775b5cea152f0b5e54e..f5a19cf919f420da50ced5103ca91d8622c9848a 100644 (file)
@@ -71,9 +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 "\fBdelay_logging_resolution_limit (2)\fR"
+The maximal number of digits after the decimal point when logging
+sub-second delay values.
 .IP "\fBdouble_bounce_sender (double-bounce)\fR"
 The sender address of postmaster notifications that are generated
 by the mail system.
index a967cd08fc044e4dbd9ed037d713b0a38d337578..09f8bde961956c3234d9307bdbe76e5e0f9e3062 100644 (file)
@@ -200,9 +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 "\fBdelay_logging_resolution_limit (2)\fR"
+The maximal number of digits after the decimal point when logging
+sub-second delay values.
 .IP "\fBdisable_dns_lookups (no)\fR"
 Disable DNS lookups in the Postfix SMTP and LMTP clients.
 .IP "\fBipc_timeout (3600s)\fR"
index 562098ffc40baceb45707be264d0488a5338613f..17ebdc14ea0c507894da8e668e84158e46f064fa 100644 (file)
@@ -511,9 +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 "\fBdelay_logging_resolution_limit (2)\fR"
+The maximal number of digits after the decimal point when logging
+sub-second delay values.
 .IP "\fBexport_environment (see 'postconf -d' output)\fR"
 The list of environment variables that a Postfix process will export
 to non-Postfix processes.
index 62a715c3d9a7e16d7636498ed95785c38ea19ed2..bd2ceafa9fbb57d705546e647b9d5219e442aa38 100644 (file)
@@ -255,9 +255,9 @@ 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 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 "\fBdelay_logging_resolution_limit (2)\fR"
+The maximal number of digits after the decimal point when logging
+sub-second delay values.
 .IP "\fBhelpful_warnings (yes)\fR"
 Log warnings about problematic configuration settings, and provide
 helpful suggestions.
index 4661ff376cd3a79e47054a092723bcca10833053..70da797c9496057dd3b8a44a6b847e252cbf3bfe 100644 (file)
@@ -320,9 +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 "\fBdelay_logging_resolution_limit (2)\fR"
+The maximal number of digits after the decimal point when logging
+sub-second delay values.
 .IP "\fBexport_environment (see 'postconf -d' output)\fR"
 The list of environment variables that a Postfix process will export
 to non-Postfix processes.
index 150f0391307fa8ad983e2c2cbeb23466f6246023..bca8945e30b841d4e63cc0a9f6248ee2519c711b 100644 (file)
@@ -294,9 +294,9 @@ 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 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 "\fBdelay_logging_resolution_limit (2)\fR"
+The maximal number of digits after the decimal point when logging
+sub-second delay values.
 .IP "\fBhelpful_warnings (yes)\fR"
 Log warnings about problematic configuration settings, and provide
 helpful suggestions.
index d4691ded2cfad4f583d4538a92b5e2348f2e5841..fe94efb718d1206ae2b4e632bea07afff03cf983 100644 (file)
@@ -340,9 +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 "\fBdelay_logging_resolution_limit (2)\fR"
+The maximal number of digits after the decimal point when logging
+sub-second delay values.
 .IP "\fBdisable_dns_lookups (no)\fR"
 Disable DNS lookups in the Postfix SMTP and LMTP clients.
 .IP "\fBfallback_relay (empty)\fR"
index 4bf9f9b8b9f3d2f5a356745e06330a805fbbd98a..ca3b7616331a6d13a1d27278728a17185bdcb857 100644 (file)
@@ -245,9 +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 "\fBdelay_logging_resolution_limit (2)\fR"
+The maximal number of digits after the decimal point when logging
+sub-second delay values.
 .IP "\fBipc_timeout (3600s)\fR"
 The time limit for sending or receiving information over an internal
 communication channel.
index 11960f7a4a51b26af6396d779bc6d6fb1d0a9437..f2a655a7172544c7f2b7f547167dc0362b078a52 100755 (executable)
@@ -139,7 +139,7 @@ while (<>) {
     s;\bdefer_code\b;<a href="postconf.5.html#defer_code">$&</a>;g;
     s;\bdefer_service_name\b;<a href="postconf.5.html#defer_service_name">$&</a>;g;
     s;\bdefer_transports\b;<a href="postconf.5.html#defer_transports">$&</a>;g;
-    s;\bdelay_logging_time_resolution\b;<a href="postconf.5.html#delay_logging_time_resolution">$&</a>;g;
+    s;\bdelay_logging_resolution_limit\b;<a href="postconf.5.html#delay_logging_resolution_limit">$&</a>;g;
     s;\bdelay_notice_recip[-</bB>]*\n* *[<bB>]*ient\b;<a href="postconf.5.html#delay_notice_recipient">$&</a>;g;
     s;\bdelay_warning_time\b;<a href="postconf.5.html#delay_warning_time">$&</a>;g;
     s;\bdeliver_lock_attempts\b;<a href="postconf.5.html#deliver_lock_attempts">$&</a>;g;
diff --git a/postfix/pflogsumm-conn-delays-dsn-patch b/postfix/pflogsumm-conn-delays-dsn-patch
new file mode 100644 (file)
index 0000000..be2698f
--- /dev/null
@@ -0,0 +1,14 @@
+This patch adds support for logfiles with conn_use, delays, and dsn
+attributes.
+
+--- pflogsumm.pl.orig  2005-04-09 12:54:44.000000000 +0200
++++ pflogsumm.pl       2005-11-07 21:50:05.483199193 +0100
+@@ -696,7 +696,7 @@
+           }
+       }
+       elsif((($addr, $relay, $delay, $status, $toRmdr) = $logRmdr =~
+-              /to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), delay=([^,]+), status=(\S+)(.*)$/o) >= 4)
++              /to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), (?:conn_use=[^,]+, )?delay=([^,]+), (?:delays=[^,]+, )?(?:dsn=[^,]+, )?status=(\S+)(.*)$/o) >= 4)
+       {
+           if($opts{'m'} && $addr =~ /^(.*!)*([^!]+)!([^!@]+)@([^\.]+)$/o) {
diff --git a/postfix/pflogsumm-dsn-patch b/postfix/pflogsumm-dsn-patch
deleted file mode 100644 (file)
index 6c312d6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Postfix 2.3 changes the logging format, introducing a field that
-reports the delivery status code as "dsn=x.yy.zz", where yy and zz
-can be up to three digits long. This breaks pflogsumm analysis.
-
-The patch below appeared in:
-
-    Message-ID: <4257CF98.10309@michaweb.net>
-    Date: Sat, 09 Apr 2005 14:50:32 +0200
-    From: John Fawcett <johnml@michaweb.net>
-    To: postfix-users@postfix.org
-    Subject: postfix 2.3 and pflogsumm
-
---- pflogsumm.original 2005-04-09 12:54:44.140532258 +0200
-+++ pflogsumm  2005-04-09 12:55:33.246949650 +0200
-@@ -696,7 +696,7 @@
-           }
-       }
-       elsif((($addr, $relay, $delay, $status, $toRmdr) = $logRmdr =~
--              /to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), delay=([^,]+), status=(\S+)(.*)$/o) >= 4)
-+              /to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), delay=([^,]+), (?:dsn=\d+\.\d+\.\d+, )?status=(\S+)(.*)$/o) >= 4)
-       {
-           if($opts{'m'} && $addr =~ /^(.*!)*([^!]+)!([^!@]+)@([^\.]+)$/o) {
index 4955a6e8b6cd3c292fcb03fff7318852b072499b..2f6130b617be1b782a528f7cb21e8ac34841e1aa 100644 (file)
@@ -603,7 +603,7 @@ in the master.cf file.  This feature is available in Postfix version
 <pre>
 /etc/postfix/master.cf:
     :10026      inet  n       -       n       -       -       smtpd
-        -o receive_override_options=no_address_mapping
+        -o receive_override_options=no_address_mappings
 </pre>
 </blockquote>
 
@@ -702,7 +702,7 @@ Postfix version 2.1 and later. </p>
 <pre>
 /etc/postfix/master.cf:
     :10026      inet  n       -       n       -       -       smtpd
-        -o receive_override_options=no_address_mapping
+        -o receive_override_options=nso_address_mapping
 </pre>
 </blockquote>
 
@@ -752,7 +752,7 @@ is available in Postfix version 2.1 and later. </p>
 <pre>
 /etc/postfix/master.cf:
     :10026      inet  n       -       n       -       -       smtpd
-        -o receive_override_options=no_address_mapping
+        -o receive_override_options=no_address_mappings
 </pre>
 </blockquote>
 
@@ -816,7 +816,7 @@ in the master.cf file.  This feature is available in Postfix version
 <pre>
 /etc/postfix/master.cf:
     :10026      inet  n       -       n       -       -       smtpd
-        -o receive_override_options=no_address_mapping
+        -o receive_override_options=no_address_mappings
 </pre>
 </blockquote>
 
index b26ae0ea6d67917f46a821cb2dfa4a5d6ad2263d..802f413b1c134d395a6f77cb323ed189e030c9b8 100644 (file)
@@ -8650,11 +8650,15 @@ the name matches the client IP address. A client name is set to
 lookup is disabled.  Turning off name lookup reduces delays due to
 DNS lookup and increases the maximal inbound delivery rate. </p>
 
-%PARAM delay_logging_time_resolution 10000
+%PARAM delay_logging_resolution_limit 2
 
-<p> 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. </p>
+<p> The maximal number of digits after the decimal point when logging
+sub-second delay values.  Specify a number in the range 0..6.  </p>
+
+<p> Large delay values are rounded off to an integral number seconds;
+delay values below the delay_logging_resolution_limit are logged
+as "0", and small delay values are logged with at most two-digit
+precision.  </p>
 
 <p> The format of the "delays=a/b/c/d" logging is as follows: </p>
 
@@ -8670,6 +8674,4 @@ Specify a power of 10 in the range from 1 to 100000. </p>
 
 </ul>
 
-<p>  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.  </p>
+<p> This feature is available in Postfix 2.3 and later.  </p>
index 3c5a98bc3d4fc1f038baf35ea8bfced710206b3e..5fbb28dbfc1bd37d48a57533f0364a7a55345960 100644 (file)
 /* .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_logging_resolution_limit (2)\fR"
+/*     The maximal number of digits after the decimal point when logging
+/*     sub-second delay values.
 /* .IP "\fBdelay_warning_time (0h)\fR"
 /*     The time after which the sender receives the message headers of
 /*     mail that is still queued.
index 644eb94bd865d777931834bf3b04095985053181..2d326bb1fd5e163cb039321e0881f586d0f7d86b 100644 (file)
@@ -590,10 +590,16 @@ static void cleanup_header_done_callback(void *context)
      * 
      * XXX It is the queue ID non-inode bits that prevent messages from getting
      * the same Message-Id within the same second.
+     * 
+     * XXX An arbitrary amount of time may pass between the start of the mail
+     * transaction and the creation of a queue file. Since we guarantee queue
+     * ID uniqueness only within a second, we must ensure that the time in
+     * the message ID matches the queue ID creation time, if we use the queue
+     * ID in the message ID.
      */
     if ((state->headers_seen & (1 << (state->resent[0] ?
                           HDR_RESENT_MESSAGE_ID : HDR_MESSAGE_ID))) == 0) {
-       tv = state->arrival_time.tv_sec;
+       tv = state->handle->ctime.tv_sec;
        tp = gmtime(&tv);
        strftime(time_stamp, sizeof(time_stamp), "%Y%m%d%H%M%S", tp);
        cleanup_out_format(state, REC_TYPE_NORM, "%sMessage-Id: <%s.%s@%s>",
index ecd01a25324ae20fd5405d06c6e4e6362cc26c81..5fb3e997e3122ea37691b865e8dd405ab90108eb 100644 (file)
@@ -50,9 +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 "\fBdelay_logging_resolution_limit (2)\fR"
+/*     The maximal number of digits after the decimal point when logging
+/*     sub-second delay values.
 /* .IP "\fBdouble_bounce_sender (double-bounce)\fR"
 /*     The sender address of postmaster notifications that are generated
 /*     by the mail system.
index dbf7111e4b3d2b5d97d54a1dbf8de5ec4154589c..c7be3d6ecd8f5c117438cc6e67a86207255998df 100644 (file)
@@ -57,9 +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 "\fBdelay_logging_resolution_limit (2)\fR"
+/*     The maximal number of digits after the decimal point when logging
+/*     sub-second delay values.
 /* .IP "\fBdouble_bounce_sender (double-bounce)\fR"
 /*     The sender address of postmaster notifications that are generated
 /*     by the mail system.
index 5d9c5de304eef7bd87fcf3d83c3b2f895ffdf2ae..a78a4716fe0ad1ce0c611af3bcb7017435b8725e 100644 (file)
@@ -824,6 +824,7 @@ is_header.o: ../../include/sys_defs.h
 is_header.o: is_header.c
 is_header.o: is_header.h
 log_adhoc.o: ../../include/attr.h
+log_adhoc.o: ../../include/format_tv.h
 log_adhoc.o: ../../include/msg.h
 log_adhoc.o: ../../include/sys_defs.h
 log_adhoc.o: ../../include/vbuf.h
index a47bf08e2b20e71fd5eeb2f050a00d70f4d1c9ff..4eee116abb495e04d47764dc8e3c3ab9103a4140 100644 (file)
@@ -63,6 +63,7 @@
 
 #include <msg.h>
 #include <vstring.h>
+#include <format_tv.h>
 
 /* Global library. */
 
@@ -179,26 +180,14 @@ void    log_adhoc(const char *id, MSG_STATS *stats, RECIPIENT *recipient,
     }
 
     /*
-     * XXX Eliminate dependency on floating point. Wietse insists, however,
-     * that precision be limited to avoid logfile clutter. That is, numbers
-     * less than 100 must look as if they were formatted with %.2g, not as if
-     * they were formatted with %.2f, and numbers of 10 and up must have no
-     * sub-second detail at all.
+     * Round off large time values to an integral number of seconds, and
+     * display small numbers with only two digits as long as we stay above
+     * the time resolution.
      */
-#define MILLION                1000000
-#define DMILLION       ((double) MILLION)
-
 #define PRETTY_FORMAT(b, text, x) \
     do { \
-       if ((x).dt_sec > 9 \
-           || ((x).dt_sec == 0 && (x).dt_usec < var_delay_resolution)) { \
-           vstring_sprintf_append((b), text "%ld", \
-               (long) (x).dt_sec + ((x).dt_usec > (MILLION / 2))); \
-       } else { \
-           vstring_sprintf_append((b), text "%.2g", (x).dt_sec \
-               + ((x).dt_usec - (x).dt_usec % var_delay_resolution) \
-                   / DMILLION); \
-       } \
+       vstring_strcat((b), text); \
+       format_tv((b), (x).dt_sec, (x).dt_usec, 2, var_delay_max_res); \
     } while (0)
 
     PRETTY_FORMAT(buf, ", delay=", delay);
index bd7729badb74793ebc9b24c0dfbca5e13154a7e1..c2e16059453c4428908e06f50243bde1ca7ac44d 100644 (file)
 /*     int     var_strict_encoding;
 /*     int     var_verify_neg_cache;
 /*     int     var_oldlog_compat;
-/*     int     var_delay_resolution;
+/*     int     var_delay_max_res;
 /*
 /*     void    mail_params_init()
 /*
@@ -299,7 +299,7 @@ int     var_strict_8bit_body;
 int     var_strict_encoding;
 int     var_verify_neg_cache;
 int     var_oldlog_compat;
-int     var_delay_resolution;
+int     var_delay_max_res;
 
 const char null_format_string[1] = "";
 
@@ -563,7 +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,
+       VAR_DELAY_MAX_RES, DEF_DELAY_MAX_RES, &var_delay_max_res, MIN_DELAY_MAX_RES, MAX_DELAY_MAX_RES,
        0,
     };
     static CONFIG_TIME_TABLE time_defaults[] = {
index bb895ea20ce4792c91326ae0aafc1b42148a2ee2..6b00c12ea7289874d78338ac474e1e724df162c6 100644 (file)
@@ -2389,13 +2389,13 @@ extern char *var_msg_strip_chars;
 extern bool var_frozen_delivered;
 
  /*
-  * Delay logging time resolution.
+  * Delay logging time roundup.
   */
-#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;
+#define VAR_DELAY_MAX_RES              "delay_logging_resolution_limit"
+#define MAX_DELAY_MAX_RES              6
+#define DEF_DELAY_MAX_RES              2
+#define MIN_DELAY_MAX_RES              0
+extern int var_delay_max_res;
 
 /* LICENSE
 /* .ad
index 1b9f316118e2eda0f48922188c752a855dcf2c70..86b4a88f2e0a17a55167551be1eaf64481041cd4 100644 (file)
@@ -6,9 +6,10 @@
 /* SYNOPSIS
 /*     #include <mail_queue.h>
 /*
-/*     VSTREAM *mail_queue_enter(queue_name, mode)
+/*     VSTREAM *mail_queue_enter(queue_name, mode, tp)
 /*     const char *queue_name;
 /*     mode_t  mode;
+/*     struct timeval *tp;
 /*
 /*     VSTREAM *mail_queue_open(queue_name, queue_id, flags, mode)
 /*     const char *queue_name;
@@ -53,7 +54,9 @@
 /*     id is the file base name, see VSTREAM_PATH().  Queue ids are
 /*     relatively short strings and are recycled in the course of time.
 /*     The only guarantee given is that on a given machine, no two queue
-/*     entries will have the same queue ID at the same time.
+/*     entries will have the same queue ID at the same time. The tp
+/*     argument, if not a null pointer, receives the time stamp that
+/*     corresponds with the queue ID.
 /*
 /*     mail_queue_open() opens the named queue file. The \fIflags\fR
 /*     and \fImode\fR arguments are as with open(2). The result is a
@@ -304,7 +307,8 @@ int     mail_queue_id_ok(const char *queue_id)
 
 /* mail_queue_enter - make mail queue entry with locally-unique name */
 
-VSTREAM *mail_queue_enter(const char *queue_name, mode_t mode)
+VSTREAM *mail_queue_enter(const char *queue_name, mode_t mode,
+                                 struct timeval * tp)
 {
     char   *myname = "mail_queue_enter";
     static VSTRING *id_buf;
@@ -326,7 +330,8 @@ VSTREAM *mail_queue_enter(const char *queue_name, mode_t mode)
        path_buf = vstring_alloc(10);
        temp_path = vstring_alloc(100);
     }
-    GETTIMEOFDAY(&tv);
+    if (tp == 0)
+       tp = &tv;
 
     /*
      * Create a file with a temporary name that does not collide. The process
@@ -338,15 +343,13 @@ VSTREAM *mail_queue_enter(const char *queue_name, mode_t mode)
      * If someone is racing against us, try to win.
      */
     for (;;) {
+       GETTIMEOFDAY(tp);
        vstring_sprintf(temp_path, "%s/%d.%d", queue_name,
-                       (int) tv.tv_usec, pid);
+                       (int) tp->tv_usec, pid);
        if ((fd = open(STR(temp_path), O_RDWR | O_CREAT | O_EXCL, mode)) >= 0)
            break;
-       if (errno == EEXIST || errno == EISDIR) {
-           if ((int) ++tv.tv_usec < 0)
-               tv.tv_usec = 0;
+       if (errno == EEXIST || errno == EISDIR)
            continue;
-       }
        msg_warn("%s: create file %s: %m", myname, STR(temp_path));
        sleep(10);
     }
@@ -364,7 +367,6 @@ VSTREAM *mail_queue_enter(const char *queue_name, mode_t mode)
      * If someone is racing against us, try to win.
      */
     file_id = get_file_id(fd);
-    GETTIMEOFDAY(&tv);
 
     /*
      * XXX Some systems seem to have clocks that correlate with process
@@ -374,22 +376,13 @@ VSTREAM *mail_queue_enter(const char *queue_name, mode_t mode)
      * prevents multiple messages from getting the same Message-ID value.
      */
     for (count = 0;; count++) {
-       vstring_sprintf(id_buf, "%05X%s", (int) tv.tv_usec, file_id);
+       GETTIMEOFDAY(tp);
+       vstring_sprintf(id_buf, "%05X%s", (int) tp->tv_usec, file_id);
        mail_queue_path(path_buf, queue_name, STR(id_buf));
-#if 0
-       if (access(STR(path_buf), X_OK) == 0) { /* collision. */
-           if ((int) ++tv.tv_usec < 0)
-               tv.tv_usec = 0;
-           continue;
-       }
-#endif
        if (sane_rename(STR(temp_path), STR(path_buf)) == 0)    /* success */
            break;
-       if (errno == EPERM || errno == EISDIR) {/* collision. weird. */
-           if ((int) ++tv.tv_usec < 0)
-               tv.tv_usec = 0;
+       if (errno == EPERM || errno == EISDIR)  /* collision. weird. */
            continue;
-       }
        if (errno != ENOENT || mail_queue_mkdirs(STR(path_buf)) < 0) {
            msg_warn("%s: rename %s to %s: %m", myname,
                     STR(temp_path), STR(path_buf));
index 19c04b7b8a0587a7081764f2043ab0b6f33dc276..8c4e3b89897b8332a1604d83797c866e37fb4d8f 100644 (file)
 /* DESCRIPTION
 /* .nf
 
+ /*
+  * System library.
+  */
+#include <sys/time.h>
+
  /*
   * Utility library.
   */
@@ -37,7 +42,7 @@
 #define MAIL_QUEUE_STAT_READY  (S_IRUSR | S_IWUSR | S_IXUSR)
 #define MAIL_QUEUE_STAT_CORRUPT        (S_IRUSR)
 
-extern struct VSTREAM *mail_queue_enter(const char *, mode_t);
+extern struct VSTREAM *mail_queue_enter(const char *, mode_t, struct timeval *);
 extern struct VSTREAM *mail_queue_open(const char *, const char *, int, mode_t);
 extern int mail_queue_rename(const char *, const char *, const char *);
 extern int mail_queue_remove(const char *, const char *);
index 5ac392b1a1be10768359ace98a451275303097f2..1039bddc5bf00ea18118c66a92a30a38aca1e58a 100644 (file)
@@ -8,8 +8,9 @@
 /*
 /*     typedef struct {
 /* .in +4
-/*             VSTREAM *stream;
-/*             char    *id;
+/*             VSTREAM *stream;        /* read/write stream */
+/*             char    *id;            /* queue ID */
+/*             struct timeval ctime;   /* create time */
 /*             private members...
 /* .in -4
 /*     } MAIL_STREAM;
@@ -296,10 +297,11 @@ int     mail_stream_finish(MAIL_STREAM *info, VSTRING *why)
 MAIL_STREAM *mail_stream_file(const char *queue, const char *class,
                                      const char *service, int mode)
 {
+    struct timeval tv;
     MAIL_STREAM *info;
     VSTREAM *stream;
 
-    stream = mail_queue_enter(queue, 0600 | mode);
+    stream = mail_queue_enter(queue, 0600 | mode, &tv);
     if (msg_verbose)
        msg_info("open %s", VSTREAM_PATH(stream));
 
@@ -312,6 +314,7 @@ MAIL_STREAM *mail_stream_file(const char *queue, const char *class,
     info->class = mystrdup(class);
     info->service = mystrdup(service);
     info->mode = mode;
+    info->ctime = tv;
     return (info);
 }
 
index 455b65011b4d37e0361e66625d0990201317f3b8..cee04bc86e7510ebc6a1773ce20625f3f4cad65a 100644 (file)
 /* DESCRIPTION
 /* .nf
 
+ /*
+  * System library.
+  */
+#include <sys/time.h>
+
  /*
   * Utility library.
   */
@@ -34,6 +39,7 @@ struct MAIL_STREAM {
     char   *class;                     /* trigger class */
     char   *service;                   /* trigger service */
     int     mode;                      /* additional permissions */
+    struct timeval ctime;              /* creation time */
 };
 
 #define MAIL_STREAM_CTL_END    0       /* Terminator */
index cd57710e6a51b1c0c2dd15b140a7344cbf8e0d3e..a020efc61d4c6098d29964c52ca187581b41a63b 100644 (file)
@@ -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      "20051106"
+#define MAIL_RELEASE_DATE      "20051108"
 #define MAIL_VERSION_NUMBER    "2.3"
 
 #ifdef SNAPSHOT
index c18ab77154f8a5a6c2f0eccd7d1e22dc6c20f7e7..fc252aebd71869421b3d7b9c1284c286e6cb4947 100644 (file)
 /* .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_logging_resolution_limit (2)\fR"
+/*     The maximal number of digits after the decimal point when logging
+/*     sub-second delay values.
 /* .IP "\fBdisable_dns_lookups (no)\fR"
 /*     Disable DNS lookups in the Postfix SMTP and LMTP clients.
 /* .IP "\fBipc_timeout (3600s)\fR"
index e3b8373d7587df686756a2b7df1658d3c6a60ffa..5de53e485605e5c3b235aef1fa2c8efcf3bdec7f 100644 (file)
 /* .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_logging_resolution_limit (2)\fR"
+/*     The maximal number of digits after the decimal point when logging
+/*     sub-second delay values.
 /* .IP "\fBexport_environment (see 'postconf -d' output)\fR"
 /*     The list of environment variables that a Postfix process will export
 /*     to non-Postfix processes.
index 5e16f7e79435d471d3f139308b77d30f1f4c4965..e91947b8d71a82aa8e0af5cd95a9c907c6bd2301 100644 (file)
 /* .IP "\fBdefer_transports (empty)\fR"
 /*     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 "\fBdelay_logging_resolution_limit (2)\fR"
+/*     The maximal number of digits after the decimal point when logging
+/*     sub-second delay values.
 /* .IP "\fBhelpful_warnings (yes)\fR"
 /*     Log warnings about problematic configuration settings, and provide
 /*     helpful suggestions.
index 8ea5e16954382a68abf7cf8b2b35ac93270ce951..e365a3e9d1a90d34724839e1e31a9e2889e6f5ab 100644 (file)
 /* .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_logging_resolution_limit (2)\fR"
+/*     The maximal number of digits after the decimal point when logging
+/*     sub-second delay values.
 /* .IP "\fBexport_environment (see 'postconf -d' output)\fR"
 /*     The list of environment variables that a Postfix process will export
 /*     to non-Postfix processes.
index e3efb58d9d757dff97e913249b016e91fb233fd6..bbd941c19c693f41207acc8705192972747328d5 100644 (file)
 /* .IP "\fBdefer_transports (empty)\fR"
 /*     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 "\fBdelay_logging_resolution_limit (2)\fR"
+/*     The maximal number of digits after the decimal point when logging
+/*     sub-second delay values.
 /* .IP "\fBhelpful_warnings (yes)\fR"
 /*     Log warnings about problematic configuration settings, and provide
 /*     helpful suggestions.
index 377d9cf13cd4160529340ed22f7324bbc6f2ed92..2b044626f374558351bd91f493c610ef426d18ba 100644 (file)
 /* .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_logging_resolution_limit (2)\fR"
+/*     The maximal number of digits after the decimal point when logging
+/*     sub-second delay values.
 /* .IP "\fBdisable_dns_lookups (no)\fR"
 /*     Disable DNS lookups in the Postfix SMTP and LMTP clients.
 /* .IP "\fBfallback_relay (empty)\fR"
index 8010a205146fda90514caf10ba67f72ca962f6c3..f337b450251c0df4f8fe11721db979c16a2a56f9 100644 (file)
@@ -29,7 +29,7 @@ SRCS  = alldig.c allprint.c argv.c argv_split.c attr_clnt.c attr_print0.c \
        unix_recv_fd.c unix_send_fd.c unix_trigger.c unsafe.c uppercase.c \
        username.c valid_hostname.c vbuf.c vbuf_print.c vstream.c \
        vstream_popen.c vstring.c vstring_vstream.c watchdog.c writable.c \
-       write_buf.c write_wait.c sane_basename.c
+       write_buf.c write_wait.c sane_basename.c format_tv.c
 OBJS   = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
        attr_print64.o attr_print_plain.o attr_scan0.o attr_scan64.o \
        attr_scan_plain.o auto_clnt.o base64_code.o basename.o binhash.o \
@@ -60,7 +60,7 @@ OBJS  = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
        unix_recv_fd.o unix_send_fd.o unix_trigger.o unsafe.o uppercase.o \
        username.o valid_hostname.o vbuf.o vbuf_print.o vstream.o \
        vstream_popen.o vstring.o vstring_vstream.o watchdog.o writable.o \
-       write_buf.o write_wait.o sane_basename.o
+       write_buf.o write_wait.o sane_basename.o format_tv.o
 HDRS   = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \
        chroot_uid.h cidr_match.h clean_env.h connect.h ctable.h dict.h \
        dict_cdb.h dict_cidr.h dict_db.h dict_dbm.h dict_env.h dict_ht.h \
@@ -79,7 +79,7 @@ HDRS  = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \
        sigdelay.h sock_addr.h spawn_command.h split_at.h stat_as.h \
        stringops.h sys_defs.h timed_connect.h timed_wait.h trigger.h \
        username.h valid_hostname.h vbuf.h vbuf_print.h vstream.h vstring.h \
-       vstring_vstream.h watchdog.h
+       vstring_vstream.h watchdog.h format_tv.h
 TESTSRC        = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
        stream_test.c dup2_pass_on_exec.c
 DEFS   = -I. -D$(SYSTYPE)
@@ -96,7 +96,7 @@ TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
        inet_addr_list attr_print64 attr_scan64 base64_code attr_print0 \
        attr_scan0 host_port attr_scan_plain attr_print_plain htable \
        unix_recv_fd unix_send_fd stream_recv_fd stream_send_fd hex_code \
-       myaddrinfo myaddrinfo4 inet_proto sane_basename
+       myaddrinfo myaddrinfo4 inet_proto sane_basename format_tv
 
 LIB_DIR        = ../../lib
 INC_DIR        = ../../include
@@ -401,11 +401,16 @@ gcctest: gccw.c gccw.ref
        diff gccw.ref gccw.tmp
        rm -f gccw.o gccw.tmp
 
+format_tv: $(LIB)
+       mv $@.o junk
+       $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
+       mv junk $@.o
+
 tests: valid_hostname_test mac_expand_test dict_test unescape_test \
        hex_quote_test ctable_test inet_addr_list_test base64_code_test \
        attr_scan64_test attr_scan0_test dict_pcre_test host_port_test \
        dict_cidr_test attr_scan_plain_test htable_test hex_code_test \
-       myaddrinfo_test
+       myaddrinfo_test format_tv_test
 
 valid_hostname_test: valid_hostname valid_hostname.in valid_hostname.ref
        ./valid_hostname <valid_hostname.in 2>valid_hostname.tmp
@@ -512,6 +517,11 @@ myaddrinfo4_test: myaddrinfo4 myaddrinfo4.ref myaddrinfo4.ref2
        diff myaddrinfo4.ref2 myaddrinfo4.tmp
        rm -f myaddrinfo4.tmp
 
+format_tv_test: format_tv format_tv.in format_tv.ref
+       ./format_tv <format_tv.in >format_tv.tmp
+       diff format_tv.ref format_tv.tmp
+       rm -f format_tv.tmp
+
 depend: $(MAKES)
        (sed '1,/^# do not edit/!d' Makefile.in; \
        set -e; for i in [a-z][a-z0-9]*.c; do \
@@ -966,6 +976,12 @@ find_inet.o: stringops.h
 find_inet.o: sys_defs.h
 find_inet.o: vbuf.h
 find_inet.o: vstring.h
+format_tv.o: format_tv.c
+format_tv.o: format_tv.h
+format_tv.o: msg.h
+format_tv.o: sys_defs.h
+format_tv.o: vbuf.h
+format_tv.o: vstring.h
 fsspace.o: fsspace.c
 fsspace.o: fsspace.h
 fsspace.o: msg.h
diff --git a/postfix/src/util/format_tv.c b/postfix/src/util/format_tv.c
new file mode 100644 (file)
index 0000000..2c54c4e
--- /dev/null
@@ -0,0 +1,156 @@
+/*++
+/* NAME
+/*     format_tv 3
+/* SUMMARY
+/*     format time value with limited precision
+/* SYNOPSIS
+/*     #include <format_tv.h>
+/*
+/*     VSTRING *format_tv(buffer, sec, usec, width, max_pos)
+/*     VSTRING *buffer;
+/*     int     sec;
+/*     int     usec;
+/*     int     width;
+/*     int     max_pos;
+/* DESCRIPTION
+/*     format_tv() formats the specified time while suppressing
+/*     irrelevant digits in the output.  Large numbers are always
+/*     rounded up to an integral number of seconds. Small numbers
+/*     are produced with a limited number of digits, provided that
+/*     those digits don't exceed the limit on the number of positions
+/*     after the decimal point. Trailing zeros are always omitted
+/*     from the output.
+/*
+/*     Arguments:
+/* .IP buffer
+/*     Buffer to which the result is appended.
+/* .IP sec
+/*     The seconds portion of the time value.
+/* .IP usec
+/*     The microseconds portion of the time value.
+/* .IP width
+/*     The maximal number of digits to produce when formatting
+/*     small numbers. Trailing nulls are always omitted.  Specify
+/*     a number in the range 1..6.
+/* .IP max_pos
+/*     The maximal number of positions after the decimal point.
+/*     Specify a number in the range 0..6.
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+#include <sys_defs.h>
+
+/* Utility library. */
+
+#include <msg.h>
+#include <format_tv.h>
+
+/* Application-specific. */
+
+#define MILLION        1000000
+
+/* format_tv - print time with limited precision */
+
+VSTRING *format_tv(VSTRING *buf, int sec, int usec, int width, int max)
+{
+    static int pow10[] = {1, 10, 100, 1000, 10000, 100000, 1000000};
+    int     n;
+    int     rem;
+    int     wid;
+    int     ures;
+
+    /*
+     * Sanity check.
+     */
+    if (max < 0 || max > 6)
+       msg_panic("format_tv: bad max decimal count %d", max);
+    if (sec < 0 || usec < 0 || usec > MILLION)
+       msg_panic("format_tv: bad time %ds %dus", sec, usec);
+    if (width < 1 || width > 6)
+       msg_panic("format_tv: bad width %d", width);
+    ures = MILLION / pow10[max];
+    wid = pow10[width];
+
+    /*
+     * Adjust the resolution to suppress irrelevant digits.
+     */
+    if (ures < MILLION) {
+       if (sec > 0) {
+           for (n = 1; sec >= n && n <= wid / 10; n *= 10)
+                /* void */ ;
+           ures = (MILLION / wid) * n;
+       } else {
+           while (usec >= wid * ures)
+               ures *= 10;
+       }
+    }
+
+    /*
+     * Round up the number if necessary. Leave thrash below the resolution.
+     */
+    if (ures > 1) {
+       usec += ures / 2;
+       if (usec >= MILLION) {
+           sec += 1;
+           usec -= MILLION;
+       }
+    }
+
+    /*
+     * Format the number. Truncate thrash below the resolution.
+     */
+    vstring_sprintf_append(buf, "%d", sec);
+    if (usec >= ures) {
+       VSTRING_ADDCH(buf, '.');
+       for (rem = usec, n = MILLION / 10; rem >= ures && n > 0; n /= 10) {
+           VSTRING_ADDCH(buf, "0123456789"[rem / n]);
+           rem %= n;
+       }
+    }
+    VSTRING_TERMINATE(buf);
+    return (buf);
+}
+
+#ifdef TEST
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <vstring_vstream.h>
+
+int     main(int argc, char **argv)
+{
+    VSTRING *in = vstring_alloc(10);
+    VSTRING *out = vstring_alloc(10);
+    double  tval;
+    int     sec;
+    int     usec;
+    int     width;
+    int     max_pos;
+
+    while (vstring_get_nonl(in, VSTREAM_IN) > 0) {
+       vstream_printf(">> %s\n", vstring_str(in));
+       if (vstring_str(in)[0] == 0 || vstring_str(in)[0] == '#')
+           continue;
+       if (sscanf(vstring_str(in), "%lf %d %d", &tval, &width, &max_pos) != 3)
+           msg_fatal("bad input: %s", vstring_str(in));
+       sec = (int) tval;                       /* raw seconds */
+       usec = (tval - sec) * MILLION;          /* raw microseconds */
+       VSTRING_RESET(out);
+       format_tv(out, sec, usec, width, max_pos);
+       vstream_printf("%s\n", vstring_str(out));
+       vstream_fflush(VSTREAM_OUT);
+    }
+    vstring_free(in);
+    vstring_free(out);
+    return (0);
+}
+
+#endif
diff --git a/postfix/src/util/format_tv.h b/postfix/src/util/format_tv.h
new file mode 100644 (file)
index 0000000..e62a861
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef _FORMAT_TV_H_INCLUDED_
+#define _FORMAT_TV_H_INCLUDED_
+
+/*++
+/* NAME
+/*     format_tv 3h
+/* SUMMARY
+/*     format time with limited precision
+/* SYNOPSIS
+/*     #include <format_tv.h>
+/* DESCRIPTION
+/* .nf
+
+ /*
+  * Utility library.
+  */
+#include <vstring.h>
+
+ /*
+  * External interface.
+  */
+extern VSTRING *format_tv(VSTRING *, int, int, int, int);
+
+/* LICENSE
+/* .ad
+/* .fi
+/*     The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
+/*--*/
+
+#endif
diff --git a/postfix/src/util/format_tv.in b/postfix/src/util/format_tv.in
new file mode 100644 (file)
index 0000000..7b6bec5
--- /dev/null
@@ -0,0 +1,68 @@
+# Three digits in, 2/6 digits out, rounding down.
+1110   2       6
+111    2       6
+11.1   2       6
+1.11   2       6
+0.111  2       6
+0.0111 2       6
+0.00111        2       6
+0.000111       2       6
+0.000011       2       6
+
+# One digit in. Must not produce spurious digits or trailing nulls.
+
+1000   2       6
+100    2       6
+10     2       6
+1      2       6
+0.1    2       6
+0.01   2       6
+0.001  2       6
+0.0001 2       6
+0.00001        2       6
+0.000001       2       6
+
+# Three digits in, 2/6 digits out, rounding up.
+
+996    2       6
+99.6   2       6
+9.96   2       6
+.996   2       6
+.0996  2       6
+.00996 2       6
+.000996        2       6
+
+# Three digits in, 1/6 digits out, rounding down.
+
+1110   1       6
+111    1       6
+11.1   1       6
+1.11   1       6
+0.111  1       6
+0.0111 1       6
+0.00111        1       6
+0.000111       1       6
+0.000011       1       6
+
+# One digit in. Must not produce trailing nulls.
+
+1000   1       6
+100    1       6
+10     1       6
+1      1       6
+0.1    1       6
+0.01   1       6
+0.001  1       6
+0.0001 1       6
+0.00001        1       6
+0.000001       1       6
+
+# Three digits in, 1/6 digits out, rounding up.
+
+996    1       6
+99.6   1       6
+9.96   1       6
+.996   1       6
+.0996  1       6
+.00996 1       6
+.000996        1       6
diff --git a/postfix/src/util/format_tv.ref b/postfix/src/util/format_tv.ref
new file mode 100644 (file)
index 0000000..2068796
--- /dev/null
@@ -0,0 +1,120 @@
+>> # Three digits in, 2/6 digits out, rounding down.
+>> 1110        2       6
+1110
+>> 111 2       6
+111
+>> 11.1        2       6
+11
+>> 1.11        2       6
+1.1
+>> 0.111       2       6
+0.11
+>> 0.0111      2       6
+0.011
+>> 0.00111     2       6
+0.0011
+>> 0.000111    2       6
+0.00011
+>> 0.000011    2       6
+0.000011
+>> 
+>> # One digit in. Must not produce spurious digits or trailing nulls.
+>> 
+>> 1000        2       6
+1000
+>> 100 2       6
+100
+>> 10  2       6
+10
+>> 1   2       6
+1
+>> 0.1 2       6
+0.1
+>> 0.01        2       6
+0.01
+>> 0.001       2       6
+0.001
+>> 0.0001      2       6
+0.0001
+>> 0.00001     2       6
+0.00001
+>> 0.000001    2       6
+0.000001
+>> 
+>> # Three digits in, 2/6 digits out, rounding up.
+>> 
+>> 996 2       6
+996
+>> 99.6        2       6
+100
+>> 9.96        2       6
+10
+>> .996        2       6
+1
+>> .0996       2       6
+0.1
+>> .00996      2       6
+0.01
+>> .000996     2       6
+0.001
+>> 
+>> # Three digits in, 1/6 digits out, rounding down.
+>> 
+>> 1110        1       6
+1110
+>> 111 1       6
+111
+>> 11.1        1       6
+11
+>> 1.11        1       6
+1
+>> 0.111       1       6
+0.1
+>> 0.0111      1       6
+0.01
+>> 0.00111     1       6
+0.001
+>> 0.000111    1       6
+0.0001
+>> 0.000011    1       6
+0.00001
+>> 
+>> # One digit in. Must not produce trailing nulls.
+>> 
+>> 1000        1       6
+1000
+>> 100 1       6
+100
+>> 10  1       6
+10
+>> 1   1       6
+1
+>> 0.1 1       6
+0.1
+>> 0.01        1       6
+0.01
+>> 0.001       1       6
+0.001
+>> 0.0001      1       6
+0.0001
+>> 0.00001     1       6
+0.00001
+>> 0.000001    1       6
+0.000001
+>> 
+>> # Three digits in, 1/6 digits out, rounding up.
+>> 
+>> 996 1       6
+996
+>> 99.6        1       6
+100
+>> 9.96        1       6
+10
+>> .996        1       6
+1
+>> .0996       1       6
+0.1
+>> .00996      1       6
+0.01
+>> .000996     1       6
+0.001
index 416ec8f0943d723faea0aa3d009fa6054987c9f0..2fb5a291a5f5e72591ed226cca163d4936d8b3a3 100644 (file)
 /*
 /*     time_t  vstream_ftime(stream)
 /*     VSTREAM *stream;
+/*
+/*     struct timeval vstream_ftimeval(stream)
+/*     VSTREAM *stream;
 /* DESCRIPTION
 /*     The \fIvstream\fR module implements light-weight buffered I/O
 /*     similar to the standard I/O routines.
 /*     fill operation, or the last buffer flush operation for the specified
 /*     stream. This information is maintained only when stream timeouts are
 /*     enabled.
+/*
+/*     vstream_ftimeval() is like vstream_ftime() but returns more
+/*     detail.
 /* DIAGNOSTICS
 /*     Panics: interface violations. Fatal errors: out of memory.
 /* SEE ALSO
@@ -559,7 +565,7 @@ static int vstream_fflush_some(VSTREAM *stream, ssize_t to_flush)
            return (VSTREAM_EOF);
        }
        if (stream->timeout)
-           stream->iotime = time((time_t *) 0);
+           GETTIMEOFDAY(&stream->iotime);
        if (msg_verbose > 2 && stream != VSTREAM_ERR && n != to_flush)
            msg_info("%s: %d flushed %ld/%ld", myname, stream->fd,
                     (long) n, (long) to_flush);
@@ -695,7 +701,7 @@ static int vstream_buf_get_ready(VBUF *bp)
        return (VSTREAM_EOF);
     default:
        if (stream->timeout)
-           stream->iotime = time((time_t *) 0);
+           GETTIMEOFDAY(&stream->iotime);
        if (msg_verbose > 2)
            msg_info("%s: fd %d got %ld", myname, stream->fd, (long) n);
        bp->cnt = -n;
@@ -996,7 +1002,7 @@ VSTREAM *vstream_fdopen(int fd, int flags)
     stream->timeout = 0;
     stream->context = 0;
     stream->jbuf = 0;
-    stream->iotime = 0;
+    stream->iotime.tv_sec = stream->iotime.tv_usec = 0;
     return (stream);
 }
 
@@ -1168,7 +1174,7 @@ void    vstream_control(VSTREAM *stream, int name,...)
            break;
        case VSTREAM_CTL_TIMEOUT:
            if (stream->timeout == 0)
-               stream->iotime = time((time_t *) 0);
+               GETTIMEOFDAY(&stream->iotime);
            stream->timeout = va_arg(ap, int);
            break;
        case VSTREAM_CTL_EXCEPT:
index 17d05bf7f6a2ea473a1f31d23ff9e2cb6cb9b634..7e71cc215953afaa27f2b8959dc47cd0f93418e2 100644 (file)
@@ -14,6 +14,7 @@
  /*
   * System library.
   */
+#include <sys/time.h>
 #include <time.h>
 #include <fcntl.h>
 #include <stdarg.h>
@@ -48,7 +49,7 @@ typedef struct VSTREAM {
     VSTREAM_WAITPID_FN waitpid_fn;     /* vstream_popen/close() */
     int     timeout;                   /* read/write timout */
     jmp_buf *jbuf;                     /* exception handling */
-    time_t  iotime;                    /* time of last fill/flush */
+    struct timeval iotime;             /* time of last fill/flush */
 } VSTREAM;
 
 extern VSTREAM vstream_fstd[];         /* pre-defined streams */
@@ -99,7 +100,8 @@ extern int vstream_fdclose(VSTREAM *);
 #define vstream_ftimeout(vp)   vbuf_timeout(&(vp)->buf)
 #define vstream_clearerr(vp)   vbuf_clearerr(&(vp)->buf)
 #define VSTREAM_PATH(vp)       ((vp)->path ? (vp)->path : "unknown_stream")
-#define vstream_ftime(vp)      ((vp)->iotime)
+#define vstream_ftime(vp)      ((time_t) ((vp)->iotime.tv_sec))
+#define vstream_ftimeval(vp)   ((vp)->iotime)
 
 extern void vstream_control(VSTREAM *, int,...);
 
index 928a910064cadda6cc3e9dcd23cfc70240566667..fd5df201dc8d816c8cba8c657465a7a293f8b80b 100644 (file)
 /* .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_logging_resolution_limit (2)\fR"
+/*     The maximal number of digits after the decimal point when logging
+/*     sub-second delay values.
 /* .IP "\fBipc_timeout (3600s)\fR"
 /*     The time limit for sending or receiving information over an internal
 /*     communication channel.