From a360b3aff137e8cd9b65591cdc960ddad2b26b91 Mon Sep 17 00:00:00 2001
From: Wietse Venema
Date: Tue, 20 Jul 2004 00:00:00 -0500
Subject: [PATCH] postfix-2.2-20040720
---
postfix/.indent.pro | 10 +
postfix/HISTORY | 163 ++++++--
postfix/Makefile.in | 2 +-
postfix/README_FILES/OVERVIEW | 12 +
postfix/RELEASE_NOTES | 70 +++-
postfix/conf/master.cf | 1 +
postfix/conf/post-install | 9 +
postfix/conf/postfix-files | 2 +
postfix/examples/smtpd-policy/spf.pl | 2 +-
postfix/html/Makefile.in | 7 +-
postfix/html/OVERVIEW.html | 20 +
postfix/html/cleanup.8.html | 8 +-
postfix/html/ldap_table.5.html | 242 ++++++------
postfix/html/pipe.8.html | 20 +-
postfix/html/postconf.5.html | 110 +++++-
postfix/html/scache.8.html | 156 ++++++++
postfix/html/smtp.8.html | 125 +++++--
postfix/man/Makefile.in | 8 +-
postfix/man/man5/ldap_table.5 | 24 +-
postfix/man/man5/postconf.5 | 66 +++-
postfix/man/man8/cleanup.8 | 6 +-
postfix/man/man8/pipe.8 | 16 +-
postfix/man/man8/scache.8 | 152 ++++++++
postfix/man/man8/smtp.8 | 43 ++-
postfix/mantools/make-relnotes | 4 +-
postfix/mantools/postlink | 10 +
postfix/proto/OVERVIEW.html | 20 +
postfix/proto/ldap_table | 24 +-
postfix/proto/postconf.proto | 90 ++++-
postfix/src/anvil/Makefile.in | 2 +-
postfix/src/bounce/Makefile.in | 2 +-
postfix/src/cleanup/Makefile.in | 2 +-
postfix/src/cleanup/cleanup.c | 6 +-
postfix/src/dns/Makefile.in | 2 +-
postfix/src/dns/dns.h | 1 +
postfix/src/dns/dns_rr.c | 24 ++
postfix/src/error/Makefile.in | 2 +-
postfix/src/flush/Makefile.in | 2 +-
postfix/src/fsstone/Makefile.in | 2 +-
postfix/src/global/Makefile.in | 67 +++-
postfix/src/global/mail_params.h | 35 +-
postfix/src/global/mail_proto.h | 5 +
postfix/src/global/mail_version.h | 2 +-
postfix/src/global/mime_state.c | 2 +-
postfix/src/global/scache.c | 391 +++++++++++++++++++
postfix/src/global/scache.h | 147 ++++++++
postfix/src/global/scache_clnt.c | 312 ++++++++++++++++
postfix/src/global/scache_multi.c | 477 ++++++++++++++++++++++++
postfix/src/global/scache_multi.in | 52 +++
postfix/src/global/scache_multi.ref | 101 +++++
postfix/src/global/scache_single.c | 299 +++++++++++++++
postfix/src/lmtp/Makefile.in | 2 +-
postfix/src/local/Makefile.in | 3 +-
postfix/src/master/Makefile.in | 2 +-
postfix/src/oqmgr/Makefile.in | 2 +-
postfix/src/pickup/Makefile.in | 2 +-
postfix/src/pipe/Makefile.in | 2 +-
postfix/src/pipe/pipe.c | 16 +-
postfix/src/postalias/Makefile.in | 2 +-
postfix/src/postcat/Makefile.in | 2 +-
postfix/src/postconf/Makefile.in | 2 +-
postfix/src/postdrop/Makefile.in | 2 +-
postfix/src/postfix/Makefile.in | 2 +-
postfix/src/postkick/Makefile.in | 2 +-
postfix/src/postlock/Makefile.in | 2 +-
postfix/src/postlog/Makefile.in | 2 +-
postfix/src/postmap/Makefile.in | 2 +-
postfix/src/postqueue/Makefile.in | 2 +-
postfix/src/postsuper/Makefile.in | 2 +-
postfix/src/proxymap/Makefile.in | 2 +-
postfix/src/qmgr/Makefile.in | 2 +-
postfix/src/qmqpd/Makefile.in | 2 +-
postfix/src/scache/.indent.pro | 1 +
postfix/src/scache/Makefile.in | 69 ++++
postfix/src/scache/scache.c | 407 ++++++++++++++++++++
postfix/src/sendmail/Makefile.in | 2 +-
postfix/src/showq/Makefile.in | 2 +-
postfix/src/smtp/Makefile.in | 97 ++++-
postfix/src/smtp/smtp.c | 89 ++++-
postfix/src/smtp/smtp.h | 77 +++-
postfix/src/smtp/smtp_addr.c | 31 +-
postfix/src/smtp/smtp_connect.c | 292 +++++++++++++--
postfix/src/smtp/smtp_proto.c | 349 +++++++++++------
postfix/src/smtp/smtp_reuse.c | 266 +++++++++++++
postfix/src/smtp/smtp_reuse.h | 32 ++
postfix/src/smtp/smtp_sasl.h | 3 +
postfix/src/smtp/smtp_sasl_glue.c | 36 +-
postfix/src/smtp/smtp_session.c | 242 +++++++++++-
postfix/src/smtp/smtp_state.c | 29 +-
postfix/src/smtp/smtp_trouble.c | 4 +-
postfix/src/smtpd/Makefile.in | 2 +-
postfix/src/smtpstone/Makefile.in | 2 +-
postfix/src/spawn/Makefile.in | 2 +-
postfix/src/trivial-rewrite/Makefile.in | 2 +-
postfix/src/util/Makefile.in | 45 ++-
postfix/src/util/events.c | 46 ++-
postfix/src/util/iostuff.h | 4 +
postfix/src/util/ring.h | 3 +
postfix/src/util/stream_recv_fd.c | 118 ++++++
postfix/src/util/stream_send_fd.c | 112 ++++++
postfix/src/util/sys_defs.h | 4 +
postfix/src/util/unix_recv_fd.c | 156 ++++++++
postfix/src/util/unix_send_fd.c | 137 +++++++
postfix/src/util/vstream.c | 37 +-
postfix/src/util/vstream.h | 1 +
postfix/src/verify/Makefile.in | 2 +-
postfix/src/virtual/Makefile.in | 2 +-
107 files changed, 5546 insertions(+), 571 deletions(-)
create mode 100644 postfix/html/scache.8.html
create mode 100644 postfix/man/man8/scache.8
create mode 100644 postfix/src/global/scache.c
create mode 100644 postfix/src/global/scache.h
create mode 100644 postfix/src/global/scache_clnt.c
create mode 100644 postfix/src/global/scache_multi.c
create mode 100644 postfix/src/global/scache_multi.in
create mode 100644 postfix/src/global/scache_multi.ref
create mode 100644 postfix/src/global/scache_single.c
create mode 120000 postfix/src/scache/.indent.pro
create mode 100644 postfix/src/scache/Makefile.in
create mode 100644 postfix/src/scache/scache.c
create mode 100644 postfix/src/smtp/smtp_reuse.c
create mode 100644 postfix/src/smtp/smtp_reuse.h
create mode 100644 postfix/src/util/stream_recv_fd.c
create mode 100644 postfix/src/util/stream_send_fd.c
create mode 100644 postfix/src/util/unix_recv_fd.c
create mode 100644 postfix/src/util/unix_send_fd.c
diff --git a/postfix/.indent.pro b/postfix/.indent.pro
index fbd8874f6..6c604ed34 100644
--- a/postfix/.indent.pro
+++ b/postfix/.indent.pro
@@ -1,3 +1,4 @@
+-TSCACHE_HEAD_NODE
-TABOUNCE
-TALIAS_TOKEN
-TANVIL_LOCAL
@@ -142,6 +143,15 @@
-TRESPONSE
-TREST_TABLE
-TRES_CONTEXT
+-TSCACHE
+-TSCACHE_CLNT
+-TSCACHE_MULTI
+-TSCACHE_MULTI_DEST
+-TSCACHE_MULTI_ENDP
+-TSCACHE_MULTI_HEAD
+-TSCACHE_SINGLE
+-TSCACHE_SINGLE_DEST
+-TSCACHE_SINGLE_ENDP
-TSCAN_DIR
-TSCAN_INFO
-TSCAN_OBJ
diff --git a/postfix/HISTORY b/postfix/HISTORY
index 5d1e4644d..6517f04d5 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -8189,8 +8189,8 @@ Apologies for any names omitted.
of mail probes, so it will no longer block for in_flow_delay
seconds when mail arrives faster than it is delivered.
Still need to make mail_stream_finish() asynchronous in
- order to avoid blocking for trigger_timeout seconds when the
- queue manager is overwhelmed. Files: global/post_mail.c,
+ order to avoid blocking for trigger_timeout seconds when
+ the queue manager is overwhelmed. Files: global/post_mail.c,
verify/verify.c.
Bugfix: removed extraneous sleep() after the last attempt
@@ -8365,13 +8365,13 @@ Apologies for any names omitted.
Support for multiple A and TXT results in RBL lookups.
Victor Duchovni, Morgan Stanley. File: smtpd/smtpd_check.c.
- Support for attribute-based query-reply protocols.
- Files: util/attr_clnt.[hc], util/auto_clnt.[hc].
+ Support for attribute-based query-reply protocols. Files:
+ util/attr_clnt.[hc], util/auto_clnt.[hc].
20030711
- Support for plain "name=value\n" attribute protocol.
- Files: util/attr_{scan,print}_plain.c.
+ Support for plain "name=value\n" attribute protocol. Files:
+ util/attr_{scan,print}_plain.c.
Bugfix: the LMTP session caching code did not reset the
EHLO server feature list when it needed to reconnect.
@@ -8399,7 +8399,7 @@ Apologies for any names omitted.
20030717
- Documentation: added description of policy_time_limit to
+ Documentation: added description of policy_time_limit to
the SMTPD_POLICY_README document.
Documentation: corrected the command time limit parameter
@@ -8703,8 +8703,8 @@ Apologies for any names omitted.
20031024
- Portability: added localhost to mydestination for sites that
- turn off append_dot_mydomain. File: global/mail_params.h.
+ Portability: added localhost to mydestination for sites
+ that turn off append_dot_mydomain. File: global/mail_params.h.
20031027
@@ -8958,7 +8958,7 @@ Apologies for any names omitted.
Feature: the reject_unlisted_sender(recipient) SMTPD access
restriction rejects an address that matches a local, virtual
or relay domain, while the address is not listed in the
- corresponding local, virtual or relay recipient table.
+ corresponding local, virtual or relay recipient table.
Compatibility: the check_recipient_maps restriction works
like reject_unlisted_recipient, but will eventually be
@@ -9037,8 +9037,8 @@ Apologies for any names omitted.
Files: *qmgr/qmgr_deliver.c.
Cleanup: in postfix-files, symbolic links and hard links
- are now first-class citizens with explicit mention of
- source and destination pathnames. Files: postfix-install,
+ are now first-class citizens with explicit mention of source
+ and destination pathnames. Files: postfix-install,
conf/postfix-files, conf/post-install.
20040116
@@ -9071,8 +9071,8 @@ Apologies for any names omitted.
longer needed and have been removed, as are the default
*_table configuration files.
- Cleanup: support for the non-standard Errors-To: header
- is removed. File: cleanup/cleanup_message.c.
+ Cleanup: support for the non-standard Errors-To: header is
+ removed. File: cleanup/cleanup_message.c.
20040121
@@ -9101,11 +9101,11 @@ Apologies for any names omitted.
20040123
- Feature: set smtpd_reject_unlisted_{sender,recipient}=no to
- turn off automatic rejection of non-existent local, virtual
- or relay addresses. This way it can be made conditional
- for local clients, always on for remote clients. Files:
- global/mail_params.h, smtpd/smtpd.c, smtpd/smtpd_check.c.
+ Feature: set smtpd_reject_unlisted_{sender,recipient}=no
+ to turn off automatic rejection of non-existent local,
+ virtual or relay addresses. This way it can be made
+ conditional for local clients, always on for remote clients.
+ Files: global/mail_params.h, smtpd/smtpd.c, smtpd/smtpd_check.c.
20040124
@@ -9114,8 +9114,8 @@ Apologies for any names omitted.
20040126
- Safety: handle the case that main.cf is updated while it is
- being read. File: util/dict.c.
+ Safety: handle the case that main.cf is updated while it
+ is being read. File: util/dict.c.
Feature: "instance" attribute that links policy etc. queries
to the same message instance.
@@ -9186,8 +9186,8 @@ Apologies for any names omitted.
20040324
- Portability: ekkoBSD support by Philip Reynolds.
- Files: makedefs, util/sys_defs.h.
+ Portability: ekkoBSD support by Philip Reynolds. Files:
+ makedefs, util/sys_defs.h.
20040325
@@ -9461,8 +9461,125 @@ Apologies for any names omitted.
Workaround for fragile clients: add microsecond time to
maildir filename. Files: virtual/maildir.c, local/maildir.c.
+20040628-20040701
+
+ SMTP connection caching work with Victor Duchovni.
+
+ New module (later renamed to global/scache_single.c) for
+ protocol-independent session caching. The initial
+ implementation supports in-process, single-session caching
+ only. A later version will support a central session cache
+ daemon. Some more work is needed for passivation/activation
+ of session attributes.
+
+ New function vstream_fdclose() to destroy a VSTREAM while
+ leaving the underlying file(s) open. Files: util/vstream.[hc].
+
+ New function dns_rr_remove() to remove one record from a
+ resource record list. Some more work is needed to turn the
+ list into a doubly-linked one. Files: dns/dns.h, dns/dns_rr.c.
+
+ Restructuring of the SMTP protocol engine for session
+ caching. File: smtp/smtp_proto.c.
+
+ Restructuring of the connection management module, and
+ first implementation of SMTP connection caching. To enable,
+ specify an smtp_connection_cache_time value greater than
+ zero. The time unit is seconds. File: smtp/smtp_connect.c.
+
+ New code to passivate and re-activate SMTP_SESSION objects,
+ and isolation of session save/lookup in its own module.
+ Files: smtp/smtp_session.c, smtp/smtp_reuse.c.
+
+ Refinement: smtp_cache_reuse_limit parameter to bound the
+ number of times a session may be reused.
+
+ Refinements: when a session comes from the cache, give it
+ back to the cache anyway (even when it will not be listed
+ under the next-hop destination name).
+
+ Future refinements should also include a bound on the number
+ of consecutive and total non-delivering uses and other
+ statistics.
+
+20040714
+
+ Bugfix: the code to eliminate the local MTA from the MX
+ address list did not handle the case that inet_interfaces
+ produced a less preferred match than proxy_interfaces.
+ Victor Duchovni, Morgan Stanley. File: smtp/smtp_addr.c.
+
+20040715
+
+ Resume work on SMTP session caching. All good sessions
+ are now cached under their IP address. As before, only the
+ first good session per delivery request is cached under
+ the original next-hop destination.
+
+ At this point, SMTP session caching works, with a session
+ cache client module that uses in-process session caching.
+ This is sufficient to demonstrate that the SMTP client is
+ ready for session caching.
+
+20040716
+
+ New modules to send file descriptors from one process into
+ another one. This will be needed for implementing a central
+ connection cache manager daemon. Most systems use UNIX-domain
+ sockets as the transport for this. On Solaris we use streams
+ instead. Applications are supposed to invoke LOCAL_SEND_FD()
+ and LOCAL_RECV_FD(). Files: {unix,streams}_{send,recv}_fd.c.
+
+20040717
+
+ First implementation of a session caching client API that
+ actually sends to/receives from a caching server process.
+ The old in-process, single-session caching functionality
+ is preserved as global/scache_single.c, so that we can use
+ it for bootstrapping the session cache server. File:
+ global/scache_clnt.c.
+
+ First implementation of the scache session cache server,
+ using the same in-process session caching code that was
+ used to bootstrap the SMTP client. File: scache/scache.c.
+
+20040718
+
+ Performance: the default RSET timeouts are reduced from
+ 120s to 20s. Perhaps there should be different RSET timeout
+ for address probes and for session cache checks. File:
+ global/mail_params.h.
+
+20040719
+
+ Multi-session connection cache module. Implementing this
+ was actually the easiest part of the entire connection
+ caching project. File: global/scache_multi.c.
+
+20040720
+
+ Bugfix: event_drain() falsely reported a single-entry timer
+ queue as empty. File: util/events.c.
+
+ Completed the multi-session cache support for SMTP. The
+ code can be stress tested with a driver program that reads
+ commands from a script. It is not practical to manually
+ test the effects of collisions in the time or in name space
+ domains. File: global/scache.c.
+
Open problems:
+ Low: update events.c so that 1-second timer requests do
+ not suffer from rounding errors. This is needed for 1-second
+ SMTP session caching time limits.
+
+ Low: trivial-rewrite should examine the map change status
+ every N seconds.
+
+ Low: per-sender resolver personalities?
+
+ Low: configurable internal/system locking method.
+
Low: make sure CCARGS -I options come at the end.
Low: add INSTALL section for pre-existing Postfix systems.
diff --git a/postfix/Makefile.in b/postfix/Makefile.in
index 53aa735bc..52faccc7f 100644
--- a/postfix/Makefile.in
+++ b/postfix/Makefile.in
@@ -7,7 +7,7 @@ DIRS = src/util src/global src/dns src/master src/postfix src/smtpstone \
src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop \
src/postkick src/postlock src/postlog src/postmap src/postqueue \
src/postsuper src/qmqpd src/spawn src/flush src/verify \
- src/virtual src/proxymap src/anvil
+ src/virtual src/proxymap src/anvil src/scache
MANDIRS = proto man html
default: update
diff --git a/postfix/README_FILES/OVERVIEW b/postfix/README_FILES/OVERVIEW
index 62c1d804a..8ea7eb0f7 100644
--- a/postfix/README_FILES/OVERVIEW
+++ b/postfix/README_FILES/OVERVIEW
@@ -265,6 +265,18 @@ queues.
processes. This overcomes chroot restrictions, and reduces the number of
open lookup tables by sharing one open table among multiple processes.
+ * The scache(8) server maintains the session cache for the Postfix smtp(8)
+ client. When session caching is enabled for selected destinations, the smtp
+ (8) client does not disconnect immediately after a mail transaction, but
+ gives the connection to the session cache server. The smtp(8) client
+ continues with some other mail delivery request. Meanwhile, the session
+ cache server keeps the connection open for a limited amount of time. During
+ that time, any smtp(8) process can ask the scache(8) server for that cached
+ session and use it for mail delivery.
+
+ smtp(8) -> scache(8) -> smtp(8)
+
+
* The showq(8) servers list the Postfix queue status. This is the queue
listing service that does the work for the mailq(1) and postqueue(1)
commands.
diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES
index 6105973ea..aa0ad76c7 100644
--- a/postfix/RELEASE_NOTES
+++ b/postfix/RELEASE_NOTES
@@ -7,6 +7,74 @@ snapshot release). Patches are issued for the official release
and change the patchlevel and the release date. Patches are never
issued for snapshot releases.
+Incompatible changes with snapshot Postfix-2.2-20040720
+=======================================================
+
+The default SMTP/LMTP timeouts for sending RSET are reduced to 20s.
+
+Major changes with snapshot Postfix-2.2-20040720
+================================================
+
+Selective SMTP session caching. Instead of disconnecting immediately
+after a mail transaction, the SMTP client can save the open session
+to a session cache daemon, so that any SMTP client process can use
+the same session for another mail transaction.
+
+This feature introduces the scache (session cache) server, which
+is added to your master.cf file when you upgrade Postfix.
+
+*** You need to execute "postfix reload" when upgrading from Postfix
+*** version 2.1 or later.
+
+*** You need to execute "postfix stop" when upgrading from Postfix
+*** version 2.0 or earlier. Execute "postfix start" when done.
+
+Session caching is enabled with the new smtp_connection_cache_domains
+parameter. Specify a list of destinations or lookup tables:
+
+- a domain name (the right-hand side of an email address),
+
+- a relay host (including optional [] and/or non-default TCP port),
+using the exact same spelling as in main.cf or in the transport map,
+
+- a /file/name with domains and/or relay hosts,
+
+- a type:table with domains and/or relay hosts on the left-hand
+side; the right-hand side result from type:table lookups is ignored.
+
+The following optimizes deliveries to hosts that your machine relays
+mail to:
+
+ smtp_connection_cache_domains = $relay_domains $relayhost
+
+A setting that tries to optimize deliveries to problem sites:
+
+ smtp_connection_cache_domains = hotmail.com...
+
+Cached SMTP sessions are allowed to remain unused for only a limited
+amount of time (smtp_connection_cache_time_limit, default: 2
+seconds). This limits the impact on remote server resources.
+Specify larger values only with permission from the remote sites.
+
+To avoid triggering remote problems, the same SMTP session is used
+only a limited number of times (smtp_connection_cache_reuse_limit,
+default: 10).
+
+Robustness note: to prevent mail from being delivered to the wrong
+server, the session caching feature explicitly labels each cached
+session with destination domain and IP address information. A
+session cache lookup succeeds only when the correct information is
+specified.
+
+Limitations:
+
+- SMTP session caching does not work with TLS (the necessary support
+for object passivation and re-activation does not exist).
+
+- SMTP session caching assumes that SASL credentials are valid for
+all hostnames or domain names that map onto the same IP address
+and TCP port.
+
Major changes with snapshot Postfix-2.2-20040621
================================================
@@ -14,5 +82,5 @@ Control over the working directory when executing an external
command. With the pipe(8) mailer, specify directory=pathname, and
with local(8) specify "command_execution_directory = expression"
where "expression" is subject to $home etc. macro expansion. The
-result of macro expansion is restricted by the set of charaacters
+result of macro expansion is restricted by the set of characters
specified with execution_directory_expansion_filter.
diff --git a/postfix/conf/master.cf b/postfix/conf/master.cf
index 0c2475ee0..00ec103e1 100644
--- a/postfix/conf/master.cf
+++ b/postfix/conf/master.cf
@@ -101,6 +101,7 @@ local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
+scache unix - - n - 1 scache
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
diff --git a/postfix/conf/post-install b/postfix/conf/post-install
index c19add3e3..f23d9b5c1 100644
--- a/postfix/conf/post-install
+++ b/postfix/conf/post-install
@@ -620,6 +620,15 @@ anvil unix - - n - 1 anvil
EOF
}
+ # Add missing scache service to master.cf.
+
+ grep '^scache.*scache' $config_directory/master.cf >/dev/null || {
+ echo Editing $config_directory/master.cf, adding missing entry for scache service
+ cat >>$config_directory/master.cf <$@
+scache.8.html: ../src/scache/scache.c
+ PATH=../mantools:$$PATH; \
+ srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
+
lmtp.8.html: ../src/lmtp/lmtp.c
PATH=../mantools:$$PATH; \
srctoman $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
diff --git a/postfix/html/OVERVIEW.html b/postfix/html/OVERVIEW.html
index 02ab2e223..f3e1c747b 100644
--- a/postfix/html/OVERVIEW.html
+++ b/postfix/html/OVERVIEW.html
@@ -535,6 +535,26 @@ service to Postfix processes. This overcomes chroot restrictions,
and reduces the number of open lookup tables by sharing one open
table among multiple processes.
+ The scache(8) server maintains the session cache for the
+Postfix smtp(8) client. When session caching is enabled for selected
+destinations, the smtp(8) client does not disconnect immediately
+after a mail transaction, but gives the connection to the session
+cache server. The smtp(8) client continues with some other mail
+delivery request. Meanwhile, the session cache server keeps the
+connection open for a limited amount of time. During that time,
+any smtp(8) process can ask the scache(8) server for that cached
+session and use it for mail delivery.
+
+
+
The showq(8) servers list the Postfix queue status. This
is the queue listing service that does the work for the mailq(1)
and postqueue(1) commands.
diff --git a/postfix/html/cleanup.8.html b/postfix/html/cleanup.8.html
index cfc6ce6e7..c9d3beb2f 100644
--- a/postfix/html/cleanup.8.html
+++ b/postfix/html/cleanup.8.html
@@ -131,8 +131,8 @@ CLEANUP(8) CLEANUP(8)
strings.
mime_nesting_limit (100)
- The maximal nesting level of multipart mail that
- the MIME processor will handle.
+ The maximal recursion level that the MIME processor
+ will handle.
strict_8bitmime (no)
Enable both strict_7bit_headers and strict_8bit-
@@ -258,8 +258,8 @@ CLEANUP(8) CLEANUP(8)
strings.
mime_nesting_limit (100)
- The maximal nesting level of multipart mail that
- the MIME processor will handle.
+ The maximal recursion level that the MIME processor
+ will handle.
queue_file_attribute_count_limit (100)
The maximal number of (name=value) attributes that
diff --git a/postfix/html/ldap_table.5.html b/postfix/html/ldap_table.5.html
index fe7c8b75a..d8d363cac 100644
--- a/postfix/html/ldap_table.5.html
+++ b/postfix/html/ldap_table.5.html
@@ -138,131 +138,131 @@ LDAP_TABLE(5) LDAP_TABLE(5)
%u When the input key is an address of the form
user@domain, %u is replaced by the (RFC
- 2254) quoted local part of the address. If
- no domain is specified, %u is replaced by
- the entire search string.
+ 2254) quoted local part of the address. Oth-
+ erwise, %u is replaced by the entire search
+ string.
%d When the input key is an address of the form
user@domain, %d is replaced by the (RFC
2254) quoted domain part of the address.
- When the input key has no domain qualifier,
- %d is replaced by the entire search string.
+ Otherwise, %d is replaced by the entire
+ search string.
- The "domain" parameter described below limits the
- input keys to addresses in matching domains. When
- the "domain" parameter is non-empty, LDAP queries
- for unqualified addresses or addresses in non-
+ The "domain" parameter described below limits the
+ input keys to addresses in matching domains. When
+ the "domain" parameter is non-empty, LDAP queries
+ for unqualified addresses or addresses in non-
matching domains are suppressed and return no
results.
NOTE: DO NOT put quotes around the query filter.
result_filter (default: %s)
- Format template applied to result attributes. Sup-
- ports the same expansions as the query_filter, and
- can be easily used to append (or prepend) text.
- This parameter supports the following '%' expan-
+ Format template applied to result attributes. Sup-
+ ports the same expansions as the query_filter, and
+ can be easily used to append (or prepend) text.
+ This parameter supports the following '%' expan-
sions:
- %s This is replaced by the value of the result
+ %s This is replaced by the value of the result
attribute.
- %u When the result attribute is an address of
- the form user@domain, %u is replaced local
- part of the address, if the result attribute
- is unqualified, %u is replaced by the entire
+ %u When the result attribute value is an
+ address of the form user@domain, %u is
+ replaced by the local part of the address.
+ Otherwise, %u is replaced by the entire
attribute value.
- %d When a result attribute is an address of the
- form user@domain, %d is replaced by the
- domain part of the attribute value. If an
- attribute value is unqualified %d is
- replaced by the entire attribute value.
+ %d When a result attribute value is an address
+ of the form user@domain, %d is replaced by
+ the domain part of the attribute value.
+ Otherwise, %d is replaced by the entire
+ attribute value.
For example, using "result_filter = smtp:[%s]"
allows one to use a mailHost attribute as the basis
- of a transport(5) table. After applying the result
- filter, multiple values are concatenated as comma
- separated strings. The expansion_limit and
- size_limit parameters explained below allow one to
- restrict the number of values in the result, which
- is especially useful for maps that should return a
+ of a transport(5) table. After applying the result
+ filter, multiple values are concatenated as comma
+ separated strings. The expansion_limit and
+ size_limit parameters explained below allow one to
+ restrict the number of values in the result, which
+ is especially useful for maps that should return a
single value.
- The default value %s specifies that each attribute
+ The default value %s specifies that each attribute
value should be used as is.
NOTE: DO NOT put quotes around the result filter!
domain (default: no domain list)
- This is a list of domain names, paths to files, or
- dictionaries. When specified, only fully qualified
- search keys with a *non-empty* localpart and a
- matching domain are eligible for lookup: 'user'
- lookups, bare domain lookups and "@domain" lookups
- are not performed. This can significantly reduce
+ This is a list of domain names, paths to files, or
+ dictionaries. When specified, only fully qualified
+ search keys with a *non-empty* localpart and a
+ matching domain are eligible for lookup: 'user'
+ lookups, bare domain lookups and "@domain" lookups
+ are not performed. This can significantly reduce
the query load on the LDAP server.
domain = postfix.org, hash:/etc/postfix/search-
domains
- It is best not to use LDAP to store the domains
+ It is best not to use LDAP to store the domains
eligible for LDAP lookups.
- NOTE: DO NOT define this parameter for local(8)
+ NOTE: DO NOT define this parameter for local(8)
aliases.
result_attribute (default: maildrop)
- The attribute(s) Postfix will read from any direc-
+ The attribute(s) Postfix will read from any direc-
tory entries returned by the lookup, to be resolved
to an email address.
result_attribute = mailbox,maildrop
special_result_attribute (No default)
The attribute(s) of directory entries that can con-
- tain DNs or URLs. If found, a recursive subsequent
+ tain DNs or URLs. If found, a recursive subsequent
search is done using their values.
special_result_attribute = member
- DN recursion retrieves the same result_attributes
+ DN recursion retrieves the same result_attributes
as the main query, including the special attributes
- for further recursion. URI processing retrieves
- only those attributes that are included in the URI
- definition and are *also* listed in
- "result_attribute". If the URI lists any of the
- map's special result attributes, these are also
+ for further recursion. URI processing retrieves
+ only those attributes that are included in the URI
+ definition and are *also* listed in
+ "result_attribute". If the URI lists any of the
+ map's special result attributes, these are also
retrieved and used recursively.
scope (default: sub)
- The LDAP search scope: sub, base, or one. These
+ The LDAP search scope: sub, base, or one. These
translate into LDAP_SCOPE_SUBTREE, LDAP_SCOPE_BASE,
and LDAP_SCOPE_ONELEVEL.
bind (default: yes)
- Whether or not to bind to the LDAP server. Newer
+ Whether or not to bind to the LDAP server. Newer
LDAP implementations don't require clients to bind,
which saves time. Example:
bind = no
- If you do need to bind, you might consider config-
- uring Postfix to connect to the local machine on a
- port that's an SSL tunnel to your LDAP server. If
- your LDAP server doesn't natively support SSL, put
+ If you do need to bind, you might consider config-
+ uring Postfix to connect to the local machine on a
+ port that's an SSL tunnel to your LDAP server. If
+ your LDAP server doesn't natively support SSL, put
a tunnel (wrapper, proxy, whatever you want to call
- it) on that system too. This should prevent the
- password from traversing the network in the clear.
+ it) on that system too. This should prevent the
+ password from traversing the network in the clear.
bind_dn (default: empty)
- If you do have to bind, do it with this distin-
+ If you do have to bind, do it with this distin-
guished name. Example:
bind_dn = uid=postfix, dc=your, dc=com
bind_pw (default: empty)
- The password for the distinguished name above. If
+ The password for the distinguished name above. If
you have to use this, you probably want to make the
map configuration file readable only by the Postfix
- user. When using the obsolete ldap:ldapsource syn-
+ user. When using the obsolete ldap:ldapsource syn-
tax, with map parameters in main.cf, it is not pos-
- sible to securely store the bind password. This is
+ sible to securely store the bind password. This is
because main.cf needs to be world readable to allow
local accounts to submit mail via the sendmail com-
mand. Example:
@@ -273,43 +273,43 @@ LDAP_TABLE(5) LDAP_TABLE(5)
cache_expiry (IGNORED with a warning)
cache_size (IGNORED with a warning)
- The above parameters are NO LONGER SUPPORTED by
+ The above parameters are NO LONGER SUPPORTED by
Postfix. Cache support has been dropped from
OpenLDAP as of release 2.1.13.
recursion_limit (default: 1000)
- A limit on the nesting depth of DN and URL special
- result attribute evaluation. The limit must be a
+ A limit on the nesting depth of DN and URL special
+ result attribute evaluation. The limit must be a
non-zero positive number.
expansion_limit (default: 0)
- A limit on the total number of result elements
- returned (as a comma separated list) by a lookup
- against the map. A setting of zero disables the
- limit. Lookups fail with a temporary error if the
- limit is exceeded. Setting the limit to 1 ensures
+ A limit on the total number of result elements
+ returned (as a comma separated list) by a lookup
+ against the map. A setting of zero disables the
+ limit. Lookups fail with a temporary error if the
+ limit is exceeded. Setting the limit to 1 ensures
that lookups do not return multiple values.
size_limit (default: $expansion_limit)
- A limit on the number of LDAP entries returned by
- any single LDAP query performed as part of the
- lookup. A setting of 0 disables the limit. Expan-
- sion of DN and URL references involves nested LDAP
- queries, each of which is separately subjected to
+ A limit on the number of LDAP entries returned by
+ any single LDAP query performed as part of the
+ lookup. A setting of 0 disables the limit. Expan-
+ sion of DN and URL references involves nested LDAP
+ queries, each of which is separately subjected to
this limit.
- Note: even a single LDAP entry can generate multi-
- ple lookup results, via multiple result attributes
- and/or multi-valued result attributes. This limit
+ Note: even a single LDAP entry can generate multi-
+ ple lookup results, via multiple result attributes
+ and/or multi-valued result attributes. This limit
caps the per query resource utilization on the LDAP
- server, not the final multiplicity of the lookup
- result. It is analogous to the "-z" option of
+ server, not the final multiplicity of the lookup
+ result. It is analogous to the "-z" option of
"ldapsearch".
dereference (default: 0)
- When to dereference LDAP aliases. (Note that this
+ When to dereference LDAP aliases. (Note that this
has nothing do with Postfix aliases.) The permitted
- values are those legal for the OpenLDAP/UM LDAP
+ values are those legal for the OpenLDAP/UM LDAP
implementations:
0 never
@@ -321,99 +321,99 @@ LDAP_TABLE(5) LDAP_TABLE(5)
3 always
See ldap.h or the ldap_open(3) or ldapsearch(1) man
- pages for more information. And if you're using an
+ pages for more information. And if you're using an
LDAP package that has other possible values, please
- bring it to the attention of the postfix-
+ bring it to the attention of the postfix-
users@postfix.org mailing list.
chase_referrals (default: 0)
- Sets (or clears) LDAP_OPT_REFERRALS (requires LDAP
+ Sets (or clears) LDAP_OPT_REFERRALS (requires LDAP
version 3 support).
version (default: 2)
Specifies the LDAP protocol version to use.
debuglevel (default: 0)
- What level to set for debugging in the OpenLDAP
+ What level to set for debugging in the OpenLDAP
libraries.
LDAP SSL AND STARTTLS PARAMETERS
- If you're using the OpenLDAP libraries compiled with SSL
- support, Postfix can connect to LDAP SSL servers and can
+ If you're using the OpenLDAP libraries compiled with SSL
+ support, Postfix can connect to LDAP SSL servers and can
issue the STARTTLS command.
- LDAP SSL service can be requested by using a LDAP SSL URL
+ LDAP SSL service can be requested by using a LDAP SSL URL
in the server_host parameter:
server_host = ldaps://ldap.your.com:636
STARTTLS can be turned on with the start_tls parameter:
start_tls = yes
- Both forms require LDAP protocol version 3, which has to
+ Both forms require LDAP protocol version 3, which has to
be set explicitly with:
version = 3
If any of the Postfix programs querying the map is config-
- ured in master.cf to run chrooted, all the certificates
+ ured in master.cf to run chrooted, all the certificates
and keys involved have to be copied to the chroot jail. Of
- course, the private keys should only be readable by the
+ course, the private keys should only be readable by the
user "postfix".
- The following parameters are relevant to LDAP SSL and
+ The following parameters are relevant to LDAP SSL and
STARTTLS:
start_tls (default: no)
Whether or not to issue STARTTLS upon connection to
- the server. Don't set this with LDAP SSL (the SSL
+ the server. Don't set this with LDAP SSL (the SSL
session is setup automatically when the TCP connec-
tion is opened).
- tls_ca_cert_dir (No default; set either this or
+ tls_ca_cert_dir (No default; set either this or
tls_ca_cert_file)
Directory containing X509 Certificate Authority
- certificates in PEM format which are to be recog-
- nized by the client in SSL/TLS connections. The
- files each contain one CA certificate. The files
- are looked up by the CA subject name hash value,
- which must hence be available. If more than one CA
- certificate with the same name hash value exist,
- the extension must be different (e.g. 9d66eef0.0,
- 9d66eef0.1 etc). The search is performed in the
- ordering of the extension number, regardless of
+ certificates in PEM format which are to be recog-
+ nized by the client in SSL/TLS connections. The
+ files each contain one CA certificate. The files
+ are looked up by the CA subject name hash value,
+ which must hence be available. If more than one CA
+ certificate with the same name hash value exist,
+ the extension must be different (e.g. 9d66eef0.0,
+ 9d66eef0.1 etc). The search is performed in the
+ ordering of the extension number, regardless of
other properties of the certificates. Use the
c_rehash utility (from the OpenSSL distribution) to
create the necessary links.
- tls_ca_cert_file (No default; set either this or
+ tls_ca_cert_file (No default; set either this or
tls_ca_cert_dir)
File containing the X509 Certificate Authority cer-
- tificates in PEM format which are to be recognized
- by the client in SSL/TLS connections. This setting
+ tificates in PEM format which are to be recognized
+ by the client in SSL/TLS connections. This setting
takes precedence over tls_ca_cert_dir.
tls_cert (No default; you must set this)
- File containing client's X509 certificate to be
+ File containing client's X509 certificate to be
used by the client in SSL/ TLS connections.
tls_key (No default; you must set this)
- File containing the private key corresponding to
+ File containing the private key corresponding to
the above tls_cert.
tls_require_cert (default: no)
Whether or not to request server's X509 certificate
- and check its validity when establishing SSL/TLS
+ and check its validity when establishing SSL/TLS
connections.
tls_random_file (No default)
- Path of a file to obtain random bits from when
- /dev/[u]random is not available, to be used by the
+ Path of a file to obtain random bits from when
+ /dev/[u]random is not available, to be used by the
client in SSL/TLS connections.
tls_cipher_suite (No default)
Cipher suite to use in SSL/TLS negotiations.
EXAMPLE
- Here's a basic example for using LDAP to look up local(8)
+ Here's a basic example for using LDAP to look up local(8)
aliases. Assume that in main.cf, you have:
alias_maps = hash:/etc/aliases,
ldap:/etc/postfix/ldap-aliases.cf
@@ -422,14 +422,14 @@ LDAP_TABLE(5) LDAP_TABLE(5)
server_host = ldap.my.com
search_base = dc=my, dc=com
- Upon receiving mail for a local address "ldapuser" that
- isn't found in the /etc/aliases database, Postfix will
- search the LDAP server listening at port 389 on
- ldap.my.com. It will bind anonymously, search for any
- directory entries whose mailacceptinggeneralid attribute
- is "ldapuser", read the "maildrop" attributes of those
- found, and build a list of their maildrops, which will be
- treated as RFC822 addresses to which the message will be
+ Upon receiving mail for a local address "ldapuser" that
+ isn't found in the /etc/aliases database, Postfix will
+ search the LDAP server listening at port 389 on
+ ldap.my.com. It will bind anonymously, search for any
+ directory entries whose mailacceptinggeneralid attribute
+ is "ldapuser", read the "maildrop" attributes of those
+ found, and build a list of their maildrops, which will be
+ treated as RFC822 addresses to which the message will be
delivered.
SEE ALSO
@@ -443,13 +443,13 @@ LDAP_TABLE(5) LDAP_TABLE(5)
LDAP_README, Postfix LDAP client guide
LICENSE
- The Secure Mailer license must be distributed with this
+ The Secure Mailer license must be distributed with this
software.
AUTHOR(S)
- Carsten Hoeger, Hery Rakotoarisoa, John Hensley, Keith
- Stevenson, LaMont Jones, Liviu Daia, Manuel Guesdon, Mike
- Mattice, Prabhat K Singh, Sami Haahtinen, Samuel Tardieu,
+ Carsten Hoeger, Hery Rakotoarisoa, John Hensley, Keith
+ Stevenson, LaMont Jones, Liviu Daia, Manuel Guesdon, Mike
+ Mattice, Prabhat K Singh, Sami Haahtinen, Samuel Tardieu,
Victor Duchovni, and many others.
LDAP_TABLE(5)
diff --git a/postfix/html/pipe.8.html b/postfix/html/pipe.8.html
index 6bf9ef687..4b9ca85b6 100644
--- a/postfix/html/pipe.8.html
+++ b/postfix/html/pipe.8.html
@@ -48,11 +48,18 @@ PIPE(8) PIPE(8)
file at the end of a service definition. The syntax is as
follows:
+ directory=pathname (optional, default: $queue_directory)
+ Change to the named directory before executing the
+ external command. Delivery is deferred in case of
+ failure.
+
+ This feature is available as of Postfix 2.2.
+
eol=string (optional, default: \n)
The output record delimiter. Typically one would
use either \r\n or \n. The usual C-style backslash
escape sequences are recognized: \a \b \f \n \r \t
- \v \octal and \\.
+ \v \ddd (up to three octal digits) and \\.
flags=BDFORhqu.> (optional)
Optional message processing flags. By default, a
@@ -111,10 +118,10 @@ PIPE(8) PIPE(8)
most @ character) to lower case. This is
recommended for delivery via UUCP.
- . Prepend . to lines starting with ".". This
+ . Prepend "." to lines starting with ".". This
is needed by, for example, BSMTP software.
- > Prepend > to lines starting with "From ".
+ > Prepend ">" to lines starting with "From ".
This is expected by, for example, UUCP soft-
ware.
@@ -216,13 +223,6 @@ PIPE(8) PIPE(8)
$(name) are also recognized. Specify $$ where a single $
is wanted.
- Available in Postfix 2.2 and later:
-
- directory=pathname (optional)
- Change to the specified directory before executing
- the command. Failure causes mail delivery to be
- deferred.
-
DIAGNOSTICS
Command exit status codes are expected to follow the con-
ventions defined in <sysexits.h>.
diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html
index 3edff6d40..c0cde5e61 100644
--- a/postfix/html/postconf.5.html
+++ b/postfix/html/postconf.5.html
@@ -921,10 +921,10 @@ This feature is available in Postfix 2.0 and later.
bounce_size_limit
(default: 50000)
-
-The maximal amount of original message text that is sent in a
-non-delivery notification. Specify a byte count.
-
+ The maximal amount of original message text that is sent in a
+non-delivery notification. Specify a byte count. If you increase
+this limit, then you should increase the mime_nesting_limit value
+proportionally.
@@ -1184,8 +1184,8 @@ address patterns that cause the verbose logging level to increase
by the amount specified in $debug_peer_level.
Specify domain names, network/netmask patterns, "/file/name"
-patterns or "type:table" lookup tables. The result from lookup
-tables is ignored.
+patterns or "type:table" lookup tables. The right-hand side result
+from "type:table" lookups is ignored.
Pattern matching of domain names is controlled by the
parent_domain_matches_subdomains parameter.
@@ -2725,13 +2725,12 @@ The default time unit is s (seconds).
lmtp_rset_timeout
-(default: 120s)
+(default: 20s)
-
-The LMTP client time limit for sending the 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.
-
+ The LMTP client time limit for sending the RSET command, and
+for receiving the server response. The LMTP client sends RSET in
+order to finish a recipient address probe, or to verify that a
+cached connection is still alive.
Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
@@ -3617,8 +3616,8 @@ This feature is available in Postfix 2.0 and later.
(default: 100)
-The maximal nesting level of multipart mail that the MIME processor
-will handle. Postfix refuses mail that is nested deeper.
+The maximal recursion level that the MIME processor will handle.
+Postfix refuses mail that is nested deeper than the specified limit.
@@ -5030,6 +5029,27 @@ The default time unit is s (seconds).
+
+
+session_cache_service
+(default: scache)
+
+ The name of the scache(8) session cache service. This service
+maintains a limited pool of cached sessions.
+
+
+
+
+session_cache_ttl_limit
+(default: 2s)
+
+ The maximal time-to-live value that the session cache server
+allows. Requests that specify a larger TTL will be stored with the
+maximum allowed TTL. The purpose of this additional control is to
+protect the infrastructure against careless people. The cache TTL
+is already bounded by $max_idle.
+
+
setgid_group
@@ -5134,6 +5154,62 @@ The default time unit is s (seconds).
+
+
+smtp_connection_cache_domains
+(default: empty)
+
+ The SMTP destinations for which SMTP connection caching is
+enabled. With SMTP connection caching, a connection is not closed
+immediately after completion of a mail transaction. Instead, the
+connection is kept open for up to $smtp_connection_cache_time_limit
+seconds. This allows connections to be reused for other deliveries,
+and can improve mail delivery performance.
+
+ Specify a comma or white space separated list of destinations
+or pseudo-destinations:
+
+
+
+
+- a domain name (the right-hand side of an email address),
+
+
- a relay host (including optional [] and/or non-default TCP
+port), using the exact same spelling as in main.cf or in the
+transport map,
+
+
- a /file/name with domains and/or relay hosts,
+
+
- a "type:table" with domains and/or relay hosts on the left-hand
+side. The right-hand side result from "type:table" lookups is
+ignored.
+
+
+
+
+
+
+
+
+smtp_connection_cache_reuse_limit
+(default: 10)
+
+ When SMTP session caching is enabled, the number of times that
+an SMTP session is reused before it is closed.
+
+
+
+
+
+smtp_connection_cache_time_limit
+(default: 2s)
+
+ When SMTP session caching is enabled, the amount of time that
+an unused SMTP client socket is kept open before it is closed. Do
+not specify larger values without permission from the remote sites.
+
+
+
smtp_data_done_timeout
@@ -5510,10 +5586,12 @@ The default time unit is s (seconds).
smtp_rset_timeout
-(default: 120s)
+(default: 20s)
The SMTP client time limit for sending the RSET command, and
-for receiving the server response.
+for receiving the server response. The SMTP client sends RSET in
+order to finish a recipient address probe, or to verify that a
+cached session is still usable.
This feature is available in Postfix 2.1 and later.
diff --git a/postfix/html/scache.8.html b/postfix/html/scache.8.html
new file mode 100644
index 000000000..ac46f7ce6
--- /dev/null
+++ b/postfix/html/scache.8.html
@@ -0,0 +1,156 @@
+
+
+
+ Postfix manual - scache(8)
+
+SCACHE(8) SCACHE(8)
+
+NAME
+ scache - Postfix session cache server
+
+SYNOPSIS
+ scache [generic Postfix daemon options]
+
+DESCRIPTION
+ The scache server maintains the Postfix session cache.
+ This information can be used by, for example, the Postfix
+ SMTP client.
+
+ The session cache is organized into logical destination
+ names, physical endpoint names, and sessions.
+
+ As a specific example, logical SMTP destinations specify
+ (transport, domain, port), and physical SMTP endpoints
+ specify (transport, IP address, port). An SMTP session
+ may be saved after a successful mail transaction.
+
+ In the general case, one logical destination may refer to
+ zero or more physical endpoints, one physical endpoint may
+ be referenced by zero or more logical destinations, and
+ one endpoint may refer to zero or more sessions.
+
+ The exact syntax of a logical destination or endpoint name
+ is application dependent; the scache service does not
+ care. A session is stored as a file descriptor together
+ with application-dependent information that is needed to
+ re-activate a session object. Again, the scache service is
+ completely unaware about the details of that information.
+
+ All information is stored with a finite time to live
+ (ttl). The session cache daemon terminates when no client
+ is connected for max_idle time units.
+
+ This server implements the following requests:
+
+ save_endp ttl endpoint endpoint_properties file_descriptor
+ Save the specified file descriptor and session
+ property data under the specified endpoint name.
+ The endpoint properties are used by the client to
+ re-activate a passivated session object. queue ID
+ is queued for the specified destination.
+
+ find_endp endpoint
+ Look up cached properties and a cached file
+ descriptor for the specified endpoint.
+
+ save_dest ttl destination destination_properties endpoint
+ Save the binding between a logical destination and
+ an endpoint under the destination name, together
+ with destination specific session properties. The
+ destination properties are used by the client to
+ re-activate a passivated session object.
+
+ find_dest destination
+ Look up cached destination properties, cached end-
+ point properties, and a cached file descriptor for
+ the specified logical destination.
+
+SECURITY
+ The session cache server is not security-sensitive. It
+ does not talk to the network, and it does not talk to
+ local users. The scache server can run chrooted at fixed
+ low privilege.
+
+ The session cache server is not a trusted process. It must
+ not be used to store information that is security sensi-
+ tive.
+
+DIAGNOSTICS
+ Problems and transactions are logged to syslogd(8).
+
+BUGS
+ Sessions cannot be cached across multiple machines.
+
+ When a session expires from the cache it is closed without
+ protocol specific handshake.
+
+CONFIGURATION PARAMETERS
+ Changes to main.cf are picked up automatically as
+ scache(8) processes run for only a limited amount of time.
+ Use the command "postfix reload" to speed up a change.
+
+ The text below provides only a parameter summary. See
+ postconf(5) for more details including examples.
+
+RESOURCE CONTROLS
+ session_cache_ttl_limit (2s)
+ The maximal time-to-live value that the session
+ cache server allows.
+
+MISCELLANEOUS CONTROLS
+ config_directory (see 'postconf -d' output)
+ The default location of the Postfix main.cf and
+ master.cf configuration files.
+
+ daemon_timeout (18000s)
+ How much time a Postfix daemon process may take to
+ handle a request before it is terminated by a
+ built-in watchdog timer.
+
+ ipc_timeout (3600s)
+ The time limit for sending or receiving information
+ over an internal communication channel.
+
+ max_idle (100s)
+ The maximum amount of time that an idle Postfix
+ daemon process waits for the next service request
+ before exiting.
+
+ process_id (read-only)
+ The process ID of a Postfix command or daemon pro-
+ cess.
+
+ process_name (read-only)
+ The process name of a Postfix command or daemon
+ process.
+
+ syslog_facility (mail)
+ The syslog facility of Postfix logging.
+
+ syslog_name (postfix)
+ The mail system name that is prepended to the pro-
+ cess name in syslog records, so that "smtpd"
+ becomes, for example, "postfix/smtpd".
+
+SEE ALSO
+ smtp(8), SMTP client
+ postconf(5), configuration parameters
+ master(8), process manager
+ syslogd(8), system logging
+
+LICENSE
+ The Secure Mailer license must be distributed with this
+ software.
+
+HISTORY
+ This service was introduced with Postfix version 2.2.
+
+AUTHOR(S)
+ Wietse Venema
+ IBM T.J. Watson Research
+ P.O. Box 704
+ Yorktown Heights, NY 10598, USA
+
+ SCACHE(8)
+
diff --git a/postfix/html/smtp.8.html b/postfix/html/smtp.8.html
index e4657fa49..4264f3b54 100644
--- a/postfix/html/smtp.8.html
+++ b/postfix/html/smtp.8.html
@@ -34,9 +34,14 @@ SMTP(8) SMTP(8)
fails due to a recoverable error condition, the SMTP
client will try to deliver the mail to an alternate host.
+ After a successful mail transaction, a session may be
+ saved to the scache(8) session cache server, so that it
+ may be used by any SMTP client for a subsequent transac-
+ tion. Session caching is disabled by default.
+
SECURITY
The SMTP client is moderately security-sensitive. It talks
- to SMTP servers and to DNS servers on the network. The
+ to SMTP servers and to DNS servers on the network. The
SMTP client can be run chrooted at fixed low privilege.
STANDARDS
@@ -52,20 +57,29 @@ SMTP(8) SMTP(8)
RFC 2920 (SMTP Pipelining)
DIAGNOSTICS
- Problems and transactions are logged to syslogd(8). Cor-
- rupted message files are marked so that the queue manager
+ Problems and transactions are logged to syslogd(8). Cor-
+ rupted message files are marked so that the queue manager
can move them to the corrupt queue for further inspection.
- Depending on the setting of the notify_classes parameter,
- the postmaster is notified of bounces, protocol problems,
+ Depending on the setting of the notify_classes parameter,
+ the postmaster is notified of bounces, protocol problems,
and of other trouble.
+BUGS
+ SMTP session caching does not work with TLS. The necessary
+ support for object passivation and re-activation does not
+ exist.
+
+ SMTP session caching assumes that SASL credentials are
+ valid for all destinations that map onto the same IP
+ address and TCP port.
+
CONFIGURATION PARAMETERS
Changes to main.cf are picked up automatically, as smtp(8)
- processes run for only a limited amount of time. Use the
+ processes run for only a limited amount of time. Use the
command "postfix reload" to speed up a change.
- The text below provides only a parameter summary. See
+ The text below provides only a parameter summary. See
postconf(5) for more details including examples.
COMPATIBILITY CONTROLS
@@ -79,7 +93,7 @@ SMTP(8) SMTP(8)
Never send EHLO at the start of an SMTP session.
smtp_defer_if_no_mx_address_found (no)
- Defer mail delivery when no MX record resolves to
+ Defer mail delivery when no MX record resolves to
an IP address.
smtp_line_length_limit (990)
@@ -87,17 +101,17 @@ SMTP(8) SMTP(8)
that Postfix will send via SMTP.
smtp_pix_workaround_delay_time (10s)
- How long the Postfix SMTP client pauses before
+ How long the Postfix SMTP client pauses before
sending ".<CR><LF>" in order to work around the PIX
firewall "<CR><LF>.<CR><LF>" bug.
smtp_pix_workaround_threshold_time (500s)
- How long a message must be queued before the PIX
- firewall "<CR><LF>.<CR><LF>" bug workaround is
+ How long a message must be queued before the PIX
+ firewall "<CR><LF>.<CR><LF>" bug workaround is
turned on.
smtp_quote_rfc821_envelope (yes)
- Quote addresses in SMTP MAIL FROM and RCPT TO com-
+ Quote addresses in SMTP MAIL FROM and RCPT TO com-
mands as required by RFC 821.
smtp_skip_5xx_greeting (yes)
@@ -105,7 +119,7 @@ SMTP(8) SMTP(8)
(go away, do not try again later).
smtp_skip_quit_response (yes)
- Do not wait for the response to the SMTP QUIT com-
+ Do not wait for the response to the SMTP QUIT com-
mand.
Available in Postfix version 2.0 and earlier:
@@ -118,7 +132,7 @@ SMTP(8) SMTP(8)
Available in Postfix version 2.0 and later:
disable_mime_output_conversion (no)
- Disable the conversion of 8BITMIME format to 7BIT
+ Disable the conversion of 8BITMIME format to 7BIT
format.
mime_boundary_length_limit (2048)
@@ -126,50 +140,50 @@ SMTP(8) SMTP(8)
strings.
mime_nesting_limit (100)
- The maximal nesting level of multipart mail that
- the MIME processor will handle.
+ The maximal recursion level that the MIME processor
+ will handle.
EXTERNAL CONTENT INSPECTION CONTROLS
Available in Postfix version 2.1 and later:
smtp_send_xforward_command (no)
- Send the non-standard XFORWARD command when the
- Postfix SMTP server EHLO response announces XFOR-
+ Send the non-standard XFORWARD command when the
+ Postfix SMTP server EHLO response announces XFOR-
WARD support.
SASL AUTHENTICATION CONTROLS
smtp_sasl_auth_enable (no)
- Enable SASL authentication in the Postfix SMTP
+ Enable SASL authentication in the Postfix SMTP
client.
smtp_sasl_password_maps (empty)
- Optional SMTP client lookup tables with one user-
- name:password entry per remote hostname or domain.
+ Optional SMTP client lookup tables with one user-
+ name:password entry per remote hostname or domain.
smtp_sasl_security_options (noplaintext, noanonymous)
- What authentication mechanisms the Postfix SMTP
+ What authentication mechanisms the Postfix SMTP
client is allowed to use.
RESOURCE AND RATE CONTROLS
smtp_destination_concurrency_limit ($default_destina-
tion_concurrency_limit)
- The maximal number of parallel deliveries to the
- same destination via the smtp message delivery
+ The maximal number of parallel deliveries to the
+ same destination via the smtp message delivery
transport.
smtp_destination_recipient_limit ($default_destina-
tion_recipient_limit)
- The maximal number of recipients per delivery via
+ The maximal number of recipients per delivery via
the smtp message delivery transport.
smtp_connect_timeout (30s)
- The SMTP client time limit for completing a TCP
+ The SMTP client time limit for completing a TCP
connection, or zero (use the operating system
built-in time limit).
smtp_helo_timeout (300s)
- The SMTP client time limit for sending the HELO or
- EHLO command, and for receiving the initial server
+ The SMTP client time limit for sending the HELO or
+ EHLO command, and for receiving the initial server
response.
smtp_xforward_timeout (300s)
@@ -177,30 +191,30 @@ SMTP(8) SMTP(8)
command, and for receiving the server response.
smtp_mail_timeout (300s)
- The SMTP client time limit for sending the MAIL
- FROM command, and for receiving the server
+ The SMTP client time limit for sending the MAIL
+ FROM command, and for receiving the server
response.
smtp_rcpt_timeout (300s)
- The SMTP client time limit for sending the SMTP
- RCPT TO command, and for receiving the server
+ The SMTP client time limit for sending the SMTP
+ RCPT TO command, and for receiving the server
response.
smtp_data_init_timeout (120s)
- The SMTP client time limit for sending the SMTP
- DATA command, and for receiving the server
+ The SMTP client time limit for sending the SMTP
+ DATA command, and for receiving the server
response.
smtp_data_xfer_timeout (180s)
- The SMTP client time limit for sending the SMTP
+ The SMTP client time limit for sending the SMTP
message content.
smtp_data_done_timeout (600s)
- The SMTP client time limit for sending the SMTP
+ The SMTP client time limit for sending the SMTP
".", and for receiving the server response.
smtp_quit_timeout (300s)
- The SMTP client time limit for sending the QUIT
+ The SMTP client time limit for sending the QUIT
command, and for receiving the server response.
Available in Postfix version 2.1 and later:
@@ -211,14 +225,30 @@ SMTP(8) SMTP(8)
lookups, or zero (no limit).
smtp_mx_session_limit (2)
- The maximal number of SMTP sessions per delivery
- request before giving up or delivering to a fall-
+ The maximal number of SMTP sessions per delivery
+ request before giving up or delivering to a fall-
back relay host, or zero (no limit).
- smtp_rset_timeout (120s)
- The SMTP client time limit for sending the RSET
+ smtp_rset_timeout (20s)
+ The SMTP client time limit for sending the RSET
command, and for receiving the server response.
+ Available in Postfix version 2.2 and later:
+
+ smtp_connection_cache_domains (empty)
+ The SMTP destinations for which SMTP connection
+ caching is enabled.
+
+ smtp_connection_cache_reuse_limit (10)
+ When SMTP session caching is enabled, the number of
+ times that an SMTP session is reused before it is
+ closed.
+
+ smtp_connection_cache_time_limit (2s)
+ When SMTP session caching is enabled, the amount of
+ time that an unused SMTP client socket is kept open
+ before it is closed.
+
TROUBLE SHOOTING CONTROLS
debug_peer_level (2)
The increment in verbose logging level when a
@@ -320,6 +350,7 @@ SMTP(8) SMTP(8)
SEE ALSO
qmgr(8), queue manager
bounce(8), delivery status reports
+ scache(8), session cache server
postconf(5), configuration parameters
master(8), process manager
syslogd(8), system logging
@@ -337,5 +368,17 @@ SMTP(8) SMTP(8)
P.O. Box 704
Yorktown Heights, NY 10598, USA
+ Command pipelining in cooperation with:
+ Jon Ribbens
+ Oaktree Internet Solutions Ltd.,
+ Internet House,
+ Canal Basin,
+ Coventry,
+ CV1 4LY, United Kingdom.
+
+ Connection caching in cooperation with:
+ Victor Duchovni
+ Morgan Stanley
+
SMTP(8)