]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20001216
authorWietse Venema <wietse@porcupine.org>
Sat, 16 Dec 2000 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:02 +0000 (06:27 +0000)
23 files changed:
postfix/conf/sample-lmtp.cf [new file with mode: 0644]
postfix/conf/sample-misc.cf
postfix/conf/sample-rate.cf
postfix/conf/sample-resource.cf
postfix/conf/sample-smtp.cf
postfix/conf/sample-smtpd.cf
postfix/html/lmtp.8.html
postfix/html/smtp.8.html
postfix/man/man8/lmtp.8
postfix/man/man8/smtp.8
postfix/src/bounce/bounce_notify_util.c
postfix/src/global/local_transport.c [deleted file]
postfix/src/global/local_transport.h [deleted file]
postfix/src/global/mail_conf_time.c
postfix/src/global/mail_params.c
postfix/src/global/mail_params.h
postfix/src/global/mail_scan.c
postfix/src/global/mail_version.h
postfix/src/lmtp/lmtp.c
postfix/src/lmtp/lmtp_connect.c
postfix/src/nqmgr/qmgr_message.c
postfix/src/qmgr/qmgr_message.c
postfix/src/smtp/smtp.c

diff --git a/postfix/conf/sample-lmtp.cf b/postfix/conf/sample-lmtp.cf
new file mode 100644 (file)
index 0000000..64419a3
--- /dev/null
@@ -0,0 +1,152 @@
+# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE STUFF
+# HERE JUST SERVES AS AN EXAMPLE.
+#
+# This file contains example settings of Postfix configuration
+# parameters that control the LMTP client program.
+
+#
+# MISCELLANEOUS CONTROLS
+#
+
+# The lmtp_skip_quit_response parameter controls whether the LMTP
+# client waits for the response to the QUIT command. The default is
+# to not wait.
+# 
+lmtp_skip_quit_response = yes
+
+# The lmtp_tcp_port specifies the default port number for LMTP
+# connections over TCP when the service is not defined in the
+# services(5) database. It has no effect on LMTP connections over
+# UNIX-domain sockets.
+#
+lmtp_tcp_port = 24
+
+#
+# RESOURCE AND RATE CONTROLS
+#
+
+# The lmtp_cache_connection controls whether the LMTP client keeps
+# the LMTP connection open for at most $max_idle seconds, or whether
+# it closes the connection after each delivery. By default, connection
+# caching is enabled. This works only if you have dedicated master.cf
+# transports for each destination.
+# 
+lmtp_cache_connection = yes
+
+# The lmtp_destination_concurrency_limit parameter limits the number
+# of parallel deliveries to the same destination via the lmtp delivery
+# agent.
+# 
+# The default limit is the default_destination_concurrency_limit
+# parameter.
+#
+lmtp_destination_concurrency_limit = $default_destination_concurrency_limit
+
+# The lmtp_destination_recipient_limit parameter limits the number
+# of recipients per delivery via the lmtp delivery agent.
+# 
+# The default is taken from the default_destination_recipient_limit
+# parameter.
+#
+lmtp_destination_recipient_limit = $default_destination_recipient_limit
+
+#
+# TIMEOUT CONTROLS
+#
+# Note: if you set LMTP timeouts to large values you must update the
+# global ipc_timeout and daemon_timeout parameters as well. See
+# sample-misc.cf for details.
+#
+
+# The lmtp_connect_timeout parameter specifies the LMTP client
+# timeout for completing a TCP connection.
+#
+# When no connection can be made within the deadline, the LMTP client
+# tries the next address on the mail exchanger list. Specify 0 to
+# disable the timeout.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+# lmtp_connect_timeout = 30s
+lmtp_connect_timeout = 0s
+
+# The lmtp_lhlo_timeout parameter specifies the LMTP client timeout
+# for receiving the LMTP greeting banner.
+#
+# When the server drops the connection without sending a greeting
+# banner, or when it sends no greeting banner within the deadline,
+# the LMTP client tries the next address on the mail exchanger list.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+lmtp_lhlo_timeout = 300s
+
+# The lmtp_mail_timeout parameter specifies the LMTP client timeout
+# for sending the LMTP MAIL FROM command, and for receiving the server
+# response.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+lmtp_mail_timeout = 300s
+
+# The lmtp_rcpt_timeout parameter specifies the LMTP client timeout
+# for sending the LMTP RCPT TO command, and for receiving the server
+# response.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+lmtp_rcpt_timeout = 300s
+
+# The lmtp_data_init_timeout parameter specifies the LMTP client
+# timeout for sending the LMTP DATA command, and for receiving the
+# server response.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+lmtp_data_init_timeout = 120s
+
+# The lmtp_data_xfer_timeout parameter specifies the LMTP client
+# timeout for sending the LMTP message content. When the connection
+# stalls for more than $lmtp_data_xfer_timeout the LMTP client
+# terminates the transfer.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+lmtp_data_xfer_timeout = 180s
+
+# The lmtp_data_done_timeout parameter specifies the LMTP client
+# timeout for sending the LMTP ".", and for receiving the server
+# response.
+# 
+# When no response is received within the deadline, a warning is
+# logged that the mail may be delivered multiple times.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+lmtp_data_done_timeout = 600s
+
+# The lmtp_rset_timeout parameter specifies the LMTP client timeout
+# for sending the LMTP RSET command, and for receiving the server
+# response. The LMTP client sends RSET in order to find out if a
+# cached connection is still alive.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+lmtp_rset_timeout = 300s
+
+# The lmtp_quit_timeout parameter specifies the LMTP client timeout
+# for sending the LMTP QUIT command, and for receiving the server
+# response.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+lmtp_quit_timeout = 300s
index f171541f974fb7055ca43f2a6f614ae70781c7ad..ed7b57db4eeeefee2584cdb87f28b85027f34ce6 100644 (file)
@@ -108,17 +108,21 @@ import_environment = MAIL_CONFIG TZ XAUTHORITY DISPLAY
 #
 inet_interfaces = all
 
-# The ipc_idle parameter bounds the idle time in seconds after which
-# an internal IPC client disconnects. The purpose is to allow servers
-# to terminate voluntarily. Currently this is used by the address
-# resolving and rewriting clients.
+# The ipc_idle parameter bounds the idle time for internal communication
+# channels after which a client disconnects voluntarily. The purpose
+# is to allow servers to terminate voluntarily after they become
+# idle. Currently this is used by the address resolving and rewriting
+# clients.
 #
-ipc_idle = 100
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+ipc_idle = 100s
 
