diff --git a/postfix/HISTORY b/postfix/HISTORY index 5fbfbff68..c502ba6a9 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -19627,10 +19627,25 @@ Apologies for any names omitted. Feature: local_bounce_defer_filter support. Files: global/bounce.[hc], global/defer.[hc], local/command.c, local/file.c, local/bounce_workaround.c, local/local.c, - global/mail_params.h. + global/mail_params.h, mantools/postlink. 20140318 Refinement: don't throttle an SMTP destination when the new smtp_bounce_defer_filter feature turns a soft bounce into a hard bounce. File: smtp/smtp_trouble.c. + +20140320 + + Feature: support to replace successful delivery status code + and explanatory text. This can be used to to hide local + details such as destination commands or file names when a + remote sender requests confirmation of delivery. As of now + *_bounce_defer_filter is renamed into *_delivery_status_filter. + Files: global/bounce.c, global/bounce.h, global/defer.c, + global/defer.h, global/dsn_filter.c, global/dsn_filter.h, + global/mail_params.c, global/mail_params.h, global/sent.c, + local/local.c, master/event_server.c, master/multi_server.c, + master/single_server.c, master/trigger_server.c, pipe/pipe.c, + smtp/lmtp_params.c, smtp/smtp.c, smtp/smtp_params.c, + virtual/virtual.c, mantools/postlink. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 2d4cfb9a4..e56c6dc7a 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -16,42 +16,53 @@ specifies the release date of a stable release or snapshot release. If you upgrade from Postfix 2.10 or earlier, read RELEASE_NOTES-2.11 before proceeding. -Major changes with snapshot 20140318 +Major changes with snapshot 20140321 ==================================== -Support to change arbitrary hard delivery errors into soft errors -and vice versa, or to replace the descriptive text in non-delivery -notifications. This was originally implemented for sites that want -to bounce mail when no remote SMTP server supports STARTTLS. +Delivery status filter support, to replace the delivery status codes +and explanatory text of successful or unsuccessful deliveries. This +was originally implemented for sites that want to turn certain soft +delivery errors into hard delivery errors, but it can also be used +to censor out information from delivery confirmation reports. This feature is implemented as a filter that replaces the three-number enhanced status code and descriptive text in Postfix delivery agent -bounce/defer messages. Note: this will not override "soft_bounce=yes". +success, bounce, or defer messages. Note: this will not override +"soft_bounce=yes", and this will not change a successful delivery +status into an unsuccessful status or vice versa. -The following example turns specific soft TLS errors into hard +The first example turns specific soft TLS errors into hard errors, by overriding the first number in the enhanced status code. /etc/postfix/main.cf: - smtp_bounce_defer_filter = pcre:/etc/postfix/smtp_ndr_filter + smtp_delivery_status_filter = pcre:/etc/postfix/smtp_dsn_filter -/etc/postfix/smtp_ndr_filter: +/etc/postfix/smtp_dsn_filter: /^4(\.\d+\.\d+ TLS is required, but host \S+ refused to start TLS: .+)/ 5$1 /^4(\.\d+\.\d+ TLS is required, but was not offered by host .+)/ 5$1 +The second example removes the destination command name and file +name from local(8) successful delivery reports, so that they will +not be reported when a sender requests confirmation of delivery. + +/etc/postfix/main.cf: + local_delivery_status_filter = pcre:/etc/postfix/local_dsn_filter + +/etc/postfix/local_dsn_filter: + /^(2\S+ delivered to file).+/ $1 + /^(2\S+ delivered to command).+/ $1 + This feature is supported in the lmtp(8), local(8), pipe(8), smtp(8) and virtual(8) delivery agents. That is, all delivery agents that actually deliver mail. -This feature will not be supported in the error(8) or retry(8) dummy -delivery agents, because lots of things would break. - The new main.cf parameters and default values are: - default_bounce_defer_filter = - lmtp_bounce_defer_filter = $default_bounce_defer_filter - local_bounce_defer_filter = $default_bounce_defer_filter - pipe_bounce_defer_filter = $default_bounce_defer_filter - smtp_bounce_defer_filter = $default_bounce_defer_filter - virtual_bounce_defer_filter = $default_bounce_defer_filter + default_delivery_status_filter = + lmtp_delivery_status_filter = $default_delivery_status_filter + local_delivery_status_filter = $default_delivery_status_filter + pipe_delivery_status_filter = $default_delivery_status_filter + smtp_delivery_status_filter = $default_delivery_status_filter + virtual_delivery_status_filter = $default_delivery_status_filter See the postconf(5) manpage for more details. diff --git a/postfix/html/lmtp.8.html b/postfix/html/lmtp.8.html index bbbcc1a26..6a85843d1 100644 --- a/postfix/html/lmtp.8.html +++ b/postfix/html/lmtp.8.html @@ -292,9 +292,10 @@ SMTP(8) SMTP(8) Available in Postfix version 2.12 and later: - smtp_bounce_defer_filter ($default_bounce_defer_filter) - Optional filter to change arbitrary hard delivery errors into - soft errors and vice versa in the smtp(8) delivery agent. + smtp_delivery_status_filter ($default_delivery_status_filter) + Optional filter for the smtp(8) delivery agent to change the + delivery status code or explanatory text of successful or unsuc- + cessful deliveries. MIME PROCESSING CONTROLS Available in Postfix version 2.0 and later: @@ -312,7 +313,7 @@ SMTP(8) SMTP(8) Available in Postfix version 2.1 and later: smtp_send_xforward_command (no) - Send the non-standard XFORWARD command when the Postfix SMTP + Send the non-standard XFORWARD command when the Postfix SMTP server EHLO response announces XFORWARD support. SASL AUTHENTICATION CONTROLS @@ -320,62 +321,62 @@ SMTP(8) SMTP(8) Enable SASL authentication in the Postfix SMTP client. smtp_sasl_password_maps (empty) - Optional Postfix SMTP client lookup tables with one user- - name:password entry per remote hostname or domain, or sender + Optional Postfix SMTP client lookup tables with one user- + name:password entry per remote hostname or domain, or sender address when sender-dependent authentication is enabled. smtp_sasl_security_options (noplaintext, noanonymous) Postfix SMTP client SASL security options; as of Postfix 2.3 the - list of available features depends on the SASL client implemen- + list of available features depends on the SASL client implemen- tation that is selected with smtp_sasl_type. Available in Postfix version 2.2 and later: smtp_sasl_mechanism_filter (empty) - If non-empty, a Postfix SMTP client filter for the remote SMTP + If non-empty, a Postfix SMTP client filter for the remote SMTP server's list of offered SASL mechanisms. Available in Postfix version 2.3 and later: smtp_sender_dependent_authentication (no) Enable sender-dependent authentication in the Postfix SMTP - client; this is available only with SASL authentication, and - disables SMTP connection caching to ensure that mail from dif- + client; this is available only with SASL authentication, and + disables SMTP connection caching to ensure that mail from dif- ferent senders will use the appropriate credentials. smtp_sasl_path (empty) Implementation-specific information that the Postfix SMTP client - passes through to the SASL plug-in implementation that is + passes through to the SASL plug-in implementation that is selected with smtp_sasl_type. smtp_sasl_type (cyrus) - The SASL plug-in type that the Postfix SMTP client should use + The SASL plug-in type that the Postfix SMTP client should use for authentication. Available in Postfix version 2.5 and later: smtp_sasl_auth_cache_name (empty) - An optional table to prevent repeated SASL authentication fail- - ures with the same remote SMTP server hostname, username and + An optional table to prevent repeated SASL authentication fail- + ures with the same remote SMTP server hostname, username and password. smtp_sasl_auth_cache_time (90d) - The maximal age of an smtp_sasl_auth_cache_name entry before it + The maximal age of an smtp_sasl_auth_cache_name entry before it is removed. smtp_sasl_auth_soft_bounce (yes) - When a remote SMTP server rejects a SASL authentication request - with a 535 reply code, defer mail delivery instead of returning + When a remote SMTP server rejects a SASL authentication request + with a 535 reply code, defer mail delivery instead of returning mail as undeliverable. Available in Postfix version 2.9 and later: smtp_send_dummy_mail_auth (no) - Whether or not to append the "AUTH=<>" option to the MAIL FROM + Whether or not to append the "AUTH=<>" option to the MAIL FROM command in SASL-authenticated SMTP sessions. STARTTLS SUPPORT CONTROLS - Detailed information about STARTTLS configuration may be found in the + Detailed information about STARTTLS configuration may be found in the TLS_README document. smtp_tls_security_level (empty) @@ -385,20 +386,20 @@ SMTP(8) SMTP(8) smtp_tls_enforce_peername. smtp_sasl_tls_security_options ($smtp_sasl_security_options) - The SASL authentication security options that the Postfix SMTP + The SASL authentication security options that the Postfix SMTP client uses for TLS encrypted SMTP sessions. smtp_starttls_timeout (300s) - Time limit for Postfix SMTP client write and read operations + Time limit for Postfix SMTP client write and read operations during TLS startup and shutdown handshake procedures. smtp_tls_CAfile (empty) - A file containing CA certificates of root CAs trusted to sign - either remote SMTP server certificates or intermediate CA cer- + A file containing CA certificates of root CAs trusted to sign + either remote SMTP server certificates or intermediate CA cer- tificates. smtp_tls_CApath (empty) - Directory with PEM format certificate authority certificates + Directory with PEM format certificate authority certificates that the Postfix SMTP client uses to verify a remote SMTP server certificate. @@ -406,7 +407,7 @@ SMTP(8) SMTP(8) File with the Postfix SMTP client RSA certificate in PEM format. smtp_tls_mandatory_ciphers (medium) - The minimum TLS cipher grade that the Postfix SMTP client will + The minimum TLS cipher grade that the Postfix SMTP client will use with mandatory TLS encryption. smtp_tls_exclude_ciphers (empty) @@ -414,8 +415,8 @@ SMTP(8) SMTP(8) client cipher list at all TLS security levels. smtp_tls_mandatory_exclude_ciphers (empty) - Additional list of ciphers or cipher types to exclude from the - Postfix SMTP client cipher list at mandatory TLS security lev- + Additional list of ciphers or cipher types to exclude from the + Postfix SMTP client cipher list at mandatory TLS security lev- els. smtp_tls_dcert_file (empty) @@ -431,7 +432,7 @@ SMTP(8) SMTP(8) Enable additional Postfix SMTP client logging of TLS activity. smtp_tls_note_starttls_offer (no) - Log the hostname of a remote SMTP server that offers STARTTLS, + Log the hostname of a remote SMTP server that offers STARTTLS, when TLS is not already enabled for that server. smtp_tls_policy_maps (empty) @@ -440,14 +441,14 @@ SMTP(8) SMTP(8) fied, this overrides the obsolete smtp_tls_per_site parameter. smtp_tls_mandatory_protocols (!SSLv2) - List of SSL/TLS protocols that the Postfix SMTP client will use + List of SSL/TLS protocols that the Postfix SMTP client will use with mandatory TLS encryption. smtp_tls_scert_verifydepth (9) The verification depth for remote SMTP server certificates. smtp_tls_secure_cert_match (nexthop, dot-nexthop) - How the Postfix SMTP client verifies the server certificate + How the Postfix SMTP client verifies the server certificate peername for the "secure" TLS security level. smtp_tls_session_cache_database (empty) @@ -455,16 +456,16 @@ SMTP(8) SMTP(8) session cache. smtp_tls_session_cache_timeout (3600s) - The expiration time of Postfix SMTP client TLS session cache + The expiration time of Postfix SMTP client TLS session cache information. smtp_tls_verify_cert_match (hostname) - How the Postfix SMTP client verifies the server certificate + How the Postfix SMTP client verifies the server certificate peername for the "verify" TLS security level. tls_daemon_random_bytes (32) - The number of pseudo-random bytes that an smtp(8) or smtpd(8) - process requests from the tlsmgr(8) server in order to seed its + The number of pseudo-random bytes that an smtp(8) or smtpd(8) + process requests from the tlsmgr(8) server in order to seed its internal pseudo random number generator (PRNG). tls_high_cipherlist (ALL:!EXPORT:!LOW:!MEDIUM:+RC4:@STRENGTH) @@ -480,52 +481,52 @@ SMTP(8) SMTP(8) The OpenSSL cipherlist for "EXPORT" or higher grade ciphers. tls_null_cipherlist (eNULL:!aNULL) - The OpenSSL cipherlist for "NULL" grade ciphers that provide + The OpenSSL cipherlist for "NULL" grade ciphers that provide authentication without encryption. Available in Postfix version 2.4 and later: smtp_sasl_tls_verified_security_options ($smtp_sasl_tls_secu- rity_options) - The SASL authentication security options that the Postfix SMTP - client uses for TLS encrypted SMTP sessions with a verified + The SASL authentication security options that the Postfix SMTP + client uses for TLS encrypted SMTP sessions with a verified server certificate. Available in Postfix version 2.5 and later: smtp_tls_fingerprint_cert_match (empty) - List of acceptable remote SMTP server certificate fingerprints - for the "fingerprint" TLS security level (smtp_tls_secu- + List of acceptable remote SMTP server certificate fingerprints + for the "fingerprint" TLS security level (smtp_tls_secu- rity_level = fingerprint). smtp_tls_fingerprint_digest (md5) - The message digest algorithm used to construct remote SMTP + The message digest algorithm used to construct remote SMTP server certificate fingerprints. Available in Postfix version 2.6 and later: smtp_tls_protocols (!SSLv2) - List of TLS protocols that the Postfix SMTP client will exclude + List of TLS protocols that the Postfix SMTP client will exclude or include with opportunistic TLS encryption. smtp_tls_ciphers (export) - The minimum TLS cipher grade that the Postfix SMTP client will + The minimum TLS cipher grade that the Postfix SMTP client will use with opportunistic TLS encryption. smtp_tls_eccert_file (empty) - File with the Postfix SMTP client ECDSA certificate in PEM for- + File with the Postfix SMTP client ECDSA certificate in PEM for- mat. smtp_tls_eckey_file ($smtp_tls_eccert_file) - File with the Postfix SMTP client ECDSA private key in PEM for- + File with the Postfix SMTP client ECDSA private key in PEM for- mat. Available in Postfix version 2.7 and later: smtp_tls_block_early_mail_reply (no) - Try to detect a mail hijacking attack based on a TLS protocol - vulnerability (CVE-2009-3555), where an attacker prepends mali- - cious HELO, MAIL, RCPT, DATA commands to a Postfix SMTP client + Try to detect a mail hijacking attack based on a TLS protocol + vulnerability (CVE-2009-3555), where an attacker prepends mali- + cious HELO, MAIL, RCPT, DATA commands to a Postfix SMTP client TLS session. Available in Postfix version 2.8 and later: @@ -536,11 +537,11 @@ SMTP(8) SMTP(8) Available in Postfix version 2.11 and later: smtp_tls_trust_anchor_file (empty) - Zero or more PEM-format files with trust-anchor certificates + Zero or more PEM-format files with trust-anchor certificates and/or public keys. smtp_tls_force_insecure_host_tlsa_lookup (no) - Lookup the associated DANE TLSA RRset even when a hostname is + Lookup the associated DANE TLSA RRset even when a hostname is not an alias and its address records lie in an unsigned zone. tls_dane_trust_anchor_digest_enable (yes) @@ -550,49 +551,49 @@ SMTP(8) SMTP(8) The name of the tlsmgr(8) service entry in master.cf. OBSOLETE STARTTLS CONTROLS - The following configuration parameters exist for compatibility with - Postfix versions before 2.3. Support for these will be removed in a + The following configuration parameters exist for compatibility with + Postfix versions before 2.3. Support for these will be removed in a future release. smtp_use_tls (no) - Opportunistic mode: use TLS when a remote SMTP server announces + Opportunistic mode: use TLS when a remote SMTP server announces STARTTLS support, otherwise send the mail in the clear. smtp_enforce_tls (no) - Enforcement mode: require that remote SMTP servers use TLS + Enforcement mode: require that remote SMTP servers use TLS encryption, and never send mail in the clear. smtp_tls_enforce_peername (yes) - With mandatory TLS encryption, require that the remote SMTP - server hostname matches the information in the remote SMTP + With mandatory TLS encryption, require that the remote SMTP + server hostname matches the information in the remote SMTP server certificate. smtp_tls_per_site (empty) - Optional lookup tables with the Postfix SMTP client TLS usage - policy by next-hop destination and by remote SMTP server host- + Optional lookup tables with the Postfix SMTP client TLS usage + policy by next-hop destination and by remote SMTP server host- name. smtp_tls_cipherlist (empty) - Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS + Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS cipher list. RESOURCE AND RATE CONTROLS smtp_destination_concurrency_limit ($default_destination_concur- rency_limit) - The maximal number of parallel deliveries to the same destina- + The maximal number of parallel deliveries to the same destina- tion via the smtp message delivery transport. smtp_destination_recipient_limit ($default_destination_recipient_limit) - The maximal number of recipients per message for the smtp mes- + The maximal number of recipients per message for the smtp mes- sage delivery transport. smtp_connect_timeout (30s) - The Postfix SMTP client time limit for completing a TCP connec- + The Postfix SMTP client time limit for completing a TCP connec- tion, or zero (use the operating system built-in time limit). smtp_helo_timeout (300s) - The Postfix SMTP client time limit for sending the HELO or EHLO - command, and for receiving the initial remote SMTP server + The Postfix SMTP client time limit for sending the HELO or EHLO + command, and for receiving the initial remote SMTP server response. lmtp_lhlo_timeout (300s) @@ -604,19 +605,19 @@ SMTP(8) SMTP(8) mand, and for receiving the remote SMTP server response. smtp_mail_timeout (300s) - The Postfix SMTP client time limit for sending the MAIL FROM + The Postfix SMTP client time limit for sending the MAIL FROM command, and for receiving the remote SMTP server response. smtp_rcpt_timeout (300s) - The Postfix SMTP client time limit for sending the SMTP RCPT TO + The Postfix SMTP client time limit for sending the SMTP RCPT TO command, and for receiving the remote SMTP server response. smtp_data_init_timeout (120s) - The Postfix SMTP client time limit for sending the SMTP DATA + The Postfix SMTP client time limit for sending the SMTP DATA command, and for receiving the remote SMTP server response. smtp_data_xfer_timeout (180s) - The Postfix SMTP client time limit for sending the SMTP message + The Postfix SMTP client time limit for sending the SMTP message content. smtp_data_done_timeout (600s) @@ -630,13 +631,13 @@ SMTP(8) SMTP(8) Available in Postfix version 2.1 and later: smtp_mx_address_limit (5) - The maximal number of MX (mail exchanger) IP addresses that can - result from Postfix SMTP client mail exchanger lookups, or zero + The maximal number of MX (mail exchanger) IP addresses that can + result from Postfix SMTP client mail exchanger lookups, or zero (no limit). smtp_mx_session_limit (2) - The maximal number of SMTP sessions per delivery request before - the Postfix SMTP client gives up or delivers to a fall-back + The maximal number of SMTP sessions per delivery request before + the Postfix SMTP client gives up or delivers to a fall-back relay host, or zero (no limit). smtp_rset_timeout (20s) @@ -646,17 +647,17 @@ SMTP(8) SMTP(8) Available in Postfix version 2.2 and earlier: lmtp_cache_connection (yes) - Keep Postfix LMTP client connections open for up to $max_idle + Keep Postfix LMTP client connections open for up to $max_idle seconds. Available in Postfix version 2.2 and later: smtp_connection_cache_destinations (empty) - Permanently enable SMTP connection caching for the specified + Permanently enable SMTP connection caching for the specified destinations. smtp_connection_cache_on_demand (yes) - Temporarily enable SMTP connection caching while a destination + Temporarily enable SMTP connection caching while a destination has a high volume of mail in the active queue. smtp_connection_reuse_time_limit (300s) @@ -670,37 +671,37 @@ SMTP(8) SMTP(8) Available in Postfix version 2.3 and later: connection_cache_protocol_timeout (5s) - Time limit for connection cache connect, send or receive opera- + Time limit for connection cache connect, send or receive opera- tions. Available in Postfix version 2.9 and later: smtp_per_record_deadline (no) - Change the behavior of the smtp_*_timeout time limits, from a - time limit per read or write system call, to a time limit to - send or receive a complete record (an SMTP command line, SMTP - response line, SMTP message content line, or TLS protocol mes- + Change the behavior of the smtp_*_timeout time limits, from a + time limit per read or write system call, to a time limit to + send or receive a complete record (an SMTP command line, SMTP + response line, SMTP message content line, or TLS protocol mes- sage). Available in Postfix version 2.11 and later: smtp_connection_reuse_count_limit (0) - When SMTP connection caching is enabled, the number of times - that an SMTP session may be reused before it is closed, or zero + When SMTP connection caching is enabled, the number of times + that an SMTP session may be reused before it is closed, or zero (no limit). TROUBLE SHOOTING CONTROLS debug_peer_level (2) - The increment in verbose logging level when a remote client or + The increment in verbose logging level when a remote client or server matches a pattern in the debug_peer_list parameter. debug_peer_list (empty) - Optional list of remote client or server hostname or network + Optional list of remote client or server hostname or network address patterns that cause the verbose logging level to increase by the amount specified in $debug_peer_level. error_notice_recipient (postmaster) - The recipient of postmaster notifications about mail delivery + The recipient of postmaster notifications about mail delivery problems that are caused by policy, resource, software or proto- col errors. @@ -714,46 +715,46 @@ SMTP(8) SMTP(8) MISCELLANEOUS CONTROLS best_mx_transport (empty) - Where the Postfix SMTP client should deliver mail when it + Where the Postfix SMTP client should deliver mail when it detects a "mail loops back to myself" error condition. config_directory (see 'postconf -d' output) - The default location of the Postfix main.cf and master.cf con- + The default location of the Postfix main.cf and master.cf con- figuration files. daemon_timeout (18000s) - How much time a Postfix daemon process may take to handle a + How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. delay_logging_resolution_limit (2) - The maximal number of digits after the decimal point when log- + The maximal number of digits after the decimal point when log- ging sub-second delay values. disable_dns_lookups (no) Disable DNS lookups in the Postfix SMTP and LMTP clients. inet_interfaces (all) - The network interface addresses that this mail system receives + The network interface addresses that this mail system receives mail on. inet_protocols (all) - The Internet protocols Postfix will attempt to use when making + The Internet protocols Postfix will attempt to use when making or accepting connections. ipc_timeout (3600s) - The time limit for sending or receiving information over an + The time limit for sending or receiving information over an internal communication channel. lmtp_assume_final (no) - When a remote LMTP server announces no DSN support, assume that - the server performs final delivery, and send "delivered" deliv- + When a remote LMTP server announces no DSN support, assume that + the server performs final delivery, and send "delivered" deliv- ery status notifications instead of "relayed". lmtp_tcp_port (24) The default TCP port that the Postfix LMTP client connects to. max_idle (100s) - The maximum amount of time that an idle Postfix daemon process + The maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily. max_use (100) @@ -767,20 +768,20 @@ SMTP(8) SMTP(8) The process name of a Postfix command or daemon process. proxy_interfaces (empty) - The network interface addresses that this mail system receives + The network interface addresses that this mail system receives mail on by way of a proxy or network address translation unit. smtp_address_preference (any) The address type ("ipv6", "ipv4" or "any") that the Postfix SMTP - client will try first, when a destination has IPv6 and IPv4 + client will try first, when a destination has IPv6 and IPv4 addresses with equal MX preference. smtp_bind_address (empty) - An optional numerical network address that the Postfix SMTP + An optional numerical network address that the Postfix SMTP client should bind to when making an IPv4 connection. smtp_bind_address6 (empty) - An optional numerical network address that the Postfix SMTP + An optional numerical network address that the Postfix SMTP client should bind to when making an IPv6 connection. smtp_helo_name ($myhostname) @@ -800,8 +801,8 @@ SMTP(8) SMTP(8) The syslog facility of Postfix logging. syslog_name (see 'postconf -d' output) - The mail system name that is prepended to the process name in - syslog records, so that "smtpd" becomes, for example, "post- + The mail system name that is prepended to the process name in + syslog records, so that "smtpd" becomes, for example, "post- fix/smtpd". Available with Postfix 2.2 and earlier: diff --git a/postfix/html/local.8.html b/postfix/html/local.8.html index 8d450937f..67245eb16 100644 --- a/postfix/html/local.8.html +++ b/postfix/html/local.8.html @@ -360,43 +360,44 @@ LOCAL(8) LOCAL(8) Available in Postfix version 2.12 and later: - local_bounce_defer_filter ($default_bounce_defer_filter) - Optional filter to change arbitrary hard delivery errors into - soft errors and vice versa in the local(8) delivery agent. + local_delivery_status_filter ($default_delivery_status_filter) + Optional filter for the local(8) delivery agent to change the + status code or explanatory text of successful or unsuccessful + deliveries. DELIVERY METHOD CONTROLS - The precedence of local(8) delivery methods from high to low is: + The precedence of local(8) delivery methods from high to low is: aliases, .forward files, mailbox_transport_maps, mailbox_transport, - mailbox_command_maps, mailbox_command, home_mailbox, mail_spool_direc- + mailbox_command_maps, mailbox_command, home_mailbox, mail_spool_direc- tory, fallback_transport_maps, fallback_transport, and luser_relay. alias_maps (see 'postconf -d' output) The alias databases that are used for local(8) delivery. forward_path (see 'postconf -d' output) - The local(8) delivery agent search list for finding a .forward + The local(8) delivery agent search list for finding a .forward file with user-specified delivery methods. mailbox_transport_maps (empty) Optional lookup tables with per-recipient message delivery - transports to use for local(8) mailbox delivery, whether or not + transports to use for local(8) mailbox delivery, whether or not the recipients are found in the UNIX passwd database. mailbox_transport (empty) - Optional message delivery transport that the local(8) delivery - agent should use for mailbox delivery to all local recipients, + Optional message delivery transport that the local(8) delivery + agent should use for mailbox delivery to all local recipients, whether or not they are found in the UNIX passwd database. mailbox_command_maps (empty) - Optional lookup tables with per-recipient external commands to + Optional lookup tables with per-recipient external commands to use for local(8) mailbox delivery. mailbox_command (empty) - Optional external command that the local(8) delivery agent + Optional external command that the local(8) delivery agent should use for mailbox delivery. home_mailbox (empty) - Optional pathname of a mailbox file relative to a local(8) + Optional pathname of a mailbox file relative to a local(8) user's home directory. mail_spool_directory (see 'postconf -d' output) @@ -408,17 +409,17 @@ LOCAL(8) LOCAL(8) not find in the aliases(5) or UNIX password database. fallback_transport (empty) - Optional message delivery transport that the local(8) delivery - agent should use for names that are not found in the aliases(5) + Optional message delivery transport that the local(8) delivery + agent should use for names that are not found in the aliases(5) or UNIX password database. luser_relay (empty) - Optional catch-all destination for unknown local(8) recipients. + Optional catch-all destination for unknown local(8) recipients. Available in Postfix version 2.2 and later: command_execution_directory (empty) - The local(8) delivery agent working directory for delivery to + The local(8) delivery agent working directory for delivery to external command. MAILBOX LOCKING CONTROLS @@ -427,15 +428,15 @@ LOCAL(8) LOCAL(8) mailbox file or bounce(8) logfile. deliver_lock_delay (1s) - The time between attempts to acquire an exclusive lock on a + The time between attempts to acquire an exclusive lock on a mailbox file or bounce(8) logfile. stale_lock_time (500s) - The time after which a stale exclusive mailbox lockfile is + The time after which a stale exclusive mailbox lockfile is removed. mailbox_delivery_lock (see 'postconf -d' output) - How to lock a UNIX-style local(8) mailbox before attempting + How to lock a UNIX-style local(8) mailbox before attempting delivery. RESOURCE AND RATE CONTROLS @@ -448,18 +449,18 @@ LOCAL(8) LOCAL(8) showq(8) queue displays. local_destination_concurrency_limit (2) - The maximal number of parallel deliveries via the local mail - delivery transport to the same recipient (when "local_destina- - tion_recipient_limit = 1") or the maximal number of parallel + The maximal number of parallel deliveries via the local mail + delivery transport to the same recipient (when "local_destina- + tion_recipient_limit = 1") or the maximal number of parallel deliveries to the same local domain (when "local_destina- tion_recipient_limit > 1"). local_destination_recipient_limit (1) - The maximal number of recipients per message delivery via the + The maximal number of recipients per message delivery via the local mail delivery transport. mailbox_size_limit (51200000) - The maximal size of any local(8) individual mailbox or maildir + The maximal size of any local(8) individual mailbox or maildir file, or zero (no limit). SECURITY CONTROLS @@ -470,49 +471,49 @@ LOCAL(8) LOCAL(8) Restrict local(8) mail delivery to external files. command_expansion_filter (see 'postconf -d' output) - Restrict the characters that the local(8) delivery agent allows - in $name expansions of $mailbox_command and $command_execu- + Restrict the characters that the local(8) delivery agent allows + in $name expansions of $mailbox_command and $command_execu- tion_directory. default_privs (nobody) - The default rights used by the local(8) delivery agent for + The default rights used by the local(8) delivery agent for delivery to external file or command. forward_expansion_filter (see 'postconf -d' output) - Restrict the characters that the local(8) delivery agent allows + Restrict the characters that the local(8) delivery agent allows in $name expansions of $forward_path. Available in Postfix version 2.2 and later: execution_directory_expansion_filter (see 'postconf -d' output) - Restrict the characters that the local(8) delivery agent allows + Restrict the characters that the local(8) delivery agent allows in $name expansions of $command_execution_directory. Available in Postfix version 2.5.3 and later: strict_mailbox_ownership (yes) - Defer delivery when a mailbox file is not owned by its recipi- + Defer delivery when a mailbox file is not owned by its recipi- ent. MISCELLANEOUS CONTROLS config_directory (see 'postconf -d' output) - The default location of the Postfix main.cf and master.cf con- + The default location of the Postfix main.cf and master.cf con- figuration files. daemon_timeout (18000s) - How much time a Postfix daemon process may take to handle a + How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. delay_logging_resolution_limit (2) - The maximal number of digits after the decimal point when log- + The maximal number of digits after the decimal point when log- ging sub-second delay values. export_environment (see 'postconf -d' output) - The list of environment variables that a Postfix process will + The list of environment variables that a Postfix process will export to non-Postfix processes. ipc_timeout (3600s) - The time limit for sending or receiving information over an + The time limit for sending or receiving information over an internal communication channel. local_command_shell (empty) @@ -520,7 +521,7 @@ LOCAL(8) LOCAL(8) mand. max_idle (100s) - The maximum amount of time that an idle Postfix daemon process + The maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily. max_use (100) @@ -528,8 +529,8 @@ LOCAL(8) LOCAL(8) process will service before terminating voluntarily. prepend_delivered_header (command, file, forward) - The message delivery contexts where the Postfix local(8) deliv- - ery agent prepends a Delivered-To: message header with the + The message delivery contexts where the Postfix local(8) deliv- + ery agent prepends a Delivered-To: message header with the address that the mail was delivered to. process_id (read-only) @@ -539,15 +540,15 @@ LOCAL(8) LOCAL(8) The process name of a Postfix command or daemon process. propagate_unmatched_extensions (canonical, virtual) - What address lookup tables copy an address extension from the + What address lookup tables copy an address extension from the lookup key to the lookup result. queue_directory (see 'postconf -d' output) The location of the Postfix top-level queue directory. recipient_delimiter (empty) - The set of characters that can separate a user name from its - extension (example: user+foo), or a .forward file name from its + The set of characters that can separate a user name from its + extension (example: user+foo), or a .forward file name from its extension (example: .forward+foo). require_home_directory (no) @@ -558,8 +559,8 @@ LOCAL(8) LOCAL(8) The syslog facility of Postfix logging. syslog_name (see 'postconf -d' output) - The mail system name that is prepended to the process name in - syslog records, so that "smtpd" becomes, for example, "post- + The mail system name that is prepended to the process name in + syslog records, so that "smtpd" becomes, for example, "post- fix/smtpd". FILES @@ -582,10 +583,10 @@ LOCAL(8) LOCAL(8) The Secure Mailer license must be distributed with this software. HISTORY - The Delivered-To: message header appears in the qmail system by Daniel + The Delivered-To: message header appears in the qmail system by Daniel Bernstein. - The maildir structure appears in the qmail system by Daniel Bernstein. + The maildir structure appears in the qmail system by Daniel Bernstein. AUTHOR(S) Wietse Venema diff --git a/postfix/html/pipe.8.html b/postfix/html/pipe.8.html index 1ecbcaac1..8c21f4c7e 100644 --- a/postfix/html/pipe.8.html +++ b/postfix/html/pipe.8.html @@ -449,9 +449,10 @@ PIPE(8) PIPE(8) Available in Postfix version 2.12 and later: - pipe_bounce_defer_filter ($default_bounce_defer_filter) - Optional filter to change arbitrary hard delivery errors into - soft errors and vice versa in the pipe(8) delivery agent. + pipe_delivery_status_filter ($default_delivery_status_filter) + Optional filter for the pipe(8) delivery agent to change the + delivery status code or explanatory text of successful or unsuc- + cessful deliveries. SEE ALSO qmgr(8), queue manager diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index f6ddb475f..316f0fb12 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -1756,74 +1756,6 @@ Example: - - -
Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa. This is implemented by rewriting the -three-number enhanced status code and the explanatory text in a -Postfix delivery agent bounce/defer message.
- -Specify zero or more "type:table" lookup table names, separated -by comma or whitespace. With each bounce or defer request, the -tables are queried in the specified order with one line of text -that is structured as follows:
- --enhanced-status-code SPACE explanatory-text -- -
The first table match wins. The lookup result must have the -same structure as the query: enhanced status codes must have a -first numerical field of 4 (defer) or 5 (bounce), and the explanatory -text field must be non-empty. Other results will result in a warning. -
- -Example:
- -The following example turns specific soft TLS errors into hard -errors, by overriding the first number in the enhanced status code. -
- --- --/etc/postfix/main.cf: - smtp_bounce_defer_filter = pcre:/etc/postfix/smtp_ndr_filter --
-- --/etc/postfix/smtp_ndr_filter: - /^4(\.\d+\.\d+ TLS is required, but host \S+ refused to start TLS: .+)/ - 5$1 - /^4(\.\d+\.\d+ TLS is required, but was not offered by host .+)/ - 5$1 - # Do not change the following into hard bounces. They may - # result from a local configuration problem. - # 4.\d+.\d+ TLS is required, but our TLS engine is unavailable - # 4.\d+.\d+ TLS is required, but unavailable - # 4.\d+.\d+ Cannot start TLS: handshake failure --
Notes:
- -This feature will NOT override the soft_bounce safety net.
- -This feature will change the enhanced status code and text -that is logged to the maillog file, and that is reported to the -sender.
- -This feature is available in Postfix 2.12 and later.
- -Optional filter to replace the delivery status code or explanatory +text of successful or unsuccessful deliveries. This does, however, +not allow the replacement of a successful status code (2.X.X) with +an unsuccessful status code (4.X.X or 5.X.X) or vice versa.
+ +Specify zero or more "type:table" lookup table names, separated +by comma or whitespace. With each bounce or defer request, the +tables are queried in the specified order with one line of text +that is structured as follows:
+ ++enhanced-status-code SPACE explanatory-text ++ +
The first table match wins. The lookup result must have the +same structure as the query, a successful status code (2.X.X) must +be replaced with a successful status code, an unsuccessful status +code (4.X.X or 5.X.X) must be replaced with an unsuccessful status +code, and the explanatory text field must be non-empty. Other results +will result in a warning.
+ +Example 1: convert specific soft TLS errors into hard errors, +by overriding the first number in the enhanced status code.
+ +++ ++/etc/postfix/main.cf: + smtp_delivery_status_filter = pcre:/etc/postfix/smtp_dsn_filter ++
++ ++/etc/postfix/smtp_dsn_filter: + /^4(\.\d+\.\d+ TLS is required, but host \S+ refused to start TLS: .+)/ + 5$1 + /^4(\.\d+\.\d+ TLS is required, but was not offered by host .+)/ + 5$1 + # Do not change the following into hard bounces. They may + # result from a local configuration problem. + # 4.\d+.\d+ TLS is required, but our TLS engine is unavailable + # 4.\d+.\d+ TLS is required, but unavailable + # 4.\d+.\d+ Cannot start TLS: handshake failure ++
Example 2: censor the per-recipient delivery status text so +that it does not not reveal the destination command or filename +when a remote sender requests confirmation of successful delivery. +
+ +++ ++/etc/postfix/main.cf: + local_delivery_status_filter = pcre:/etc/postfix/local_dsn_filter ++
++ ++/etc/postfix/local_dsn_filter: + /^(2\S+ delivered to file).+/ $1 + /^(2\S+ delivered to command).+/ $1 ++
Notes:
+ +This feature will NOT override the soft_bounce safety net.
+ +This feature will change the enhanced status code and text +that is logged to the maillog file, and that is reported to the +sender in delivery confirmation or non-delivery notifications. +
+ +This feature is available in Postfix 2.12 and later.
+ +This feature is available in Postfix 2.5 and later.
- - -The LMTP-specific version of the smtp_bounce_defer_filter -configuration parameter. See there for details.
- -This feature is available in Postfix 2.12 and later.
- -This feature is available in Postfix 2.3 and later.
+ + +The LMTP-specific version of the smtp_delivery_status_filter +configuration parameter. See there for details.
+ +This feature is available in Postfix 2.12 and later.
+ +Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the local(8) delivery agent. See -default_bounce_defer_filter for details.
- -This feature is available in Postfix 2.12 and later.
- -Optional filter for the local(8) delivery agent to change the +status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details.
+ +This feature is available in Postfix 2.12 and later.
+ +Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the pipe(8) delivery agent. See -default_bounce_defer_filter for details.
+Optional filter for the pipe(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details.
This feature is available in Postfix 2.12 and later.
@@ -9588,22 +9607,6 @@ that change the delivery time or destination are not available.This feature is available in Postfix 2.5 and later.
-Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the smtp(8) delivery agent. See -default_bounce_defer_filter for details.
- -NOTE: This feature modifies error messages that are generated -by the Postfix SMTP client, and that may or may not be derived from -remote SMTP server responses. In contrast, the smtp_reply_filter -feature modifies remote SMTP server responses that may result in -email non-delivery or delivery.
- -Optional filter for the smtp(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details.
+ +NOTE: This feature modifies Postfix SMTP client error or non-error +messages that may or may not be derived from remote SMTP server +responses. In contrast, the smtp_reply_filter feature modifies +remote SMTP server responses only.
+ +Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the virtual(8) delivery agent. See -default_bounce_defer_filter for details.
+Optional filter for the virtual(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details.
This feature is available in Postfix 2.12 and later.
diff --git a/postfix/html/smtp.8.html b/postfix/html/smtp.8.html index bbbcc1a26..6a85843d1 100644 --- a/postfix/html/smtp.8.html +++ b/postfix/html/smtp.8.html @@ -292,9 +292,10 @@ SMTP(8) SMTP(8) Available in Postfix version 2.12 and later: - smtp_bounce_defer_filter ($default_bounce_defer_filter) - Optional filter to change arbitrary hard delivery errors into - soft errors and vice versa in the smtp(8) delivery agent. + smtp_delivery_status_filter ($default_delivery_status_filter) + Optional filter for the smtp(8) delivery agent to change the + delivery status code or explanatory text of successful or unsuc- + cessful deliveries. MIME PROCESSING CONTROLS Available in Postfix version 2.0 and later: @@ -312,7 +313,7 @@ SMTP(8) SMTP(8) Available in Postfix version 2.1 and later: smtp_send_xforward_command (no) - Send the non-standard XFORWARD command when the Postfix SMTP + Send the non-standard XFORWARD command when the Postfix SMTP server EHLO response announces XFORWARD support. SASL AUTHENTICATION CONTROLS @@ -320,62 +321,62 @@ SMTP(8) SMTP(8) Enable SASL authentication in the Postfix SMTP client. smtp_sasl_password_maps (empty) - Optional Postfix SMTP client lookup tables with one user- - name:password entry per remote hostname or domain, or sender + Optional Postfix SMTP client lookup tables with one user- + name:password entry per remote hostname or domain, or sender address when sender-dependent authentication is enabled. smtp_sasl_security_options (noplaintext, noanonymous) Postfix SMTP client SASL security options; as of Postfix 2.3 the - list of available features depends on the SASL client implemen- + list of available features depends on the SASL client implemen- tation that is selected with smtp_sasl_type. Available in Postfix version 2.2 and later: smtp_sasl_mechanism_filter (empty) - If non-empty, a Postfix SMTP client filter for the remote SMTP + If non-empty, a Postfix SMTP client filter for the remote SMTP server's list of offered SASL mechanisms. Available in Postfix version 2.3 and later: smtp_sender_dependent_authentication (no) Enable sender-dependent authentication in the Postfix SMTP - client; this is available only with SASL authentication, and - disables SMTP connection caching to ensure that mail from dif- + client; this is available only with SASL authentication, and + disables SMTP connection caching to ensure that mail from dif- ferent senders will use the appropriate credentials. smtp_sasl_path (empty) Implementation-specific information that the Postfix SMTP client - passes through to the SASL plug-in implementation that is + passes through to the SASL plug-in implementation that is selected with smtp_sasl_type. smtp_sasl_type (cyrus) - The SASL plug-in type that the Postfix SMTP client should use + The SASL plug-in type that the Postfix SMTP client should use for authentication. Available in Postfix version 2.5 and later: smtp_sasl_auth_cache_name (empty) - An optional table to prevent repeated SASL authentication fail- - ures with the same remote SMTP server hostname, username and + An optional table to prevent repeated SASL authentication fail- + ures with the same remote SMTP server hostname, username and password. smtp_sasl_auth_cache_time (90d) - The maximal age of an smtp_sasl_auth_cache_name entry before it + The maximal age of an smtp_sasl_auth_cache_name entry before it is removed. smtp_sasl_auth_soft_bounce (yes) - When a remote SMTP server rejects a SASL authentication request - with a 535 reply code, defer mail delivery instead of returning + When a remote SMTP server rejects a SASL authentication request + with a 535 reply code, defer mail delivery instead of returning mail as undeliverable. Available in Postfix version 2.9 and later: smtp_send_dummy_mail_auth (no) - Whether or not to append the "AUTH=<>" option to the MAIL FROM + Whether or not to append the "AUTH=<>" option to the MAIL FROM command in SASL-authenticated SMTP sessions. STARTTLS SUPPORT CONTROLS - Detailed information about STARTTLS configuration may be found in the + Detailed information about STARTTLS configuration may be found in the TLS_README document. smtp_tls_security_level (empty) @@ -385,20 +386,20 @@ SMTP(8) SMTP(8) smtp_tls_enforce_peername. smtp_sasl_tls_security_options ($smtp_sasl_security_options) - The SASL authentication security options that the Postfix SMTP + The SASL authentication security options that the Postfix SMTP client uses for TLS encrypted SMTP sessions. smtp_starttls_timeout (300s) - Time limit for Postfix SMTP client write and read operations + Time limit for Postfix SMTP client write and read operations during TLS startup and shutdown handshake procedures. smtp_tls_CAfile (empty) - A file containing CA certificates of root CAs trusted to sign - either remote SMTP server certificates or intermediate CA cer- + A file containing CA certificates of root CAs trusted to sign + either remote SMTP server certificates or intermediate CA cer- tificates. smtp_tls_CApath (empty) - Directory with PEM format certificate authority certificates + Directory with PEM format certificate authority certificates that the Postfix SMTP client uses to verify a remote SMTP server certificate. @@ -406,7 +407,7 @@ SMTP(8) SMTP(8) File with the Postfix SMTP client RSA certificate in PEM format. smtp_tls_mandatory_ciphers (medium) - The minimum TLS cipher grade that the Postfix SMTP client will + The minimum TLS cipher grade that the Postfix SMTP client will use with mandatory TLS encryption. smtp_tls_exclude_ciphers (empty) @@ -414,8 +415,8 @@ SMTP(8) SMTP(8) client cipher list at all TLS security levels. smtp_tls_mandatory_exclude_ciphers (empty) - Additional list of ciphers or cipher types to exclude from the - Postfix SMTP client cipher list at mandatory TLS security lev- + Additional list of ciphers or cipher types to exclude from the + Postfix SMTP client cipher list at mandatory TLS security lev- els. smtp_tls_dcert_file (empty) @@ -431,7 +432,7 @@ SMTP(8) SMTP(8) Enable additional Postfix SMTP client logging of TLS activity. smtp_tls_note_starttls_offer (no) - Log the hostname of a remote SMTP server that offers STARTTLS, + Log the hostname of a remote SMTP server that offers STARTTLS, when TLS is not already enabled for that server. smtp_tls_policy_maps (empty) @@ -440,14 +441,14 @@ SMTP(8) SMTP(8) fied, this overrides the obsolete smtp_tls_per_site parameter. smtp_tls_mandatory_protocols (!SSLv2) - List of SSL/TLS protocols that the Postfix SMTP client will use + List of SSL/TLS protocols that the Postfix SMTP client will use with mandatory TLS encryption. smtp_tls_scert_verifydepth (9) The verification depth for remote SMTP server certificates. smtp_tls_secure_cert_match (nexthop, dot-nexthop) - How the Postfix SMTP client verifies the server certificate + How the Postfix SMTP client verifies the server certificate peername for the "secure" TLS security level. smtp_tls_session_cache_database (empty) @@ -455,16 +456,16 @@ SMTP(8) SMTP(8) session cache. smtp_tls_session_cache_timeout (3600s) - The expiration time of Postfix SMTP client TLS session cache + The expiration time of Postfix SMTP client TLS session cache information. smtp_tls_verify_cert_match (hostname) - How the Postfix SMTP client verifies the server certificate + How the Postfix SMTP client verifies the server certificate peername for the "verify" TLS security level. tls_daemon_random_bytes (32) - The number of pseudo-random bytes that an smtp(8) or smtpd(8) - process requests from the tlsmgr(8) server in order to seed its + The number of pseudo-random bytes that an smtp(8) or smtpd(8) + process requests from the tlsmgr(8) server in order to seed its internal pseudo random number generator (PRNG). tls_high_cipherlist (ALL:!EXPORT:!LOW:!MEDIUM:+RC4:@STRENGTH) @@ -480,52 +481,52 @@ SMTP(8) SMTP(8) The OpenSSL cipherlist for "EXPORT" or higher grade ciphers. tls_null_cipherlist (eNULL:!aNULL) - The OpenSSL cipherlist for "NULL" grade ciphers that provide + The OpenSSL cipherlist for "NULL" grade ciphers that provide authentication without encryption. Available in Postfix version 2.4 and later: smtp_sasl_tls_verified_security_options ($smtp_sasl_tls_secu- rity_options) - The SASL authentication security options that the Postfix SMTP - client uses for TLS encrypted SMTP sessions with a verified + The SASL authentication security options that the Postfix SMTP + client uses for TLS encrypted SMTP sessions with a verified server certificate. Available in Postfix version 2.5 and later: smtp_tls_fingerprint_cert_match (empty) - List of acceptable remote SMTP server certificate fingerprints - for the "fingerprint" TLS security level (smtp_tls_secu- + List of acceptable remote SMTP server certificate fingerprints + for the "fingerprint" TLS security level (smtp_tls_secu- rity_level = fingerprint). smtp_tls_fingerprint_digest (md5) - The message digest algorithm used to construct remote SMTP + The message digest algorithm used to construct remote SMTP server certificate fingerprints. Available in Postfix version 2.6 and later: smtp_tls_protocols (!SSLv2) - List of TLS protocols that the Postfix SMTP client will exclude + List of TLS protocols that the Postfix SMTP client will exclude or include with opportunistic TLS encryption. smtp_tls_ciphers (export) - The minimum TLS cipher grade that the Postfix SMTP client will + The minimum TLS cipher grade that the Postfix SMTP client will use with opportunistic TLS encryption. smtp_tls_eccert_file (empty) - File with the Postfix SMTP client ECDSA certificate in PEM for- + File with the Postfix SMTP client ECDSA certificate in PEM for- mat. smtp_tls_eckey_file ($smtp_tls_eccert_file) - File with the Postfix SMTP client ECDSA private key in PEM for- + File with the Postfix SMTP client ECDSA private key in PEM for- mat. Available in Postfix version 2.7 and later: smtp_tls_block_early_mail_reply (no) - Try to detect a mail hijacking attack based on a TLS protocol - vulnerability (CVE-2009-3555), where an attacker prepends mali- - cious HELO, MAIL, RCPT, DATA commands to a Postfix SMTP client + Try to detect a mail hijacking attack based on a TLS protocol + vulnerability (CVE-2009-3555), where an attacker prepends mali- + cious HELO, MAIL, RCPT, DATA commands to a Postfix SMTP client TLS session. Available in Postfix version 2.8 and later: @@ -536,11 +537,11 @@ SMTP(8) SMTP(8) Available in Postfix version 2.11 and later: smtp_tls_trust_anchor_file (empty) - Zero or more PEM-format files with trust-anchor certificates + Zero or more PEM-format files with trust-anchor certificates and/or public keys. smtp_tls_force_insecure_host_tlsa_lookup (no) - Lookup the associated DANE TLSA RRset even when a hostname is + Lookup the associated DANE TLSA RRset even when a hostname is not an alias and its address records lie in an unsigned zone. tls_dane_trust_anchor_digest_enable (yes) @@ -550,49 +551,49 @@ SMTP(8) SMTP(8) The name of the tlsmgr(8) service entry in master.cf. OBSOLETE STARTTLS CONTROLS - The following configuration parameters exist for compatibility with - Postfix versions before 2.3. Support for these will be removed in a + The following configuration parameters exist for compatibility with + Postfix versions before 2.3. Support for these will be removed in a future release. smtp_use_tls (no) - Opportunistic mode: use TLS when a remote SMTP server announces + Opportunistic mode: use TLS when a remote SMTP server announces STARTTLS support, otherwise send the mail in the clear. smtp_enforce_tls (no) - Enforcement mode: require that remote SMTP servers use TLS + Enforcement mode: require that remote SMTP servers use TLS encryption, and never send mail in the clear. smtp_tls_enforce_peername (yes) - With mandatory TLS encryption, require that the remote SMTP - server hostname matches the information in the remote SMTP + With mandatory TLS encryption, require that the remote SMTP + server hostname matches the information in the remote SMTP server certificate. smtp_tls_per_site (empty) - Optional lookup tables with the Postfix SMTP client TLS usage - policy by next-hop destination and by remote SMTP server host- + Optional lookup tables with the Postfix SMTP client TLS usage + policy by next-hop destination and by remote SMTP server host- name. smtp_tls_cipherlist (empty) - Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS + Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS cipher list. RESOURCE AND RATE CONTROLS smtp_destination_concurrency_limit ($default_destination_concur- rency_limit) - The maximal number of parallel deliveries to the same destina- + The maximal number of parallel deliveries to the same destina- tion via the smtp message delivery transport. smtp_destination_recipient_limit ($default_destination_recipient_limit) - The maximal number of recipients per message for the smtp mes- + The maximal number of recipients per message for the smtp mes- sage delivery transport. smtp_connect_timeout (30s) - The Postfix SMTP client time limit for completing a TCP connec- + The Postfix SMTP client time limit for completing a TCP connec- tion, or zero (use the operating system built-in time limit). smtp_helo_timeout (300s) - The Postfix SMTP client time limit for sending the HELO or EHLO - command, and for receiving the initial remote SMTP server + The Postfix SMTP client time limit for sending the HELO or EHLO + command, and for receiving the initial remote SMTP server response. lmtp_lhlo_timeout (300s) @@ -604,19 +605,19 @@ SMTP(8) SMTP(8) mand, and for receiving the remote SMTP server response. smtp_mail_timeout (300s) - The Postfix SMTP client time limit for sending the MAIL FROM + The Postfix SMTP client time limit for sending the MAIL FROM command, and for receiving the remote SMTP server response. smtp_rcpt_timeout (300s) - The Postfix SMTP client time limit for sending the SMTP RCPT TO + The Postfix SMTP client time limit for sending the SMTP RCPT TO command, and for receiving the remote SMTP server response. smtp_data_init_timeout (120s) - The Postfix SMTP client time limit for sending the SMTP DATA + The Postfix SMTP client time limit for sending the SMTP DATA command, and for receiving the remote SMTP server response. smtp_data_xfer_timeout (180s) - The Postfix SMTP client time limit for sending the SMTP message + The Postfix SMTP client time limit for sending the SMTP message content. smtp_data_done_timeout (600s) @@ -630,13 +631,13 @@ SMTP(8) SMTP(8) Available in Postfix version 2.1 and later: smtp_mx_address_limit (5) - The maximal number of MX (mail exchanger) IP addresses that can - result from Postfix SMTP client mail exchanger lookups, or zero + The maximal number of MX (mail exchanger) IP addresses that can + result from Postfix SMTP client mail exchanger lookups, or zero (no limit). smtp_mx_session_limit (2) - The maximal number of SMTP sessions per delivery request before - the Postfix SMTP client gives up or delivers to a fall-back + The maximal number of SMTP sessions per delivery request before + the Postfix SMTP client gives up or delivers to a fall-back relay host, or zero (no limit). smtp_rset_timeout (20s) @@ -646,17 +647,17 @@ SMTP(8) SMTP(8) Available in Postfix version 2.2 and earlier: lmtp_cache_connection (yes) - Keep Postfix LMTP client connections open for up to $max_idle + Keep Postfix LMTP client connections open for up to $max_idle seconds. Available in Postfix version 2.2 and later: smtp_connection_cache_destinations (empty) - Permanently enable SMTP connection caching for the specified + Permanently enable SMTP connection caching for the specified destinations. smtp_connection_cache_on_demand (yes) - Temporarily enable SMTP connection caching while a destination + Temporarily enable SMTP connection caching while a destination has a high volume of mail in the active queue. smtp_connection_reuse_time_limit (300s) @@ -670,37 +671,37 @@ SMTP(8) SMTP(8) Available in Postfix version 2.3 and later: connection_cache_protocol_timeout (5s) - Time limit for connection cache connect, send or receive opera- + Time limit for connection cache connect, send or receive opera- tions. Available in Postfix version 2.9 and later: smtp_per_record_deadline (no) - Change the behavior of the smtp_*_timeout time limits, from a - time limit per read or write system call, to a time limit to - send or receive a complete record (an SMTP command line, SMTP - response line, SMTP message content line, or TLS protocol mes- + Change the behavior of the smtp_*_timeout time limits, from a + time limit per read or write system call, to a time limit to + send or receive a complete record (an SMTP command line, SMTP + response line, SMTP message content line, or TLS protocol mes- sage). Available in Postfix version 2.11 and later: smtp_connection_reuse_count_limit (0) - When SMTP connection caching is enabled, the number of times - that an SMTP session may be reused before it is closed, or zero + When SMTP connection caching is enabled, the number of times + that an SMTP session may be reused before it is closed, or zero (no limit). TROUBLE SHOOTING CONTROLS debug_peer_level (2) - The increment in verbose logging level when a remote client or + The increment in verbose logging level when a remote client or server matches a pattern in the debug_peer_list parameter. debug_peer_list (empty) - Optional list of remote client or server hostname or network + Optional list of remote client or server hostname or network address patterns that cause the verbose logging level to increase by the amount specified in $debug_peer_level. error_notice_recipient (postmaster) - The recipient of postmaster notifications about mail delivery + The recipient of postmaster notifications about mail delivery problems that are caused by policy, resource, software or proto- col errors. @@ -714,46 +715,46 @@ SMTP(8) SMTP(8) MISCELLANEOUS CONTROLS best_mx_transport (empty) - Where the Postfix SMTP client should deliver mail when it + Where the Postfix SMTP client should deliver mail when it detects a "mail loops back to myself" error condition. config_directory (see 'postconf -d' output) - The default location of the Postfix main.cf and master.cf con- + The default location of the Postfix main.cf and master.cf con- figuration files. daemon_timeout (18000s) - How much time a Postfix daemon process may take to handle a + How much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. delay_logging_resolution_limit (2) - The maximal number of digits after the decimal point when log- + The maximal number of digits after the decimal point when log- ging sub-second delay values. disable_dns_lookups (no) Disable DNS lookups in the Postfix SMTP and LMTP clients. inet_interfaces (all) - The network interface addresses that this mail system receives + The network interface addresses that this mail system receives mail on. inet_protocols (all) - The Internet protocols Postfix will attempt to use when making + The Internet protocols Postfix will attempt to use when making or accepting connections. ipc_timeout (3600s) - The time limit for sending or receiving information over an + The time limit for sending or receiving information over an internal communication channel. lmtp_assume_final (no) - When a remote LMTP server announces no DSN support, assume that - the server performs final delivery, and send "delivered" deliv- + When a remote LMTP server announces no DSN support, assume that + the server performs final delivery, and send "delivered" deliv- ery status notifications instead of "relayed". lmtp_tcp_port (24) The default TCP port that the Postfix LMTP client connects to. max_idle (100s) - The maximum amount of time that an idle Postfix daemon process + The maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily. max_use (100) @@ -767,20 +768,20 @@ SMTP(8) SMTP(8) The process name of a Postfix command or daemon process. proxy_interfaces (empty) - The network interface addresses that this mail system receives + The network interface addresses that this mail system receives mail on by way of a proxy or network address translation unit. smtp_address_preference (any) The address type ("ipv6", "ipv4" or "any") that the Postfix SMTP - client will try first, when a destination has IPv6 and IPv4 + client will try first, when a destination has IPv6 and IPv4 addresses with equal MX preference. smtp_bind_address (empty) - An optional numerical network address that the Postfix SMTP + An optional numerical network address that the Postfix SMTP client should bind to when making an IPv4 connection. smtp_bind_address6 (empty) - An optional numerical network address that the Postfix SMTP + An optional numerical network address that the Postfix SMTP client should bind to when making an IPv6 connection. smtp_helo_name ($myhostname) @@ -800,8 +801,8 @@ SMTP(8) SMTP(8) The syslog facility of Postfix logging. syslog_name (see 'postconf -d' output) - The mail system name that is prepended to the process name in - syslog records, so that "smtpd" becomes, for example, "post- + The mail system name that is prepended to the process name in + syslog records, so that "smtpd" becomes, for example, "post- fix/smtpd". Available with Postfix 2.2 and earlier: diff --git a/postfix/html/virtual.8.html b/postfix/html/virtual.8.html index fd1c83ed4..4b0635432 100644 --- a/postfix/html/virtual.8.html +++ b/postfix/html/virtual.8.html @@ -263,9 +263,10 @@ VIRTUAL(8) VIRTUAL(8) Available in Postfix version 2.12 and later: - virtual_bounce_defer_filter ($default_bounce_defer_filter) - Optional filter to change arbitrary hard delivery errors into - soft errors and vice versa in the virtual(8) delivery agent. + virtual_delivery_status_filter ($default_delivery_status_filter) + Optional filter for the virtual(8) delivery agent to change the + delivery status code or explanatory text of successful or unsuc- + cessful deliveries. SEE ALSO qmgr(8), queue manager @@ -282,15 +283,15 @@ VIRTUAL(8) VIRTUAL(8) The Secure Mailer license must be distributed with this software. HISTORY - This delivery agent was originally based on the Postfix local delivery - agent. Modifications mainly consisted of removing code that either was + This delivery agent was originally based on the Postfix local delivery + agent. Modifications mainly consisted of removing code that either was not applicable or that was not safe in this context: aliases, ~user/.forward files, delivery to "|command" or to /file/name. - The Delivered-To: message header appears in the qmail system by Daniel + The Delivered-To: message header appears in the qmail system by Daniel Bernstein. - The maildir structure appears in the qmail system by Daniel Bernstein. + The maildir structure appears in the qmail system by Daniel Bernstein. AUTHOR(S) Wietse Venema diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5 index 6a989d565..43dfa2d9b 100644 --- a/postfix/man/man5/postconf.5 +++ b/postfix/man/man5/postconf.5 @@ -1021,71 +1021,6 @@ debugger_command = .fi .ad .ft R -.SH default_bounce_defer_filter (default: empty) -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa. This is implemented by rewriting the -three-number enhanced status code and the explanatory text in a -Postfix delivery agent bounce/defer message. -.PP -Specify zero or more "type:table" lookup table names, separated -by comma or whitespace. With each bounce or defer request, the -tables are queried in the specified order with one line of text -that is structured as follows: -.sp -.in +4 -enhanced-status-code SPACE explanatory-text -.in -4 -.PP -The first table match wins. The lookup result must have the -same structure as the query: enhanced status codes must have a -first numerical field of 4 (defer) or 5 (bounce), and the explanatory -text field must be non-empty. Other results will result in a warning. -.PP -Example: -.PP -The following example turns specific soft TLS errors into hard -errors, by overriding the first number in the enhanced status code. -.sp -.in +4 -.nf -.na -.ft C -/etc/postfix/main.cf: - smtp_bounce_defer_filter = pcre:/etc/postfix/smtp_ndr_filter -.fi -.ad -.ft R -.in -4 -.sp -.in +4 -.nf -.na -.ft C -/etc/postfix/smtp_ndr_filter: - /^4(\e.\ed+\e.\ed+ TLS is required, but host \eS+ refused to start TLS: .+)/ - 5$1 - /^4(\e.\ed+\e.\ed+ TLS is required, but was not offered by host .+)/ - 5$1 - # Do not change the following into hard bounces. They may - # result from a local configuration problem. - # 4.\ed+.\ed+ TLS is required, but our TLS engine is unavailable - # 4.\ed+.\ed+ TLS is required, but unavailable - # 4.\ed+.\ed+ Cannot start TLS: handshake failure -.fi -.ad -.ft R -.in -4 -.PP -Notes: -.IP \(bu -This feature will NOT override the soft_bounce safety net. -.IP \(bu -This feature will change the enhanced status code and text -that is logged to the maillog file, and that is reported to the -sender. -.br -.PP -This feature is available in Postfix 2.12 and later. .SH default_database_type (default: see "postconf -d" output) The default database type for use in \fBnewaliases\fR(1), \fBpostalias\fR(1) and \fBpostmap\fR(1) commands. On many UNIX systems the default type is @@ -1173,6 +1108,98 @@ another preemption can take place later. Use \fItransport\fR_delivery_slot_loan to specify a transport-specific override, where \fItransport\fR is the master.cf name of the message delivery transport. +.SH default_delivery_status_filter (default: empty) +Optional filter to replace the delivery status code or explanatory +text of successful or unsuccessful deliveries. This does, however, +not allow the replacement of a successful status code (2.X.X) with +an unsuccessful status code (4.X.X or 5.X.X) or vice versa. +.PP +Specify zero or more "type:table" lookup table names, separated +by comma or whitespace. With each bounce or defer request, the +tables are queried in the specified order with one line of text +that is structured as follows: +.sp +.in +4 +enhanced-status-code SPACE explanatory-text +.in -4 +.PP +The first table match wins. The lookup result must have the +same structure as the query, a successful status code (2.X.X) must +be replaced with a successful status code, an unsuccessful status +code (4.X.X or 5.X.X) must be replaced with an unsuccessful status +code, and the explanatory text field must be non-empty. Other results +will result in a warning. +.PP +Example 1: convert specific soft TLS errors into hard errors, +by overriding the first number in the enhanced status code. +.sp +.in +4 +.nf +.na +.ft C +/etc/postfix/main.cf: + smtp_delivery_status_filter = pcre:/etc/postfix/smtp_dsn_filter +.fi +.ad +.ft R +.in -4 +.sp +.in +4 +.nf +.na +.ft C +/etc/postfix/smtp_dsn_filter: + /^4(\e.\ed+\e.\ed+ TLS is required, but host \eS+ refused to start TLS: .+)/ + 5$1 + /^4(\e.\ed+\e.\ed+ TLS is required, but was not offered by host .+)/ + 5$1 + # Do not change the following into hard bounces. They may + # result from a local configuration problem. + # 4.\ed+.\ed+ TLS is required, but our TLS engine is unavailable + # 4.\ed+.\ed+ TLS is required, but unavailable + # 4.\ed+.\ed+ Cannot start TLS: handshake failure +.fi +.ad +.ft R +.in -4 +.PP +Example 2: censor the per-recipient delivery status text so +that it does not not reveal the destination command or filename +when a remote sender requests confirmation of successful delivery. +.sp +.in +4 +.nf +.na +.ft C +/etc/postfix/main.cf: + local_delivery_status_filter = pcre:/etc/postfix/local_dsn_filter +.fi +.ad +.ft R +.in -4 +.sp +.in +4 +.nf +.na +.ft C +/etc/postfix/local_dsn_filter: + /^(2\eS+ delivered to file).+/ $1 + /^(2\eS+ delivered to command).+/ $1 +.fi +.ad +.ft R +.in -4 +.PP +Notes: +.IP \(bu +This feature will NOT override the soft_bounce safety net. +.IP \(bu +This feature will change the enhanced status code and text +that is logged to the maillog file, and that is reported to the +sender in delivery confirmation or non-delivery notifications. +.br +.PP +This feature is available in Postfix 2.12 and later. .SH default_destination_concurrency_failed_cohort_limit (default: 1) How many pseudo-cohorts must suffer connection or handshake failure before a specific destination is considered unavailable @@ -2340,11 +2367,6 @@ The LMTP-specific version of the smtp_body_checks configuration parameter. See there for details. .PP This feature is available in Postfix 2.5 and later. -.SH lmtp_bounce_defer_filter (default: empty) -The LMTP-specific version of the smtp_bounce_defer_filter -configuration parameter. See there for details. -.PP -This feature is available in Postfix 2.12 and later. .SH lmtp_cache_connection (default: yes) Keep Postfix LMTP client connections open for up to $max_idle seconds. When the LMTP client receives a request for the same @@ -2454,6 +2476,11 @@ The LMTP-specific version of the smtp_defer_if_no_mx_address_found configuration parameter. See there for details. .PP This feature is available in Postfix 2.3 and later. +.SH lmtp_delivery_status_filter (default: empty) +The LMTP-specific version of the smtp_delivery_status_filter +configuration parameter. See there for details. +.PP +This feature is available in Postfix 2.12 and later. .SH lmtp_destination_concurrency_limit (default: $default_destination_concurrency_limit) The maximal number of parallel deliveries to the same destination via the lmtp message delivery transport. This limit is enforced by @@ -2929,12 +2956,6 @@ Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks). The default time unit is s (seconds). .PP This feature is available in Postfix 2.1 and later. -.SH local_bounce_defer_filter (default: $default_bounce_defer_filter) -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the \fBlocal\fR(8) delivery agent. See -default_bounce_defer_filter for details. -.PP -This feature is available in Postfix 2.12 and later. .SH local_command_shell (default: empty) Optional shell program for \fBlocal\fR(8) delivery to non-Postfix command. By default, non-Postfix commands are executed directly; commands @@ -2959,6 +2980,12 @@ local_command_shell = /bin/bash -c .fi .ad .ft R +.SH local_delivery_status_filter (default: $default_delivery_status_filter) +Optional filter for the \fBlocal\fR(8) delivery agent to change the +status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details. +.PP +This feature is available in Postfix 2.12 and later. .SH local_destination_concurrency_limit (default: 2) The maximal number of parallel deliveries via the local mail delivery transport to the same recipient (when @@ -4173,10 +4200,10 @@ The name of the \fBpickup\fR(8) service. This service picks up local mail submissions from the Postfix maildrop queue. .PP This feature is available in Postfix 2.0 and later. -.SH pipe_bounce_defer_filter (default: $default_bounce_defer_filter) -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the \fBpipe\fR(8) delivery agent. See -default_bounce_defer_filter for details. +.SH pipe_delivery_status_filter (default: $default_delivery_status_filter) +Optional filter for the \fBpipe\fR(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details. .PP This feature is available in Postfix 2.12 and later. .SH plaintext_reject_code (default: 450) @@ -5852,16 +5879,6 @@ These tables are searched while mail is being delivered. Actions that change the delivery time or destination are not available. .PP This feature is available in Postfix 2.5 and later. -.SH smtp_bounce_defer_filter (default: $default_bounce_defer_filter) -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the \fBsmtp\fR(8) delivery agent. See -default_bounce_defer_filter for details. -.PP -NOTE: This feature modifies error messages that are generated -by the Postfix SMTP client, and that may or may not be derived from -remote SMTP server responses. In contrast, the smtp_reply_filter -feature modifies remote SMTP server responses that may result in -email non-delivery or delivery. .SH smtp_cname_overrides_servername (default: version dependent) When the remote SMTP servername is a DNS CNAME, replace the servername with the result from CNAME expansion for the purpose of @@ -6027,6 +6044,15 @@ or worse preference than the local MTA itself. .PP This feature is available in Postfix 2.1 and later. +.SH smtp_delivery_status_filter (default: $default_delivery_status_filter) +Optional filter for the \fBsmtp\fR(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details. +.PP +NOTE: This feature modifies Postfix SMTP client error or non-error +messages that may or may not be derived from remote SMTP server +responses. In contrast, the smtp_reply_filter feature modifies +remote SMTP server responses only. .SH smtp_destination_concurrency_limit (default: $default_destination_concurrency_limit) The maximal number of parallel deliveries to the same destination via the smtp message delivery transport. This limit is enforced by @@ -12338,10 +12364,10 @@ reach the sum of the expansion and recursion limits. This may change in the future. .PP This feature is available in Postfix 2.1 and later. -.SH virtual_bounce_defer_filter (default: $default_bounce_defer_filter) -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the \fBvirtual\fR(8) delivery agent. See -default_bounce_defer_filter for details. +.SH virtual_delivery_status_filter (default: $default_delivery_status_filter) +Optional filter for the \fBvirtual\fR(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details. .PP This feature is available in Postfix 2.12 and later. .SH virtual_destination_concurrency_limit (default: $default_destination_concurrency_limit) diff --git a/postfix/man/man8/local.8 b/postfix/man/man8/local.8 index b8d780b39..9feeaa01b 100644 --- a/postfix/man/man8/local.8 +++ b/postfix/man/man8/local.8 @@ -421,9 +421,10 @@ attribute, when delivering mail to a child alias that does not have its own owner alias. .PP Available in Postfix version 2.12 and later: -.IP "\fBlocal_bounce_defer_filter ($default_bounce_defer_filter)\fR" -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the \fBlocal\fR(8) delivery agent. +.IP "\fBlocal_delivery_status_filter ($default_delivery_status_filter)\fR" +Optional filter for the \fBlocal\fR(8) delivery agent to change the +status code or explanatory text of successful or unsuccessful +deliveries. .SH "DELIVERY METHOD CONTROLS" .na .nf diff --git a/postfix/man/man8/pipe.8 b/postfix/man/man8/pipe.8 index 578628e23..a3754d291 100644 --- a/postfix/man/man8/pipe.8 +++ b/postfix/man/man8/pipe.8 @@ -426,9 +426,10 @@ The mail system name that is prepended to the process name in syslog records, so that "smtpd" becomes, for example, "postfix/smtpd". .PP Available in Postfix version 2.12 and later: -.IP "\fBpipe_bounce_defer_filter ($default_bounce_defer_filter)\fR" -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the \fBpipe\fR(8) delivery agent. +.IP "\fBpipe_delivery_status_filter ($default_delivery_status_filter)\fR" +Optional filter for the \fBpipe\fR(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. .SH "SEE ALSO" .na .nf diff --git a/postfix/man/man8/smtp.8 b/postfix/man/man8/smtp.8 index 1f257b275..f723f1be9 100644 --- a/postfix/man/man8/smtp.8 +++ b/postfix/man/man8/smtp.8 @@ -276,9 +276,10 @@ Available in Postfix version 2.11 and later: Level of DNS support in the Postfix SMTP client. .PP Available in Postfix version 2.12 and later: -.IP "\fBsmtp_bounce_defer_filter ($default_bounce_defer_filter)\fR" -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the \fBsmtp\fR(8) delivery agent. +.IP "\fBsmtp_delivery_status_filter ($default_delivery_status_filter)\fR" +Optional filter for the \fBsmtp\fR(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. .SH "MIME PROCESSING CONTROLS" .na .nf diff --git a/postfix/man/man8/virtual.8 b/postfix/man/man8/virtual.8 index a61cffe66..743992c28 100644 --- a/postfix/man/man8/virtual.8 +++ b/postfix/man/man8/virtual.8 @@ -283,9 +283,10 @@ The mail system name that is prepended to the process name in syslog records, so that "smtpd" becomes, for example, "postfix/smtpd". .PP Available in Postfix version 2.12 and later: -.IP "\fBvirtual_bounce_defer_filter ($default_bounce_defer_filter)\fR" -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the \fBvirtual\fR(8) delivery agent. +.IP "\fBvirtual_delivery_status_filter ($default_delivery_status_filter)\fR" +Optional filter for the \fBvirtual\fR(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. .SH "SEE ALSO" .na .nf diff --git a/postfix/mantools/postlink b/postfix/mantools/postlink index ff86a8ffe..73e69278d 100755 --- a/postfix/mantools/postlink +++ b/postfix/mantools/postlink @@ -133,7 +133,7 @@ while (<>) { s;\bdaemon_timeout\b;$&;g; s;\bdebug_peer_level\b;$&;g; s;\bdebug_peer_list\b;$&;g; - s;\bdefault_bounce_defer_filter\b;$&;g; + s;\bdefault_delivery_status_filter\b;$&;g; s;\bdefault_data[-]*\n* *[This feature is available in Postfix 2.11 and later.
-%PARAM default_bounce_defer_filter +%PARAM default_delivery_status_filter -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa. This is implemented by rewriting the -three-number enhanced status code and the explanatory text in a -Postfix delivery agent bounce/defer message.
+Optional filter to replace the delivery status code or explanatory +text of successful or unsuccessful deliveries. This does, however, +not allow the replacement of a successful status code (2.X.X) with +an unsuccessful status code (4.X.X or 5.X.X) or vice versa.
Specify zero or more "type:table" lookup table names, separated by comma or whitespace. With each bounce or defer request, the @@ -15633,27 +15633,25 @@ enhanced-status-code SPACE explanatory-text
The first table match wins. The lookup result must have the -same structure as the query: enhanced status codes must have a -first numerical field of 4 (defer) or 5 (bounce), and the explanatory -text field must be non-empty. Other results will result in a warning. -
+same structure as the query, a successful status code (2.X.X) must +be replaced with a successful status code, an unsuccessful status +code (4.X.X or 5.X.X) must be replaced with an unsuccessful status +code, and the explanatory text field must be non-empty. Other results +will result in a warning. -Example:
- -The following example turns specific soft TLS errors into hard -errors, by overriding the first number in the enhanced status code. -
+Example 1: convert specific soft TLS errors into hard errors, +by overriding the first number in the enhanced status code.
/etc/postfix/main.cf: - smtp_bounce_defer_filter = pcre:/etc/postfix/smtp_ndr_filter + smtp_delivery_status_filter = pcre:/etc/postfix/smtp_dsn_filter
+-/etc/postfix/smtp_ndr_filter: +/etc/postfix/smtp_dsn_filter: /^4(\.\d+\.\d+ TLS is required, but host \S+ refused to start TLS: .+)/ 5$1 /^4(\.\d+\.\d+ TLS is required, but was not offered by host .+)/ @@ -15666,6 +15664,26 @@ errors, by overriding the first number in the enhanced status code.
Example 2: censor the per-recipient delivery status text so +that it does not not reveal the destination command or filename +when a remote sender requests confirmation of successful delivery. +
+ +++ ++/etc/postfix/main.cf: + local_delivery_status_filter = pcre:/etc/postfix/local_dsn_filter ++
+++/etc/postfix/local_dsn_filter: + /^(2\S+ delivered to file).+/ $1 + /^(2\S+ delivered to command).+/ $1 ++
Notes:
This feature will change the enhanced status code and text that is logged to the maillog file, and that is reported to the -sender.
+sender in delivery confirmation or non-delivery notifications. +This feature is available in Postfix 2.12 and later.
-%PARAM smtp_bounce_defer_filter $default_bounce_defer_filter +%PARAM smtp_delivery_status_filter $default_delivery_status_filter -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the smtp(8) delivery agent. See -default_bounce_defer_filter for details.
+Optional filter for the smtp(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details.
-NOTE: This feature modifies error messages that are generated -by the Postfix SMTP client, and that may or may not be derived from -remote SMTP server responses. In contrast, the smtp_reply_filter -feature modifies remote SMTP server responses that may result in -email non-delivery or delivery.
+NOTE: This feature modifies Postfix SMTP client error or non-error +messages that may or may not be derived from remote SMTP server +responses. In contrast, the smtp_reply_filter feature modifies +remote SMTP server responses only.
-%PARAM lmtp_bounce_defer_filter +%PARAM lmtp_delivery_status_filter -The LMTP-specific version of the smtp_bounce_defer_filter +
The LMTP-specific version of the smtp_delivery_status_filter configuration parameter. See there for details.
This feature is available in Postfix 2.12 and later.
-%PARAM pipe_bounce_defer_filter $default_bounce_defer_filter +%PARAM pipe_delivery_status_filter $default_delivery_status_filter -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the pipe(8) delivery agent. See -default_bounce_defer_filter for details.
+Optional filter for the pipe(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details.
This feature is available in Postfix 2.12 and later.
-%PARAM virtual_bounce_defer_filter $default_bounce_defer_filter +%PARAM virtual_delivery_status_filter $default_delivery_status_filter -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the virtual(8) delivery agent. See -default_bounce_defer_filter for details.
+Optional filter for the virtual(8) delivery agent to change the +delivery status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details.
This feature is available in Postfix 2.12 and later.
-%PARAM local_bounce_defer_filter $default_bounce_defer_filter +%PARAM local_delivery_status_filter $default_delivery_status_filter -Optional filter to change arbitrary hard delivery errors into -soft errors and vice versa in the local(8) delivery agent. See -default_bounce_defer_filter for details.
+Optional filter for the local(8) delivery agent to change the +status code or explanatory text of successful or unsuccessful +deliveries. See default_delivery_status_filter for details.
This feature is available in Postfix 2.12 and later.
diff --git a/postfix/src/global/Makefile.in b/postfix/src/global/Makefile.in index f5799eb0e..355465c1a 100644 --- a/postfix/src/global/Makefile.in +++ b/postfix/src/global/Makefile.in @@ -32,7 +32,7 @@ SRCS = abounce.c anvil_clnt.c been_here.c bounce.c bounce_log.c \ match_service.c mail_conf_nint.c addr_match_list.c mail_conf_nbool.c \ smtp_reply_footer.c safe_ultostr.c verify_sender_addr.c \ dict_memcache.c mail_version.c memcache_proto.c server_acl.c \ - mkmap_fail.c haproxy_srvr.c ndr_filter.c + mkmap_fail.c haproxy_srvr.c dsn_filter.c OBJS = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \ canon_addr.o cfg_parser.o cleanup_strerror.o cleanup_strflags.o \ clnt_stream.o conv_time.o db_common.o debug_peer.o debug_process.o \ @@ -66,7 +66,7 @@ OBJS = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \ match_service.o mail_conf_nint.o addr_match_list.o mail_conf_nbool.o \ smtp_reply_footer.o safe_ultostr.o verify_sender_addr.o \ dict_memcache.o mail_version.o memcache_proto.o server_acl.o \ - mkmap_fail.o haproxy_srvr.o ndr_filter.o + mkmap_fail.o haproxy_srvr.o dsn_filter.o HDRS = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \ canon_addr.h cfg_parser.h cleanup_user.h clnt_stream.h config.h \ conv_time.h db_common.h debug_peer.h debug_process.h defer.h \ @@ -93,7 +93,7 @@ HDRS = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \ fold_addr.h header_body_checks.h data_redirect.h match_service.h \ addr_match_list.h smtp_reply_footer.h safe_ultostr.h \ verify_sender_addr.h dict_memcache.h memcache_proto.h server_acl.h \ - haproxy_srvr.h ndr_filter.h + haproxy_srvr.h dsn_filter.h TESTSRC = rec2stream.c stream2rec.c recdump.c DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE) CFLAGS = $(DEBUG) $(OPT) $(DEFS) @@ -666,7 +666,7 @@ bounce.o: log_adhoc.h bounce.o: mail_params.h bounce.o: mail_proto.h bounce.o: msg_stats.h -bounce.o: ndr_filter.h +bounce.o: dsn_filter.h bounce.o: rcpt_print.h bounce.o: recipient_list.h bounce.o: trace.h @@ -812,7 +812,7 @@ defer.o: mail_params.h defer.o: mail_proto.h defer.o: mail_queue.h defer.o: msg_stats.h -defer.o: ndr_filter.h +defer.o: dsn_filter.h defer.o: rcpt_print.h defer.o: recipient_list.h defer.o: trace.h @@ -1806,20 +1806,20 @@ namadr_list.o: ../../include/match_list.h namadr_list.o: ../../include/sys_defs.h namadr_list.o: namadr_list.c namadr_list.o: namadr_list.h -ndr_filter.o: ../../include/argv.h -ndr_filter.o: ../../include/dict.h -ndr_filter.o: ../../include/msg.h -ndr_filter.o: ../../include/myflock.h -ndr_filter.o: ../../include/mymalloc.h -ndr_filter.o: ../../include/sys_defs.h -ndr_filter.o: ../../include/vbuf.h -ndr_filter.o: ../../include/vstream.h -ndr_filter.o: ../../include/vstring.h -ndr_filter.o: dsn.h -ndr_filter.o: dsn_util.h -ndr_filter.o: maps.h -ndr_filter.o: ndr_filter.c -ndr_filter.o: ndr_filter.h +dsn_filter.o: ../../include/argv.h +dsn_filter.o: ../../include/dict.h +dsn_filter.o: ../../include/msg.h +dsn_filter.o: ../../include/myflock.h +dsn_filter.o: ../../include/mymalloc.h +dsn_filter.o: ../../include/sys_defs.h +dsn_filter.o: ../../include/vbuf.h +dsn_filter.o: ../../include/vstream.h +dsn_filter.o: ../../include/vstring.h +dsn_filter.o: dsn.h +dsn_filter.o: dsn_util.h +dsn_filter.o: maps.h +dsn_filter.o: dsn_filter.c +dsn_filter.o: dsn_filter.h off_cvt.o: ../../include/msg.h off_cvt.o: ../../include/sys_defs.h off_cvt.o: ../../include/vbuf.h diff --git a/postfix/src/global/bounce.c b/postfix/src/global/bounce.c index 77496ef37..4e6a305f0 100644 --- a/postfix/src/global/bounce.c +++ b/postfix/src/global/bounce.c @@ -53,7 +53,7 @@ /* const char *title; /* const char *maps; /* INTERNAL API -/* NDR_FILTER *bounce_defer_filter; +/* DSN_FILTER *delivery_status_filter; /* /* int bounce_append_intern(flags, id, stats, recipient, relay, dsn) /* int flags; @@ -181,7 +181,7 @@ /* Global library. */ -#define BOUNCE_DEFER_INTERN +#define DSN_INTERN #include