From: Wietse Venema Date: Sat, 16 Dec 2000 05:00:00 +0000 (-0500) Subject: snapshot-20001216 X-Git-Tag: v20010228~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2330c3ef92c735ae4e3c30677e851f7dc3903b1e;p=thirdparty%2Fpostfix.git snapshot-20001216 --- diff --git a/postfix/conf/sample-lmtp.cf b/postfix/conf/sample-lmtp.cf new file mode 100644 index 000000000..64419a35b --- /dev/null +++ b/postfix/conf/sample-lmtp.cf @@ -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 diff --git a/postfix/conf/sample-misc.cf b/postfix/conf/sample-misc.cf index f171541f9..ed7b57db4 100644 --- a/postfix/conf/sample-misc.cf +++ b/postfix/conf/sample-misc.cf @@ -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. # diff --git a/postfix/conf/sample-rate.cf b/postfix/conf/sample-rate.cf index 05cf5bf5a..8cd1bb4e4 100644 --- a/postfix/conf/sample-rate.cf +++ b/postfix/conf/sample-rate.cf @@ -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). diff --git a/postfix/conf/sample-resource.cf b/postfix/conf/sample-resource.cf index 2e4ba8b90..13c7211b5 100644 --- a/postfix/conf/sample-resource.cf +++ b/postfix/conf/sample-resource.cf @@ -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 diff --git a/postfix/conf/sample-smtp.cf b/postfix/conf/sample-smtp.cf index a5f0e184b..0750e0f21 100644 --- a/postfix/conf/sample-smtp.cf +++ b/postfix/conf/sample-smtp.cf @@ -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). diff --git a/postfix/conf/sample-smtpd.cf b/postfix/conf/sample-smtpd.cf index 3e31c0bdd..f54e33a00 100644 --- a/postfix/conf/sample-smtpd.cf +++ b/postfix/conf/sample-smtpd.cf @@ -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. diff --git a/postfix/html/lmtp.8.html b/postfix/html/lmtp.8.html index 661e570fc..25ff4baf0 100644 --- a/postfix/html/lmtp.8.html +++ b/postfix/html/lmtp.8.html @@ -187,10 +187,10 @@ LMTP(8) LMTP(8) parameter. Timeout controls - lmtp_connect_timeout - 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) + lmtp_connect_timeout + Timeout for opening a connection to the LMTP + server. If no connection can be made within the + deadline, the message is deferred. + lmtp_lhlo_timeout - Timeout in seconds for sending the LHLO command, - and for receiving the server response. + Timeout for sending the LHLO command, and for + receiving the server response. lmtp_mail_timeout - Timeout in seconds for sending the MAIL FROM com- - mand, and for receiving the server response. + Timeout for sending the MAIL FROM command, and for + receiving the server response. lmtp_rcpt_timeout - Timeout in seconds for sending the RCPT TO command, - and for receiving the server response. + Timeout for sending the RCPT TO command, and for + receiving the server response. lmtp_data_init_timeout - Timeout in seconds for sending the DATA command, - and for receiving the server response. + Timeout for sending the DATA command, and for + receiving the server response. lmtp_data_xfer_timeout - Timeout in seconds for sending the message content. + Timeout for sending the message content. lmtp_data_done_timeout - Timeout in seconds for sending the "." 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 "." command, and for + receiving the server response. When no response is + received, a warning is logged that the mail may be + delivered multiple times. lmtp_rset_timeout - Timeout in seconds for sending the RSET command, - and for receiving the server response. + Timeout for sending the RSET command, and for + receiving the server response. lmtp_quit_timeout - Timeout in seconds for sending the QUIT command, - and for receiving the server response. + Timeout for sending the QUIT command, and for + receiving the server response. SEE ALSO bounce(8) non-delivery status reports @@ -252,11 +257,6 @@ LMTP(8) LMTP(8) AUTHOR(S) 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) - - - - - diff --git a/postfix/html/smtp.8.html b/postfix/html/smtp.8.html index 874def288..b493e7090 100644 --- a/postfix/html/smtp.8.html +++ b/postfix/html/smtp.8.html @@ -210,53 +210,53 @@ SMTP(8) SMTP(8) Timeout controls 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). smtp_connect_timeout - 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. - - smtp_helo_timeout - 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. smtp_helo_timeout - Timeout (default: seconds) for sending the HELO - 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. + + smtp_helo_timeout + Timeout for sending the HELO command, and for + receiving the server response. smtp_mail_timeout - Timeout (default: seconds) for sending the MAIL - FROM command, and for receiving the server - response. + Timeout for sending the MAIL FROM command, and for + receiving the server response. smtp_rcpt_timeout - Timeout (default: seconds) for sending the RCPT TO - command, and for receiving the server response. + Timeout for sending the RCPT TO command, and for + receiving the server response. smtp_data_init_timeout - Timeout (default: seconds) for sending the DATA - command, and for receiving the server response. + Timeout for sending the DATA command, and for + receiving the server response. smtp_data_xfer_timeout - Timeout (default: seconds) for sending the message - content. + Timeout for sending the message content. smtp_data_done_timeout - Timeout (default: seconds) for sending the "." 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 "." command, and for + receiving the server response. When no response is + received, a warning is logged that the mail may be + delivered multiple times. smtp_quit_timeout - Timeout (default: seconds) for sending the QUIT - command, and for receiving the server response. + Timeout for sending the QUIT command, and for + receiving the server response. + + diff --git a/postfix/man/man8/lmtp.8 b/postfix/man/man8/lmtp.8 index 8af70aa52..3fe89ed12 100644 --- a/postfix/man/man8/lmtp.8 +++ b/postfix/man/man8/lmtp.8 @@ -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 diff --git a/postfix/man/man8/smtp.8 b/postfix/man/man8/smtp.8 index 46a79e3f7..ac6b37604 100644 --- a/postfix/man/man8/smtp.8 +++ b/postfix/man/man8/smtp.8 @@ -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 diff --git a/postfix/src/bounce/bounce_notify_util.c b/postfix/src/bounce/bounce_notify_util.c index 921dc2802..b31a1e8f5 100644 --- a/postfix/src/bounce/bounce_notify_util.c +++ b/postfix/src/bounce/bounce_notify_util.c @@ -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 index cb109f7be..000000000 --- a/postfix/src/global/local_transport.c +++ /dev/null @@ -1,159 +0,0 @@ -/*++ -/* NAME -/* local_transport 3 -/* SUMMARY -/* determine if transport delivers locally -/* SYNOPSIS -/* #include -/* -/* 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 -#include - -/* Utility library. */ - -#include -#include -#include - -/* Global library. */ - -#include -#include - -/* 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 -#include - -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 index de8512d69..000000000 --- a/postfix/src/global/local_transport.h +++ /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 -/* 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 diff --git a/postfix/src/global/mail_conf_time.c b/postfix/src/global/mail_conf_time.c index af696544b..8a160a16d 100644 --- a/postfix/src/global/mail_conf_time.c +++ b/postfix/src/global/mail_conf_time.c @@ -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); } diff --git a/postfix/src/global/mail_params.c b/postfix/src/global/mail_params.c index fb604671a..5d1c60fd8 100644 --- a/postfix/src/global/mail_params.c +++ b/postfix/src/global/mail_params.c @@ -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, }; diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index 67cf91541..eb177e4e4 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -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" diff --git a/postfix/src/global/mail_scan.c b/postfix/src/global/mail_scan.c index b9c4d1922..cc3de3f17 100644 --- a/postfix/src/global/mail_scan.c +++ b/postfix/src/global/mail_scan.c @@ -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) diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 788b640c6..14dc1a5a4 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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 diff --git a/postfix/src/lmtp/lmtp.c b/postfix/src/lmtp/lmtp.c index 7796d875f..dfd3ec5c3 100644 --- a/postfix/src/lmtp/lmtp.c +++ b/postfix/src/lmtp/lmtp.c @@ -134,33 +134,37 @@ /* .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, diff --git a/postfix/src/lmtp/lmtp_connect.c b/postfix/src/lmtp/lmtp_connect.c index 9d80e3666..d48837000 100644 --- a/postfix/src/lmtp/lmtp_connect.c +++ b/postfix/src/lmtp/lmtp_connect.c @@ -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); diff --git a/postfix/src/nqmgr/qmgr_message.c b/postfix/src/nqmgr/qmgr_message.c index aa2ad1157..722f44a14 100644 --- a/postfix/src/nqmgr/qmgr_message.c +++ b/postfix/src/nqmgr/qmgr_message.c @@ -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 diff --git a/postfix/src/qmgr/qmgr_message.c b/postfix/src/qmgr/qmgr_message.c index cc02674bc..bd6f74959 100644 --- a/postfix/src/qmgr/qmgr_message.c +++ b/postfix/src/qmgr/qmgr_message.c @@ -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 diff --git a/postfix/src/smtp/smtp.c b/postfix/src/smtp/smtp.c index 12639ae0a..6bce6f2e9 100644 --- a/postfix/src/smtp/smtp.c +++ b/postfix/src/smtp/smtp.c @@ -138,39 +138,39 @@ /* .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