-# The ipc_timeout parameter specifies a timeout in seconds for I/O
-# on internal communication channels.  The purpose is to break out
-# of deadlock situations. If the timeout is exceeded the software
-# aborts with a fatal error.
+# The ipc_timeout parameter specifies a timeout for I/O on internal
+# communication channels.  The purpose is to break out of deadlock
+# situations. If the timeout is exceeded the software aborts with a
+# fatal error.
 #
 # Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 # The default time unit is s (seconds).
@@ -145,11 +149,14 @@ mail_owner = postfix
 #
 mail_version = 19981207
 
-# The max_idle parameter limits the time in seconds that a Postfix
-# daemon process waits for the next service request before exiting.
-# This parameter is ignored by the Postfix queue manager.
+# The max_idle parameter limits the time that a Postfix daemon process
+# waits for the next service request before exiting.  This parameter
+# is ignored by the Postfix queue manager.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
 #
-max_idle = 100
+max_idle = 100s
 
 # The max_use parameter limits the number of service requests handled
 # by a Postfix daemon process before exiting. This parameter is
@@ -344,7 +351,7 @@ syslog_facility = mail
 #
 trigger_timeout = 10s
 
-# The delay_warning_time specifies after how many hours a warning
+# The delay_warning_time specifies after how much time a warning
 # is sent that mail has not yet been delivered. By default, no warning
 # is sent.
 #
index 05cf5bf5aea4130fffedaa5014850fce3ea1b706..8cd1bb4e4d128b2664c0d1aa8a55924a86e7052f 100644 (file)
@@ -28,28 +28,34 @@ default_destination_recipient_limit = 50
 #
 initial_destination_concurrency = 2
 
-# The maximal_backoff_time parameter specifies the maximal time in
-# seconds between attempts to deliver a deferred message.
+# The maximal_backoff_time parameter specifies the maximal time
+# between attempts to deliver a deferred message.
 #
-maximal_backoff_time = 4000
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+maximal_backoff_time = 4000s
 
-# The maximal_queue_lifetime parameter specifies the maximal time in
-# days a message is queued before it is sent back as undeliverable.
+# The maximal_queue_lifetime parameter specifies the maximal time
+# a message is queued before it is sent back as undeliverable.
 #
 # Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 # The default time unit is d (days).
 #
 maximal_queue_lifetime = 5d
 
-# The minimal_backoff_time parameter specifies the minimal time in
-# seconds between attempts to deliver a deferred message.  This
-# parameter also limits the time an unreachable destination is kept
-# in the short-term, in-memory destination status cache.
+# The minimal_backoff_time parameter specifies the minimal time
+# between attempts to deliver a deferred message.  This parameter
+# also limits the time an unreachable destination is kept in the
+# short-term, in-memory, destination status cache.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
 #
-minimal_backoff_time = 1000
+minimal_backoff_time = 1000s
 
-# The queue_run_delay parameter specifies the time in seconds
-# between deferred queue scans by the queue manager.
+# The queue_run_delay parameter specifies the time between deferred
+# queue scans by the queue manager.
 #
 # Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 # The default time unit is s (seconds).
index 2e4ba8b9066173a68fa63309f50c49fb89969fa2..13c7211b55ad7d7935084ae6f309d423ee0cdf49 100644 (file)
@@ -33,8 +33,8 @@ default_process_limit = 50
 #
 deliver_lock_attempts = 5
 
-# The deliver_lock_delay parameter limits the time in seconds between
-# attempts to acquire an exclusive lock.
+# The deliver_lock_delay parameter specifies the time between attempts
+# to acquire an exclusive lock.
 #
 # Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 # The default time unit is s (seconds).
@@ -52,8 +52,8 @@ duplicate_filter_limit = 1000
 #
 fork_attempts = 5
 
-# The fork_delay parameter specifies the delay in seconds between
-# fork() attempts.
+# The fork_delay parameter specifies the delay between attempts to
+# fork() an external process.
 #
 # Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 # The default time unit is s (seconds).
@@ -97,10 +97,16 @@ queue_minfree = 0
 # The stale_lock_time parameter limits the time after which a stale
 # lock is removed. This is used for delivery to file or mailbox.
 #
-stale_lock_time = 500
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
+#
+stale_lock_time = 500s
 
-# The transport_retry_time parameter specifies the time in seconds
-# between attempts by the queue manager to contact a broken message
-# delivery transport.
+# The transport_retry_time parameter specifies the time between
+# attempts by the queue manager to contact a broken message delivery
+# transport.
+#
+# Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
+# The default time unit is s (seconds).
 #
-transport_retry_time = 60
+transport_retry_time = 60s
index a5f0e184b8f8ad0a3809de154e71363b94d791ff..0750e0f213fa36ecf8c2800d41527d6240725980 100644 (file)
@@ -108,7 +108,7 @@ smtp_destination_recipient_limit = $default_destination_recipient_limit
 #
 
 # The smtp_connect_timeout parameter specifies the SMTP client
-# timeout in seconds for completing a TCP connection.
+# timeout for completing a TCP connection.
 #
 # When no connection can be made within the deadline, the SMTP client
 # tries the next address on the mail exchanger list. Specify 0 to
@@ -121,7 +121,7 @@ smtp_destination_recipient_limit = $default_destination_recipient_limit
 smtp_connect_timeout = 0s
 
 # The smtp_helo_timeout parameter specifies the SMTP client timeout
-# in seconds for receiving the SMTP greeting banner.
+# for receiving the SMTP greeting banner.
 #
 # When the server drops the connection without sending a greeting
 # banner, or when it sends no greeting banner within the deadline,
@@ -133,8 +133,8 @@ smtp_connect_timeout = 0s
 smtp_helo_timeout = 300s
 
 # The smtp_mail_timeout parameter specifies the SMTP client timeout
-# in seconds for sending the SMTP MAIL FROM command, and for receiving
-# the server response.
+# for sending the SMTP MAIL FROM command, and for receiving the server
+# response.
 #
 # In case of problems the client does NOT try the next address on
 # the mail exchanger list.
@@ -145,8 +145,8 @@ smtp_helo_timeout = 300s
 smtp_mail_timeout = 300s
 
 # The smtp_rcpt_timeout parameter specifies the SMTP client timeout
-# in seconds for sending the SMTP RCPT TO command, and for receiving
-# the server response.
+# for sending the SMTP RCPT TO command, and for receiving the server
+# response.
 #
 # In case of problems the client does NOT try the next address on
 # the mail exchanger list.
@@ -157,8 +157,8 @@ smtp_mail_timeout = 300s
 smtp_rcpt_timeout = 300s
 
 # The smtp_data_init_timeout parameter specifies the SMTP client
