--- /dev/null
+# 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
#
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).
#
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
#
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.
#
#
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).
#
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).
#
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).
# 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
#
# 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
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,
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.
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.
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.
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.
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.
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).
#
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.
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).
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
<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
LMTP(8) LMTP(8)
+ P.O. Box 704
+ Yorktown Heights, NY 10598, USA
+
+ Alterations for LMTP by:
+ Philip A. Prindeville
Mirapoint, Inc.
USA.
-
-
-
-
-
<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.
+
+
.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
.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
"####################################################################");
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, "");
#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));
}
+++ /dev/null
-/*++
-/* 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
+++ /dev/null
-#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
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 */
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);
}
};
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,
};
* 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"
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)
* 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
/* .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
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,
* 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);
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);
* 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
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);
* 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
/* .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