-# timeout in seconds for sending the SMTP DATA command, and for
-# receiving the server response.
+# timeout for sending the SMTP DATA command, and for receiving the
+# server response.
 #
 # In case of problems the client does NOT try the next address on
 # the mail exchanger list.
@@ -169,9 +169,9 @@ smtp_rcpt_timeout = 300s
 smtp_data_init_timeout = 120s
 
 # The smtp_data_xfer_timeout parameter specifies the SMTP client
-# timeout in seconds for sending the SMTP message content. When
-# the connection stalls for more than $smtp_data_xfer_timeout the
-# SMTP client terminates the transfer.
+# timeout for sending the SMTP message content. When the connection
+# stalls for more than $smtp_data_xfer_timeout the SMTP client
+# terminates the transfer.
 #
 # In case of problems the client does NOT try the next address on
 # the mail exchanger list.
@@ -182,8 +182,8 @@ smtp_data_init_timeout = 120s
 smtp_data_xfer_timeout = 180s
 
 # The smtp_data_done_timeout parameter specifies the SMTP client
-# timeout in seconds for sending the SMTP ".", and for receiving
-# the server response.
+# timeout for sending the SMTP ".", and for receiving the server
+# response.
 # 
 # When no response is received within the deadline, a warning is
 # logged that the mail may be delivered multiple times.
@@ -197,8 +197,8 @@ smtp_data_xfer_timeout = 180s
 smtp_data_done_timeout = 600s
 
 # The smtp_quit_timeout parameter specifies the SMTP client timeout
-# in seconds for sending the SMTP QUIT command, and for receiving
-# the server response.
+# for sending the SMTP QUIT command, and for receiving the server
+# response.
 #
 # Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 # The default time unit is s (seconds).
index 3e31c0bdd1128c9c2264343e5b475b9cf454bf9a..f54e33a00123902d61c25adc20e2eda93c377109 100644 (file)
@@ -52,8 +52,8 @@ smtpd_etrn_restrictions =
 #
 smtpd_recipient_limit = 1000
 
-# The smtpd_timeout parameter limits the time in seconds to send an
-# SMTP server response and to receive an SMTP client request.
+# The smtpd_timeout parameter limits the time to send an SMTP server
+# response and to receive an SMTP client request.
 #
 # Note: if you set SMTP timeouts to large values you must update the
 # global ipc_timeout parameter as well. See sample-misc.cf for details.
index 661e570fc1e29b32be3d2fb105bf774dc9055cb8..25ff4baf0f4a7f3b9db522c5583dab2f7bae4189 100644 (file)
@@ -187,10 +187,10 @@ LMTP(8)                                                   LMTP(8)
               parameter.
 
 <b>Timeout</b> <b>controls</b>
-       <b>lmtp</b><i>_</i><b>connect</b><i>_</i><b>timeout</b>
-              Timeout  in seconds for opening a connection to the
-              LMTP server.  If no connection can be  made  within
-              the deadline, the message is deferred.
+       The  default  time  unit is seconds; an explicit time unit
+       can be specified by appending a one-letter suffix  to  the
+       value:  s (seconds), m (minutes), h (hours), d (days) or w
+       (weeks).
 
 
 
@@ -203,38 +203,43 @@ LMTP(8)                                                   LMTP(8)
 LMTP(8)                                                   LMTP(8)
 
 
+       <b>lmtp</b><i>_</i><b>connect</b><i>_</i><b>timeout</b>
+              Timeout  for  opening  a  connection  to  the  LMTP
+              server.   If  no  connection can be made within the
+              deadline, the message is deferred.
+
        <b>lmtp</b><i>_</i><b>lhlo</b><i>_</i><b>timeout</b>
-              Timeout  in  seconds  for sending the <b>LHLO</b> command,
-              and for receiving the server response.
+              Timeout for  sending  the  <b>LHLO</b>  command,  and  for
+              receiving the server response.
 
        <b>lmtp</b><i>_</i><b>mail</b><i>_</i><b>timeout</b>
-              Timeout in seconds for sending the <b>MAIL</b>  <b>FROM</b>  com-
-              mand, and for receiving the server response.
+              Timeout  for sending the <b>MAIL</b> <b>FROM</b> command, and for
+              receiving the server response.
 
        <b>lmtp</b><i>_</i><b>rcpt</b><i>_</i><b>timeout</b>
-              Timeout in seconds for sending the <b>RCPT</b> <b>TO</b> command,
-              and for receiving the server response.
+              Timeout for sending the <b>RCPT</b> <b>TO</b>  command,  and  for
+              receiving the server response.
 
        <b>lmtp</b><i>_</i><b>data</b><i>_</i><b>init</b><i>_</i><b>timeout</b>
-              Timeout in seconds for sending  the  <b>DATA</b>  command,
-              and for receiving the server response.
+              Timeout  for  sending  the  <b>DATA</b>  command,  and for
+              receiving the server response.
 
        <b>lmtp</b><i>_</i><b>data</b><i>_</i><b>xfer</b><i>_</i><b>timeout</b>
-              Timeout in seconds for sending the message content.
+              Timeout for sending the message content.
 
        <b>lmtp</b><i>_</i><b>data</b><i>_</i><b>done</b><i>_</i><b>timeout</b>
-              Timeout in seconds for sending the "<b>.</b>" command, and
-              for receiving the server response. When no response
-              is received, a warning is logged that the mail  may
-              be delivered multiple times.
+              Timeout  for  sending  the  "<b>.</b>"  command,  and  for
+              receiving  the server response. When no response is
+              received, a warning is logged that the mail may  be
+              delivered multiple times.
 
        <b>lmtp</b><i>_</i><b>rset</b><i>_</i><b>timeout</b>
-              Timeout  in  seconds  for sending the <b>RSET</b> command,
-              and for receiving the server response.
+              Timeout  for  sending  the  <b>RSET</b>  command,  and for
+              receiving the server response.
 
        <b>lmtp</b><i>_</i><b>quit</b><i>_</i><b>timeout</b>
-              Timeout in seconds for sending  the  <b>QUIT</b>  command,
-              and for receiving the server response.
+              Timeout for  sending  the  <b>QUIT</b>  command,  and  for
+              receiving the server response.
 
 <b>SEE</b> <b>ALSO</b>
        <a href="bounce.8.html">bounce(8)</a> non-delivery status reports
@@ -252,11 +257,6 @@ LMTP(8)                                                   LMTP(8)
 <b>AUTHOR(S)</b>
        Wietse Venema
        IBM T.J. Watson Research
-       P.O. Box 704
-       Yorktown Heights, NY 10598, USA
-
-       Alterations for LMTP by:
-       Philip A. Prindeville
 
 
 
@@ -269,6 +269,11 @@ LMTP(8)                                                   LMTP(8)
 LMTP(8)                                                   LMTP(8)
 
 
+       P.O. Box 704
+       Yorktown Heights, NY 10598, USA
+
+       Alterations for LMTP by:
+       Philip A. Prindeville
        Mirapoint, Inc.
        USA.
 
@@ -315,11 +320,6 @@ LMTP(8)                                                   LMTP(8)
 
 
 
-
-
-
-
-
 
 
 
index 874def28857cb7de97ae9f2c9b5f4edb8f9781f7..b493e7090e4f47f74860fb97ad7775e447f232fe 100644 (file)
@@ -210,53 +210,53 @@ SMTP(8)                                                   SMTP(8)
 
 <b>Timeout</b> <b>controls</b>
        The default time unit is seconds; an  explicit  time  unit
-       can be specified by appending a one-letter suffix: s (sec-
-       onds), m (minutes), h (hours), d (days) or w (weeks).
+       can  be  specified by appending a one-letter suffix to the
+       value: s (seconds), m (minutes), h (hours), d (days) or  w
+       (weeks).
 
        <b>smtp</b><i>_</i><b>connect</b><i>_</i><b>timeout</b>
-              Timeout (default: seconds)  for  completing  a  TCP
-              connection.  When  no connection can be made within
-              the  deadline,  the  SMTP  client  tries  the  next
-              address on the mail exchanger list.
-
-       <b>smtp</b><i>_</i><b>helo</b><i>_</i><b>timeout</b>
-              Timeout  (default:  seconds) for receiving the SMTP
-              greeting banner.  When the server drops the connec-
-              tion  without sending a greeting banner, or when it
-              sends no greeting banner within the  deadline,  the
+              Timeout  for  completing  a TCP connection. When no
+              connection can be made  within  the  deadline,  the
               SMTP  client  tries  the  next  address on the mail
               exchanger list.
 
        <b>smtp</b><i>_</i><b>helo</b><i>_</i><b>timeout</b>
-              Timeout (default: seconds)  for  sending  the  <b>HELO</b>
-              command, and for receiving the server response.
+              Timeout for receiving  the  SMTP  greeting  banner.
+              When  the server drops the connection without send-
+              ing a greeting banner, or when it sends no greeting
+              banner  within  the deadline, the SMTP client tries
+              the next address on the mail exchanger list.
+
+       <b>smtp</b><i>_</i><b>helo</b><i>_</i><b>timeout</b>
+              Timeout for  sending  the  <b>HELO</b>  command,  and  for
+              receiving the server response.
 
        <b>smtp</b><i>_</i><b>mail</b><i>_</i><b>timeout</b>
-              Timeout  (default:  seconds)  for  sending the <b>MAIL</b>
-              <b>FROM</b>  command,  and  for   receiving   the   server
-              response.
+              Timeout  for sending the <b>MAIL</b> <b>FROM</b> command, and for
+              receiving the server response.
 
        <b>smtp</b><i>_</i><b>rcpt</b><i>_</i><b>timeout</b>
-              Timeout  (default: seconds) for sending the <b>RCPT</b> <b>TO</b>
-              command, and for receiving the server response.
+              Timeout for sending the <b>RCPT</b> <b>TO</b>  command,  and  for
+              receiving the server response.
 
        <b>smtp</b><i>_</i><b>data</b><i>_</i><b>init</b><i>_</i><b>timeout</b>
-              Timeout (default: seconds)  for  sending  the  <b>DATA</b>
-              command, and for receiving the server response.
+              Timeout  for  sending  the  <b>DATA</b>  command,  and for
+              receiving the server response.
 
        <b>smtp</b><i>_</i><b>data</b><i>_</i><b>xfer</b><i>_</i><b>timeout</b>
-              Timeout  (default: seconds) for sending the message
-              content.
+              Timeout for sending the message content.
 
        <b>smtp</b><i>_</i><b>data</b><i>_</i><b>done</b><i>_</i><b>timeout</b>
-              Timeout (default: seconds) for sending the "<b>.</b>" com-
-              mand,  and  for receiving the server response. When
-              no response is received, a warning is  logged  that
-              the mail may be delivered multiple times.
+              Timeout  for  sending  the  "<b>.</b>"  command,  and  for
+              receiving  the server response. When no response is
+              received, a warning is logged that the mail may  be
+              delivered multiple times.
 
        <b>smtp</b><i>_</i><b>quit</b><i>_</i><b>timeout</b>
-              Timeout  (default:  seconds)  for  sending the <b>QUIT</b>
-              command, and for receiving the server response.
+              Timeout  for  sending  the  <b>QUIT</b>  command,  and for
+              receiving the server response.
+
+
 
 
 
index 8af70aa5263a84887dbf07632cc5d35cfeb70f9a..3fe89ed124e5ce06f738e95888ad72cfa72ce193 100644 (file)
@@ -150,33 +150,37 @@ care when setting this parameter.
 .SH "Timeout controls"
 .ad
 .fi
+.PP
+The default time unit is seconds; an explicit time unit can
+be specified by appending a one-letter suffix to the value:
+s (seconds), m (minutes), h (hours), d (days) or w (weeks).
 .IP \fBlmtp_connect_timeout\fR
-Timeout in seconds for opening a connection to the LMTP server.
+Timeout for opening a connection to the LMTP server.
 If no connection can be made within the deadline, the message
 is deferred.
 .IP \fBlmtp_lhlo_timeout\fR
-Timeout in seconds for sending the \fBLHLO\fR command, and for
+Timeout for sending the \fBLHLO\fR command, and for
 receiving the server response.
 .IP \fBlmtp_mail_timeout\fR
-Timeout in seconds for sending the \fBMAIL FROM\fR command, and for
+Timeout for sending the \fBMAIL FROM\fR command, and for
 receiving the server response.
 .IP \fBlmtp_rcpt_timeout\fR
-Timeout in seconds for sending the \fBRCPT TO\fR command, and for
+Timeout for sending the \fBRCPT TO\fR command, and for
 receiving the server response.
 .IP \fBlmtp_data_init_timeout\fR
-Timeout in seconds for sending the \fBDATA\fR command, and for
+Timeout for sending the \fBDATA\fR command, and for
 receiving the server response.
 .IP \fBlmtp_data_xfer_timeout\fR
-Timeout in seconds for sending the message content.
+Timeout for sending the message content.
 .IP \fBlmtp_data_done_timeout\fR
-Timeout in seconds for sending the "\fB.\fR" command, and for
+Timeout for sending the "\fB.\fR" command, and for
 receiving the server response. When no response is received, a
 warning is logged that the mail may be delivered multiple times.
 .IP \fBlmtp_rset_timeout\fR
-Timeout in seconds for sending the \fBRSET\fR command, and for
+Timeout for sending the \fBRSET\fR command, and for
 receiving the server response.
 .IP \fBlmtp_quit_timeout\fR
-Timeout in seconds for sending the \fBQUIT\fR command, and for
+Timeout for sending the \fBQUIT\fR command, and for
 receiving the server response.
 .SH SEE ALSO
 .na
index 46a79e3f7248cbba3a9b3558422a1257e6bdd44c..ac6b37604ebb01b9dac57e344894db3f2d464fbc 100644 (file)
@@ -155,38 +155,38 @@ The default limit is taken from the
 .fi
 .PP
 The default time unit is seconds; an explicit time unit can
-be specified by appending a one-letter suffix: s (seconds),
-m (minutes), h (hours), d (days) or w (weeks).
+be specified by appending a one-letter suffix to the value:
+s (seconds), m (minutes), h (hours), d (days) or w (weeks).
 .IP \fBsmtp_connect_timeout\fR
-Timeout (default: seconds) for completing a TCP connection. When no
+Timeout for completing a TCP connection. When no
 connection can be made within the deadline, the SMTP client
 tries the next address on the mail exchanger list.
 .IP \fBsmtp_helo_timeout\fR
-Timeout (default: seconds) for receiving the SMTP greeting banner.
+Timeout for receiving the SMTP greeting banner.
 When the server drops the connection without sending a
 greeting banner, or when it sends no greeting banner within the
 deadline, the SMTP client tries the next address on the mail
 exchanger list.
 .IP \fBsmtp_helo_timeout\fR
-Timeout (default: seconds) for sending the \fBHELO\fR command, and for
+Timeout for sending the \fBHELO\fR command, and for
 receiving the server response.
 .IP \fBsmtp_mail_timeout\fR
-Timeout (default: seconds) for sending the \fBMAIL FROM\fR command, and for
+Timeout for sending the \fBMAIL FROM\fR command, and for
 receiving the server response.
 .IP \fBsmtp_rcpt_timeout\fR
-Timeout (default: seconds) for sending the \fBRCPT TO\fR command, and for
+Timeout for sending the \fBRCPT TO\fR command, and for
 receiving the server response.
 .IP \fBsmtp_data_init_timeout\fR
-Timeout (default: seconds) for sending the \fBDATA\fR command, and for
+Timeout for sending the \fBDATA\fR command, and for
 receiving the server response.
 .IP \fBsmtp_data_xfer_timeout\fR
-Timeout (default: seconds) for sending the message content.
+Timeout for sending the message content.
 .IP \fBsmtp_data_done_timeout\fR
-Timeout (default: seconds) for sending the "\fB.\fR" command, and for
+Timeout for sending the "\fB.\fR" command, and for
 receiving the server response. When no response is received, a
 warning is logged that the mail may be delivered multiple times.
 .IP \fBsmtp_quit_timeout\fR
-Timeout (default: seconds) for sending the \fBQUIT\fR command, and for
+Timeout for sending the \fBQUIT\fR command, and for
 receiving the server response.
 .SH SEE ALSO
 .na
index 921dc28024c6d3886d6db3361d31b0f5baf5a23b..b31a1e8f5e92e97ef2baaa0a00bb525eddd0d554 100644 (file)
@@ -339,11 +339,11 @@ int     bounce_boilerplate(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
                        "####################################################################");
        post_mail_fputs(bounce, "");
        post_mail_fprintf(bounce,
-                       "Your message could not be delivered for %d hours.",
-                         var_delay_warn_time);
+                       "Your message could not be delivered for %.1g hours.",
+                         var_delay_warn_time / 3600.0);
        post_mail_fprintf(bounce,
-                         "It will be retried until it is %d days old.",
-                         var_max_queue_time);
+                         "It will be retried until it is %.1g days old.",
+                         var_max_queue_time / 86400.0);
     }
 
     post_mail_fputs(bounce, "");
@@ -478,7 +478,7 @@ int     bounce_recipient_dsn(VSTREAM *bounce, BOUNCE_INFO *bounce_info)
 #endif
     if (bounce_info->flush == 0)
        post_mail_fprintf(bounce, "Will-Retry-Until: %s",
-        mail_date(bounce_info->arrival_time + 86400 * var_max_queue_time));
+        mail_date(bounce_info->arrival_time + var_max_queue_time));
     return (vstream_ferror(bounce));
 }
 
diff --git a/postfix/src/global/local_transport.c b/postfix/src/global/local_transport.c
deleted file mode 100644 (file)
index cb109f7..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/*++
-/* NAME
-/*     local_transport 3
-/* SUMMARY
-/*     determine if transport delivers locally
-/* SYNOPSIS
-/*     #include <local_transport.h>
-/*
-/*     const char *get_def_local_transport()
-/*
-/*     int     match_def_local_transport(transport)
-/*     const char *transport;
-/*
-/*     int     match_any_local_transport(transport)
-/*     const char *transport;
-/* DESCRIPTION
-/*     This module uses the information kept in the "local_transports"
-/*     configuration parameter, which lists the name of the default
-/*     local transport, followed by the names of zero or more other
-/*     transports that deliver locally.
-/*
-/*     get_def_local_transport() returns the name of the default local
-/*     transport, that is, the first transport name specified with
-/*     the "local_transports" configuration parameter.
-/*
-/*     match_def_local_transport() determines if the named transport is
-/*     identical to the default local transport.
-/*
-/*     match_any_local_transport() determines if the named transport is
-/*     listed in the "local_transports" configuration parameter.
-/* SEE ALSO
-/*     resolve_local(3), see if address resolves locally
-/* 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
-/*--*/
-
-/* System library. */
-
-#include <sys_defs.h>
-#include <string.h>
-
-/* Utility library. */
-
-#include <msg.h>
-#include <mymalloc.h>
-#include <string_list.h>
-
-/* Global library. */
-
-#include <mail_params.h>
-#include <local_transport.h>
-
-/* Application-specific */
-
-static STRING_LIST *local_transport_list;
-static char *local_transport_name;
-
-/* local_transport_init - initialize lookup table */
-
-static void local_transport_init(void)
-{
-    char   *myname = "local_transport_init";
-
-    /*
-     * Sanity check.
-     */
-    if (local_transport_list || local_transport_name)
-       msg_panic("local_transport_init: duplicate initialization");
-
-    /*
-     * Initialize.
-     */
-    local_transport_list = string_list_init(var_local_transports);
-    local_transport_name = mystrndup(var_local_transports,
-                                strcspn(var_local_transports, ", \t\r\n"));
-
-    /*
-     * Sanity check.
-     */
-    if (!match_any_local_transport(local_transport_name)
-       || !match_def_local_transport(local_transport_name))
-       msg_panic("%s: unable to intialize", myname);
-}
-
-/* get_def_local_transport - determine default local transport */
-
-const char *get_def_local_transport(void)
-{
-
-    /*
-     * Initialize on the fly.
-     */
-    if (local_transport_name == 0)
-       local_transport_init();
-
-    /*
-     * Return the first transport listed.
-     */
-    return (local_transport_name);
-}
-
-/* match_def_local_transport - match against default local transport */
-
-int     match_def_local_transport(const char *transport)
-{
-
-    /*
-     * Initialize on the fly.
-     */
-    if (local_transport_list == 0)
-       local_transport_init();
-
-    /*
-     * Compare the transport against the list of transports that are listed
-     * as delivering locally.
-     */
-    return (strcmp(transport, local_transport_name) == 0);
-}
-
-/* match_any_local_transport - match against list of local transports */
-
-int     match_any_local_transport(const char *transport)
-{
-
-    /*
-     * Initialize on the fly.
-     */
-    if (local_transport_list == 0)
-       local_transport_init();
-
-    /*
-     * Compare the transport against the list of transports that are listed
-     * as delivering locally.
-     */
-    return (string_list_match(local_transport_list, transport));
-}
-
-#ifdef TEST
-
-#include <vstream.h>
-#include <mail_conf.h>
-
-int     main(int argc, char **argv)
-{
-    if (argc != 2)
-       msg_fatal("usage: %s transport", argv[0]);
-    mail_conf_read();
-    vstream_printf("%s\n", match_any_local_transport(argv[1]) ? "yes" : "no");
-    vstream_fflush(VSTREAM_OUT);
-}
-
-#endif
diff --git a/postfix/src/global/local_transport.h b/postfix/src/global/local_transport.h
deleted file mode 100644 (file)
index de8512d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _LOCAL_TRANSPORT_H_INCLUDED_
-#define _LOCAL_TRANSPORT_H_INCLUDED_
-
-/*++
-/* NAME
-/*     local_transport 3h
-/* SUMMARY
-/*     determine if transport delivers locally
-/* SYNOPSIS
-/*     #include <local_transport.h>
-/* DESCRIPTION
-/* .nf
-
- /*
-  * External interface.
-  */
-extern const char *get_def_local_transport(void);
-extern int match_def_local_transport(const char *);
-extern int match_any_local_transport(const char *);
-
-/* 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
index af696544b2ceafeb56d76488bef67b407aaea775..8a160a16d9ed94652969c6639b3a0dea462823a6 100644 (file)
@@ -121,7 +121,7 @@ static int convert_mail_conf_time(const char *name, int *intval, int def_unit)
            return (1);
        }
     }
-    msg_fatal("bad time parameter configuration: %s = %s", name, strval);
+    msg_fatal("parameter %s: bad time unit: %s", name, strval);
 }
 
 /* check_mail_conf_time - validate integer value */
@@ -221,36 +221,21 @@ int     main(int unused_argc, char **unused_argv)
     static int hours;
     static int days;
     static int weeks;
-    static CONFIG_TIME_TABLE time_table1[] = {
-       "seconds", "10s", &seconds, 's', 0, 0,
-       "minutes", "10m", &minutes, 'm', 0, 0,
-       "hours", "10h", &hours, 'h', 0, 0,
-       "days", "10d", &days, 'd', 0, 0,
-       "weeks", "10w", &weeks, 'w', 0, 0,
+    static CONFIG_TIME_TABLE time_table[] = {
+       "seconds", "10s", &seconds, 0, 0,
+       "minutes", "10m", &minutes, 0, 0,
+       "hours", "10h", &hours, 0, 0,
+       "days", "10d", &days, 0, 0,
+       "weeks", "10w", &weeks, 0, 0,
        0,
     };
-    static CONFIG_TIME_TABLE time_table2[] = {
-       "seconds", "10", &seconds, 's', 0, 0,
-       "minutes", "10", &minutes, 'm', 0, 0,
-       "hours", "10", &hours, 'h', 0, 0,
-       "days", "10", &days, 'd', 0, 0,
-       "weeks", "10", &weeks, 'w', 0, 0,
-       0,
-    };
-
-    get_mail_conf_time_table(time_table1);
-    vstream_printf("seconds = %d\n", seconds);
-    vstream_printf("minutes = %d\n", minutes);
-    vstream_printf("hours = %d\n", hours);
-    vstream_printf("days = %d\n", days);
-    vstream_printf("weeks = %d\n", weeks);
 
-    get_mail_conf_time_table(time_table2);
-    vstream_printf("seconds = %d\n", seconds);
-    vstream_printf("minutes = %d\n", minutes);
-    vstream_printf("hours = %d\n", hours);
-    vstream_printf("days = %d\n", days);
-    vstream_printf("weeks = %d\n", weeks);
+    get_mail_conf_time_table(time_table);
+    vstream_printf("10 seconds = %d\n", seconds);
+    vstream_printf("10 minutes = %d\n", minutes);
+    vstream_printf("10 hours = %d\n", hours);
+    vstream_printf("10 days = %d\n", days);
+    vstream_printf("10 weeks = %d\n", weeks);
     vstream_fflush(VSTREAM_OUT);
 }
 
index fb604671a7f2e4fae513fdc525903d6cf487ccf9..5d1c60fd8011b08f75719ce854aba54236ee1af2 100644 (file)
@@ -308,12 +308,12 @@ void    mail_params_init()
     };
     static CONFIG_TIME_TABLE time_defaults[] = {
        VAR_MAX_IDLE, DEF_MAX_IDLE, &var_idle_limit, 1, 0,
-       VAR_IPC_IDLE, DEF_IPC_IDLE, &var_ipc_idle_limit, 1, 0,
        VAR_IPC_TIMEOUT, DEF_IPC_TIMEOUT, &var_ipc_timeout, 1, 0,
+       VAR_IPC_IDLE, DEF_IPC_IDLE, &var_ipc_idle_limit, 1, 0,
        VAR_TRIGGER_TIMEOUT, DEF_TRIGGER_TIMEOUT, &var_trigger_timeout, 1, 0,
+       VAR_FORK_DELAY, DEF_FORK_DELAY, &var_fork_delay, 1, 0,
        VAR_FLOCK_DELAY, DEF_FLOCK_DELAY, &var_flock_delay, 1, 0,
        VAR_FLOCK_STALE, DEF_FLOCK_STALE, &var_flock_stale, 1, 0,
-       VAR_FORK_DELAY, DEF_FORK_DELAY, &var_fork_delay, 1, 0,
        VAR_DAEMON_TIMEOUT, DEF_DAEMON_TIMEOUT, &var_daemon_timeout, 1, 0,
        0,
     };
index 67cf9154190fd5434acb0b08fe6d58acaad64321..eb177e4e4b3895b276b388b61eb428f81afb2e84 100644 (file)
@@ -1097,7 +1097,7 @@ extern int var_fflush_refresh;
   * and what Postfix exports to the external world.
   */
 #define VAR_IMPORT_ENVIRON             "import_environment"
-#define DEF_IMPORT_ENVIRON             "MAIL_CONFIG, TZ, XAUTHORITY, DISPLAY"
+#define DEF_IMPORT_ENVIRON             "MAIL_CONFIG MAIL_DEBUG TZ XAUTHORITY DISPLAY"
 extern char *var_import_environ;
 
 #define VAR_EXPORT_ENVIRON             "export_environment"
index b9c4d1922a71d1ae61ea10ab3f778646b21025e6..cc3de3f1761f31ee9a61693c488c17370e1166af 100644 (file)
@@ -146,7 +146,8 @@ void    mail_scan_register(int letter, const char *name, MAIL_SCAN_FN scanner)
 static int mail_scan_any(VSTREAM *stream, VSTRING *vp, char *what)
 {
     if (vstring_fgets_null(vp, stream) == 0) {
-       msg_warn("mail_scan_any: got EOF; expected: %s", what);
+       msg_warn("end of input while receiving %s data from service %s",
+                what, VSTREAM_PATH(stream));
        return (-1);
     }
     if (msg_verbose)
index 788b640c6d457f1afa1f44819ea8fe972492ea8c..14dc1a5a4283dd37b227a64899000e837057d4da 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20001215"
+#define DEF_MAIL_VERSION       "Snapshot-20001216"
 extern char *var_mail_version;
 
 /* LICENSE
index 7796d875fd4d914f019222278233c19b7c7bee61..dfd3ec5c3e75abae3edc30d9c727b3400bb6830c 100644 (file)
 /* .SH "Timeout controls"
 /* .ad
 /* .fi
+/* .PP
+/*     The default time unit is seconds; an explicit time unit can
+/*     be specified by appending a one-letter suffix to the value:
+/*     s (seconds), m (minutes), h (hours), d (days) or w (weeks).
 /* .IP \fBlmtp_connect_timeout\fR
-/*     Timeout in seconds for opening a connection to the LMTP server.
+/*     Timeout for opening a connection to the LMTP server.
 /*     If no connection can be made within the deadline, the message
 /*     is deferred.
 /* .IP \fBlmtp_lhlo_timeout\fR
-/*     Timeout in seconds for sending the \fBLHLO\fR command, and for
+/*     Timeout for sending the \fBLHLO\fR command, and for
 /*     receiving the server response.
 /* .IP \fBlmtp_mail_timeout\fR
-/*     Timeout in seconds for sending the \fBMAIL FROM\fR command, and for
+/*     Timeout for sending the \fBMAIL FROM\fR command, and for
 /*     receiving the server response.
 /* .IP \fBlmtp_rcpt_timeout\fR
-/*     Timeout in seconds for sending the \fBRCPT TO\fR command, and for
+/*     Timeout for sending the \fBRCPT TO\fR command, and for
 /*     receiving the server response.
 /* .IP \fBlmtp_data_init_timeout\fR
-/*     Timeout in seconds for sending the \fBDATA\fR command, and for
+/*     Timeout for sending the \fBDATA\fR command, and for
 /*     receiving the server response.
 /* .IP \fBlmtp_data_xfer_timeout\fR
-/*     Timeout in seconds for sending the message content.
+/*     Timeout for sending the message content.
 /* .IP \fBlmtp_data_done_timeout\fR
-/*     Timeout in seconds for sending the "\fB.\fR" command, and for
+/*     Timeout for sending the "\fB.\fR" command, and for
 /*     receiving the server response. When no response is received, a
 /*     warning is logged that the mail may be delivered multiple times.
 /* .IP \fBlmtp_rset_timeout\fR
-/*     Timeout in seconds for sending the \fBRSET\fR command, and for
+/*     Timeout for sending the \fBRSET\fR command, and for
 /*     receiving the server response.
 /* .IP \fBlmtp_quit_timeout\fR
-/*     Timeout in seconds for sending the \fBQUIT\fR command, and for
+/*     Timeout for sending the \fBQUIT\fR command, and for
 /*     receiving the server response.
 /* SEE ALSO
 /*     bounce(8) non-delivery status reports
@@ -492,6 +496,7 @@ int     main(int argc, char **argv)
                       MAIL_SERVER_INT_TABLE, int_table,
                       MAIL_SERVER_STR_TABLE, str_table,
                       MAIL_SERVER_BOOL_TABLE, bool_table,
+                      MAIL_SERVER_TIME_TABLE, time_table,
                       MAIL_SERVER_PRE_INIT, pre_init,
                       MAIL_SERVER_POST_INIT, post_init,
                       MAIL_SERVER_PRE_ACCEPT, pre_accept,
index 9d80e3666844c165a62388c6db62759baa8ed130..d48837000aa4620c559dae5e660d73873adcde2b 100644 (file)
@@ -321,7 +321,7 @@ static char *lmtp_parse_destination(const char *destination, char *def_service,
      * address notation, so using split_at_right() is not sufficient. We'd
      * have to count the number of ":" instances.
      */
-    if ((service = split_at_right(host, ':')) == 0)
+    if ((service = split_at_right(host, ':')) == 0 || *service == 0)
        service = def_service;
     if (*service == 0)
        msg_fatal("%s: empty service name: %s", myname, destination);
index aa2ad115734b2730fe767b03aae6261a25805493..722f44a14661f70af73be6eb85529483a6e54736 100644 (file)
@@ -563,9 +563,11 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
     char   *domain;
     const char *junk;
     char   *nexthop;
+    int     len;
 
 #define STREQ(x,y)     (strcasecmp(x,y) == 0)
 #define STR            vstring_str
+#define LEN            VSTRING_LEN
 #define UPDATE(ptr,new)        { myfree(ptr); ptr = mystrdup(new); }
 
     resolve_clnt_init(&reply);
@@ -675,18 +677,20 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
         * on the recipient delimiter if one is defined, but doing a proper
         * job requires knowledge of local aliases. Yuck! I don't want to
         * duplicate delivery-agent specific knowledge in the queue manager.
+        * XXX The nexthop field is overloaded to serve as destination and as
+        * queue name. Should have separate fields for queue name and for
+        * destination.
         */
        if ((at = strrchr(STR(reply.recipient), '@')) == 0
            || resolve_local(at + 1)) {
-           vstring_strcpy(reply.nexthop, STR(reply.recipient));
+           len = (at != 0 ? (at - STR(reply.recipient))
+                  : strlen(STR(reply.recipient)));
+           VSTRING_SPACE(reply.nexthop, len + 1);
+           memmove(STR(reply.nexthop) + len + 1, STR(reply.nexthop),
+                   LEN(reply.nexthop) + 1);
+           memcpy(STR(reply.nexthop), STR(reply.recipient), len);
+           STR(reply.nexthop)[len] = '@';
            lowercase(STR(reply.nexthop));
-#if 0
-           (void) split_at_right(STR(reply.nexthop), '@');
-#endif
-#if 0
-           if (*var_rcpt_delim)
-               (void) split_addr(STR(reply.nexthop), *var_rcpt_delim);
-#endif
 
            /*
             * Discard mail to the local double bounce address here, so this
index cc02674bc0b64d57f5d1edadcef5a93e7f26cf7b..bd6f74959f6f2e55956d6c28637d30fa644504d0 100644 (file)
@@ -441,9 +441,11 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
     char   *domain;
     const char *junk;
     char   *nexthop;
+    int     len;
 
 #define STREQ(x,y)     (strcasecmp(x,y) == 0)
 #define STR            vstring_str
+#define LEN            VSTRING_LEN
 #define UPDATE(ptr,new)        { myfree(ptr); ptr = mystrdup(new); }
 
     resolve_clnt_init(&reply);
@@ -553,18 +555,20 @@ static void qmgr_message_resolve(QMGR_MESSAGE *message)
         * on the recipient delimiter if one is defined, but doing a proper
         * job requires knowledge of local aliases. Yuck! I don't want to
         * duplicate delivery-agent specific knowledge in the queue manager.
+        * XXX The nexthop field is overloaded to serve as destination and as
+        * queue name. Should have separate fields for queue name and for
+        * destination.
         */
        if ((at = strrchr(STR(reply.recipient), '@')) == 0
            || resolve_local(at + 1)) {
-           vstring_strcpy(reply.nexthop, STR(reply.recipient));
+           len = (at != 0 ? (at - STR(reply.recipient))
+                  : strlen(STR(reply.recipient)));
+           VSTRING_SPACE(reply.nexthop, len + 1);
+           memmove(STR(reply.nexthop) + len + 1, STR(reply.nexthop),
+                   LEN(reply.nexthop) + 1);
+           memcpy(STR(reply.nexthop), STR(reply.recipient), len);
+           STR(reply.nexthop)[len] = '@';
            lowercase(STR(reply.nexthop));
-#if 0
-           (void) split_at_right(STR(reply.nexthop), '@');
-#endif
-#if 0
-           if (*var_rcpt_delim)
-               (void) split_addr(STR(reply.nexthop), *var_rcpt_delim);
-#endif
 
            /*
             * Discard mail to the local double bounce address here, so this
index 12639ae0ae5f6a8534a90214548030760259467f..6bce6f2e974f71ff52b4a5867ddb9590d130999e 100644 (file)
 /* .ad
 /* .fi
 /* .PP
-/*     The default time unit is seconds; an explicit time unit can 
-/*     be specified by appending a one-letter suffix: s (seconds), 
-/*     m (minutes), h (hours), d (days) or w (weeks).
+/*     The default time unit is seconds; an explicit time unit can
+/*     be specified by appending a one-letter suffix to the value:
+/*     s (seconds), m (minutes), h (hours), d (days) or w (weeks).
 /* .IP \fBsmtp_connect_timeout\fR
-/*     Timeout (default: seconds) for completing a TCP connection. When no
+/*     Timeout for completing a TCP connection. When no
 /*     connection can be made within the deadline, the SMTP client
 /*     tries the next address on the mail exchanger list.
 /* .IP \fBsmtp_helo_timeout\fR
-/*     Timeout (default: seconds) for receiving the SMTP greeting banner.
+/*     Timeout for receiving the SMTP greeting banner.
 /*     When the server drops the connection without sending a
 /*     greeting banner, or when it sends no greeting banner within the
 /*     deadline, the SMTP client tries the next address on the mail
 /*     exchanger list.
 /* .IP \fBsmtp_helo_timeout\fR
-/*     Timeout (default: seconds) for sending the \fBHELO\fR command, and for
+/*     Timeout for sending the \fBHELO\fR command, and for
 /*     receiving the server response.
 /* .IP \fBsmtp_mail_timeout\fR
-/*     Timeout (default: seconds) for sending the \fBMAIL FROM\fR command, and for
+/*     Timeout for sending the \fBMAIL FROM\fR command, and for
 /*     receiving the server response.
 /* .IP \fBsmtp_rcpt_timeout\fR
-/*     Timeout (default: seconds) for sending the \fBRCPT TO\fR command, and for
+/*     Timeout for sending the \fBRCPT TO\fR command, and for
 /*     receiving the server response.
 /* .IP \fBsmtp_data_init_timeout\fR
-/*     Timeout (default: seconds) for sending the \fBDATA\fR command, and for
+/*     Timeout for sending the \fBDATA\fR command, and for
 /*     receiving the server response.
 /* .IP \fBsmtp_data_xfer_timeout\fR
-/*     Timeout (default: seconds) for sending the message content.
+/*     Timeout for sending the message content.
 /* .IP \fBsmtp_data_done_timeout\fR
-/*     Timeout (default: seconds) for sending the "\fB.\fR" command, and for
+/*     Timeout for sending the "\fB.\fR" command, and for
 /*     receiving the server response. When no response is received, a
 /*     warning is logged that the mail may be delivered multiple times.
 /* .IP \fBsmtp_quit_timeout\fR
-/*     Timeout (default: seconds) for sending the \fBQUIT\fR command, and for
+/*     Timeout for sending the \fBQUIT\fR command, and for
 /*     receiving the server response.
 /* SEE ALSO
 /*     bounce(8) non-delivery status reports