From 8236a6ce4c566a317e2a7ca7e8cd5289861c3f8d Mon Sep 17 00:00:00 2001
From: Wietse Venema
By default, address verification results are not saved. To avoid +probing the same address repeatedly, you can store the result in a +persistent database as described later.
+@@ -633,6 +634,13 @@ after-filter smtpd process, so that filtered mail is logged with the real client name IP address. See smtp(8) and XFORWARD_README for more information. +/etc/postfix/main.cf: diff --git a/postfix/html/FILTER_README.html b/postfix/html/FILTER_README.html index 10c8f2c26..01d08b6d7 100644 --- a/postfix/html/FILTER_README.html +++ b/postfix/html/FILTER_README.html @@ -615,6 +615,7 @@ how one would set up the service in the Postfix master.c # ============================================================= scan unix - - n - 10 smtp -o smtp_send_xforward_command=yes + -o disable_mime_output_conversion=yes
With "-o disable_mime_output_conversion=yes", the scan +delivery agent will not convert 8BITMIME mail to quoted-printable +form while delivering to the content filter, as that would invalidate +domainkeys and other digital signatures. This workaround is needed +because some SMTP-based content filters don't announce 8BITMIME +support, even though they can handle it just fine.
+Postfix 2.3 implements all the requests of Sendmail version 8 Milter protocols up to version 4, except one: message body replacement. -See, however, the limitations section -at the end of this document.
+See, however, the workarounds and limitations sections at the end of this +document.This document provides information on the following topics:
@@ -337,7 +338,7 @@ Connect to the specified TCP port on the specified local or remote host. The host and port can be specified in numeric or symbolic form. -Note: Postfix syntax differs from Milter syntax which has the +
NOTE: Postfix syntax differs from Milter syntax which has the form inet:port@host.
@@ -611,6 +612,13 @@ TOContent filters may break domain key etc. signatures. If you +use an SMTP-based filter as described in FILTER_README, then you +should add a line to master.cf with "disable_mime_output_conversion += yes", as described in the advanced content filter +example.
+Sendmail Milter applications were originally developed for the Sendmail version 8 MTA, which has a different architecture than Postfix. The result is that some Milter applications make assumptions @@ -618,6 +626,10 @@ that aren't true in a Postfix environment.
Some Milter applications use the "{if_addr}" macro +to recognize local mail; this macro does not exist in Postfix. +Workaround: use the "{client_addr}" macro instead.
+Some Milter applications log a warning that looks like this:
@@ -635,13 +647,14 @@ X-SenderID: Sendmail Sender-ID Filter vx.y.z host.example.com <unknown-msgid& -This happens because the Milter application expects that the +
This happens because some Milter applications expect that the queue ID is known before the MTA accepts the MAIL FROM -(sender) command. Postfix, on the other hand, does not create a -queue file until after Postfix accepts the first valid RCPT -TO (recipient) command. This queue file name must be globally unique -across multiple queue directories, so it cannot be chosen until the -file is actually created.
+(sender) command. Postfix, on the other hand, does not choose a +queue file name until after it accepts the first valid RCPT +TO (recipient) command. Postfix queue file names must be unique +across multiple directories, so the name can't be chosen before the +file is created. If multiple messages were to use the same queue +ID simultaneously, mail would be lost.To work around the ugly message header from Milter applications, we add a little code to the Milter source to look up the queue ID @@ -659,21 +672,32 @@ the top shown as bold text below:
--sic = (Context) smfi_getpriv(ctx); -assert(sic != NULL); +dfc = cc->cctx_msg; +assert(dfc != NULL); -/* -** Determine the job ID for logging. -*/ -if (sic->ctx_jobid == 0 || strcmp(sic->ctx_jobid, MSGIDUNKNOWN) == 0) { +/* Determine the job ID for logging. */ +if (dfc->mctx_jobid == 0 || strcmp(dfc->mctx_jobid, JOBIDUNKNOWN) == 0) { char *jobid = smfi_getsymval(ctx, "i"); if (jobid != 0) - sic->ctx_jobid = jobid; + dfc->mctx_jobid = jobid; } + +/* get hostname; used in the X header and in new MIME boundaries */
This does not remove the WARNING message, however.
+NOTES:
+ +Different mail filters use slightly different names for +variables. If the above code does not compile, look for the code +at the start of the mlfi_eoh() routine.
+ +This fixes only the ugly message header, but not the WARNING +message. Fortunately, dk-filter logs that message only once.
+ +With some Milter applications we can fix both the WARNING and the "unknown-msgid" by postponing the call of mlfi_eoh() diff --git a/postfix/html/TLS_README.html b/postfix/html/TLS_README.html index f37fee8a0..42ed35f78 100644 --- a/postfix/html/TLS_README.html +++ b/postfix/html/TLS_README.html @@ -247,7 +247,7 @@ back to plain text after a TLS handshake failure, the server will be unable to receive email from most TLS enabled clients. To avoid accidental configurations with no certificates, Postfix 2.3 enables certificate-less operation only when the administrator explicitly sets -"smtpd_tls_cert_file = none". This ensures that new Postfix +"smtpd_tls_cert_file = none". This ensures that new Postfix configurations will not accidentally run with no certificates.
Both RSA and DSA certificates are supported. Typically you will @@ -436,8 +436,8 @@ since the headers may be changed by intermediate servers.
By default, TLS is disabled in the Postfix SMTP server, so no difference to plain Postfix is visible. Explicitly switch it on -with "smtpd_tls_security_level = may" (Postfix 2.3 and -later) or "smtpd_use_tls = yes" (obsolete but still +with "smtpd_tls_security_level = may" (Postfix 2.3 and +later) or "smtpd_use_tls = yes" (obsolete but still supported).
Example:
@@ -463,8 +463,8 @@ private key. This is intended behavior.You can ENFORCE the use of TLS, so that the Postfix SMTP server announces STARTTLS and accepts no mail without TLS encryption, by setting -"smtpd_tls_security_level = encrypt" (Postfix 2.3 and -later) or "smtpd_enforce_tls = yes" (obsolete but still +"smtpd_tls_security_level = encrypt" (Postfix 2.3 and +later) or "smtpd_enforce_tls = yes" (obsolete but still supported). According to RFC 2487 this MUST NOT be applied in case of a publicly-referenced Postfix SMTP server. This option is off by default and should only seldom be used.
@@ -490,7 +490,7 @@ and OE (5.01 Mac on all ports).It is strictly discouraged to use this mode from main.cf. If you want to support this service, enable a special port in master.cf -and specify "-o smtpd_tls_wrappermode = yes" as an smtpd(8) command +and specify "-o smtpd_tls_wrappermode = yes" as an smtpd(8) command line option. Port 465 (smtps) was once chosen for this feature.
@@ -536,9 +536,9 @@ when the server is configured to ask for client certificates.When TLS is enforced you may also decide to REQUIRE a remote SMTP client certificate for all TLS connections, -by setting "smtpd_tls_req_ccert = yes". This feature implies -"smtpd_tls_ask_ccert = yes". When TLS is not enforced, -"smtpd_tls_req_ccert = yes" is ignored and a warning is +by setting "smtpd_tls_req_ccert = yes". This feature implies +"smtpd_tls_ask_ccert = yes". When TLS is not enforced, +"smtpd_tls_req_ccert = yes" is ignored and a warning is logged.
Example:
@@ -573,16 +573,16 @@ CA issues special CA which then issues the actual certificate...)Sending AUTH data over an unencrypted channel poses a security risk. When TLS layer encryption is required -("smtpd_tls_security_level = encrypt" or the obsolete -"smtpd_enforce_tls = yes"), the Postfix SMTP server will +("smtpd_tls_security_level = encrypt" or the obsolete +"smtpd_enforce_tls = yes"), the Postfix SMTP server will announce and accept AUTH only after the TLS layer has been activated with STARTTLS. When TLS layer encryption is optional -("smtpd_tls_security_level = may" or the obsolete -"smtpd_enforce_tls = no"), it may however still be useful +("smtpd_tls_security_level = may" or the obsolete +"smtpd_enforce_tls = no"), it may however still be useful to only offer AUTH when TLS is active. To maintain compatibility with non-TLS clients, the default is to accept AUTH without encryption. In order to change this behavior, set -"smtpd_tls_auth_only = yes".
+"smtpd_tls_auth_only = yes".Example:
@@ -706,37 +706,45 @@ the user or host.The description below is for Postfix 2.3; for Postfix < 2.3 the -smtpd_tls_cipherlist parameter specifies the acceptable ciphers as an -explicit OpenSSL cipherlist.
+smtpd_tls_cipherlist parameter specifies the acceptable ciphers as an +explicit OpenSSL cipherlist. The obsolete setting applies even when TLS +encryption is not enforced. Use of this control on public MX hosts is +strongly discouraged. + +With mandatory TLS encryption, the Postfix SMTP server will by +default only use SSLv3 or TLSv1. SSLv2 is only used when TLS encryption +is optional. This is controlled by the smtpd_tls_mandatory_protocols +configuration parameter.
The Postfix SMTP server supports 5 distinct cipher security levels -as specified by the smtpd_tls_ciphers configuration parameter. The -default value is "export" which is the only one appropriate for public -MX hosts. On private MX hosts or MSAs one can further restrict the -OpenSSL cipherlist selection.
+as specified by the smtpd_tls_mandatory_ciphers configuration parameter, +which determines the cipher grade with mandatory TLS encryption. The +default value is "medium" which is essentially 128-bit encryption or better. +With opportunistic TLS encryption, the minimum accepted cipher grade is +always "export".By default anonymous ciphers are allowed, and automatically disabled when client certificates are requested. If clients are expected to always verify the server certificate you may want to exclude anonymous ciphers -by setting "smtpd_tls_exclude_ciphers = aNULL". One can't -force a client to check the server certificate, so excluding anonymous -ciphers is generally unnecessary.
+by setting "smtpd_tls_mandatory_exclude_ciphers = aNULL". +One can't force a client to check the server certificate, so excluding +anonymous ciphers is generally unnecessary.For a server that is not a public Internet MX host, Postfix 2.3 supports configurations with no server certificates that use only the anonymous ciphers. This is -enabled by explicitly setting "smtpd_tls_cert_file = none" +enabled by explicitly setting "smtpd_tls_cert_file = none" and not specifying an smtpd_tls_dcert_file.
-Example: (MSA that requires TLS with reasonably secure ciphers)
+Example: (MSA that requires TLS with high grade ciphers)
/etc/postfix/main.cf: smtpd_tls_cert_file = /etc/postfix/cert.pem smtpd_tls_key_file = /etc/postfix/key.pem - smtpd_tls_ciphers = medium - smtpd_tls_exclude_ciphers = aNULL, MD5 + smtpd_tls_mandatory_ciphers = high + smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5 # Postfix 2.3 and later smtpd_tls_security_level = encrypt # Obsolete, but still supported @@ -1186,11 +1194,11 @@ in the sections that follow.At the "none" TLS security level, TLS encryption is disabled. This is the default security level. With Postfix 2.3 and later, -it can be configured explicitly by setting "smtp_tls_security_level = none".
+it can be configured explicitly by setting "smtp_tls_security_level = none".With Postfix 2.2 and earlier, or when smtp_tls_security_level is set to its default (backwards compatible) empty value, the appropriate configuration -settings are "smtp_use_tls = no" and "smtp_enforce_tls = no". +settings are "smtp_use_tls = no" and "smtp_enforce_tls = no". With either approach, TLS is not used even if supported by the server. For LMTP, use the corresponding "lmtp_" parameters.
@@ -1211,7 +1219,7 @@ table, specify the "NONE" keyword. The SMTP transaction is encrypted if the STARTTLS ESMTP feature is supported by the server. Otherwise, messages are sent in the clear. With Postfix 2.3 and later, opportunistic TLS can be configured by -setting "smtp_tls_security_level = may". +setting "smtp_tls_security_level = may".Since sending in the clear is acceptable, demanding stronger than default TLS security merely reduces inter-operability. For @@ -1222,9 +1230,9 @@ better ciphers are used.
With Postfix 2.2 and earlier, or when smtp_tls_security_level is set to its default (backwards compatible) empty value, the appropriate -configuration settings are "smtp_use_tls = yes" and -"smtp_enforce_tls = no". -For LMTP use the corresponding "lmtp" parameters.
+configuration settings are "smtp_use_tls = yes" and +"smtp_enforce_tls = no". +For LMTP use the corresponding "lmtp_" parameters.With opportunistic TLS, mail delivery continues even if the server certificate is untrusted or bears the wrong name. Starting @@ -1280,7 +1288,7 @@ over TLS encrypted sessions. The SMTP transaction is aborted unless the STARTTLS ESMTP feature is supported by the server. If no suitable servers are found, the message will be deferred. With Postfix 2.3 and later, mandatory TLS encryption can be configured by setting -"smtp_tls_security_level = encrypt". Even though TLS +"smtp_tls_security_level = encrypt". Even though TLS encryption is always used, mail delivery continues if the server certificate is untrusted or bears the wrong name.
@@ -1294,9 +1302,9 @@ parameters includes useful interoperability and security guidelines.With Postfix 2.2 and earlier, or when smtp_tls_security_level is set to its default (backwards compatible) empty value, the -appropriate configuration settings are "smtp_enforce_tls = yes" -and "smtp_tls_enforce_peername = no". For LMTP use the corresponding -lmtp_ parameters.
+appropriate configuration settings are "smtp_enforce_tls = yes" +and "smtp_tls_enforce_peername = no". For LMTP use the corresponding +"lmtp_" parameters.Despite the potential for eliminating passive eavesdropping attacks, mandatory TLS encryption is not viable as a default security level for @@ -1407,7 +1415,7 @@ TLS encrypted sessions if the server certificate is valid (not expired or revoked, and signed by a trusted certificate authority) and if the server certificate name matches a known pattern. Mandatory server certificate verification can be configured by setting -"smtp_tls_security_level = verify". The +"smtp_tls_security_level = verify". The smtp_tls_verify_cert_match parameter can override the default "hostname" certificate name matching strategy. Fine-tuning the matching strategy is generally only appropriate for secure-channel destinations.
With Postfix 2.2 and earlier, or when smtp_tls_security_level is set to its default (backwards compatible) empty value, the -appropriate configuration settings are "smtp_enforce_tls = yes" and -"smtp_tls_enforce_peername = yes". For LMTP use the corresponding -lmtp_ parameters.
+appropriate configuration settings are "smtp_enforce_tls = yes" and +"smtp_tls_enforce_peername = yes". For LMTP use the corresponding +"lmtp_" parameters.If the server certificate chain is trusted (see smtp_tls_CAfile and smtp_tls_CApath), any DNS names in the SubjectAlternativeName @@ -1491,16 +1499,16 @@ to example.com recipients uses "high" grade ciphers.
secure-channel TLS sessions where DNS forgery resistant server certificate verification succeeds. If no suitable servers are found, the message will be deferred. With Postfix 2.3 and later, secure-channels -can be configured by setting "smtp_tls_security_level = secure". +can be configured by setting "smtp_tls_security_level = secure". The smtp_tls_secure_cert_match parameter can override the default "nexthop, dot-nexthop" certificate match strategy.With Postfix 2.2 and earlier, or when smtp_tls_security_level is set to its default (backwards compatible) empty value, the -appropriate configuration settings are "smtp_enforce_tls = yes" -and "smtp_tls_enforce_peername = yes" with additional settings to +appropriate configuration settings are "smtp_enforce_tls = yes" +and "smtp_tls_enforce_peername = yes" with additional settings to harden peer certificate verification -against forged DNS data. For LMTP, use the corresponding lmtp_ +against forged DNS data. For LMTP, use the corresponding "lmtp_" parameters.
If the server certificate chain is trusted (see smtp_tls_CAfile and @@ -1799,7 +1807,7 @@ encryption regardless of which table is used. The for the obsolete "MUST" keyword in the same way as for the "verify" level in the new policy.
-With Postfix < 2.3, the obsolete smtp_tls_cipherlist parameter +
With Postfix < 2.3, the obsolete smtp_tls_cipherlist parameter is also applied for opportunistic TLS sessions, and should be used with care, or not at all. Setting cipherlist restrictions that are incompatible with a remote SMTP server render that server unreachable, TLS handshakes @@ -1854,7 +1862,7 @@ settings.
- MAY
- Opportunistic TLS. This has less precedence than a more specific result (including "NONE") from the alternate host or next-hop lookup key, and has less precedence than the more specific global -"smtp_enforce_tls = yes" or "smtp_tls_enforce_peername = yes".
+"smtp_enforce_tls = yes" or "smtp_tls_enforce_peername = yes".- MUST_NOPEERMATCH
- Mandatory TLS encryption. This overrides a less secure "NONE" or a less specific "MAY" lookup result @@ -1880,8 +1888,8 @@ policies can be summarized as follows:
When neither the remote SMTP server hostname nor the next-hop destination are found in the smtp_tls_per_site table, the policy is based on smtp_use_tls, smtp_enforce_tls and -smtp_tls_enforce_peername. Note: "smtp_enforce_tls = yes" and -"smtp_tls_enforce_peername = yes" imply "smtp_use_tls = yes".
+smtp_tls_enforce_peername. Note: "smtp_enforce_tls = yes" and +"smtp_tls_enforce_peername = yes" imply "smtp_use_tls = yes".When both hostname and next-hop destination lookups produce a result, the more specific per-site policy (NONE, MUST, etc) @@ -1891,7 +1899,7 @@ policy (MUST, etc) overrides the less secure one (NONE).
After the per-site policy lookups are combined, the result generally overrides the global policy. The exception is the less specific "MAY" per-site policy, which is overruled by the more -specific global "smtp_enforce_tls = yes" with server certificate +specific global "smtp_enforce_tls = yes" with server certificate verification as specified with the smtp_tls_enforce_peername parameter.
@@ -1929,7 +1937,7 @@ server hostname that is used for TLS policy lookup and server certificate verification.Disallow CNAME hostname overrides. In main.cf, specify -"smtp_cname_overrides_servername = no". This prevents false hostname +"smtp_cname_overrides_servername = no". This prevents false hostname information in DNS CNAME records from changing the server hostname that Postfix uses for TLS policy lookup and server certificate verification. This feature requires Postfix 2.2.9 or later. The @@ -2025,14 +2033,14 @@ methods. See smtp_tls_policy_maps ciphers on a per-destination basis.
By default anonymous ciphers are allowed, and automatically -disabled when server certificates are verified. If you -want to disable even at the "encrypt" security level, set -"smtp_tls_mandatory_exclude_ciphers = aNULL", -to disable anonymous ciphers even with opportunistic TLS, set -"smtp_tls_exclude_ciphers = aNULL". There is generally no -need to take these measures. Anonymous ciphers save bandwidth and TLS -session cache space, if certificates are ignored, there is little point -in requesting them.
+disabled when server certificates are verified. If you want to +disable anonymous ciphers even at the "encrypt" security level, set +"smtp_tls_mandatory_exclude_ciphers = aNULL"; and to +disable anonymous ciphers even with opportunistic TLS, set +"smtp_tls_exclude_ciphers = aNULL". There is generally +no need to take these measures. Anonymous ciphers save bandwidth +and TLS session cache space, if certificates are ignored, there is +little point in requesting them.Example:
@@ -2336,14 +2344,14 @@ generation (PRNG) pool, and in order to access the TLS session cache databases. Such a protocol cannot be run across fifos.smtp_tls_per_site: the MUST_NOPEERMATCH per-site policy -cannot override the global "smtp_tls_enforce_peername = yes" setting. +cannot override the global "smtp_tls_enforce_peername = yes" setting.
smtp_tls_per_site: a combined (NONE + MAY) lookup result for (hostname and next-hop destination) produces counter-intuitive results for different main.cf settings. TLS is enabled with -"smtp_tls_enforce_peername = no", but it is disabled when both -"smtp_enforce_tls = yes" and "smtp_tls_enforce_peername = yes". +"smtp_tls_enforce_peername = no", but it is disabled when both +"smtp_enforce_tls = yes" and "smtp_tls_enforce_peername = yes".
Specify, for example, "best_mx_transport = local" to pass the mail -from the SMTP client to the local(8) delivery agent. You can specify +from the Postfix SMTP client to the local(8) delivery agent. You +can specify any message delivery "transport" or "transport:nexthop" that is defined in the master.cf file. See the transport(5) manual page for the syntax and meaning of "transport" or "transport:nexthop". @@ -2858,7 +2859,8 @@ for IPv6.
A better solution for multi-homed firewalls is to leave inet_interfaces at the default value and instead use explicit IP addresses in -the master.cf SMTP server definitions. This preserves the SMTP client's +the master.cf SMTP server definitions. This preserves the Postfix +SMTP client's loop detection, by ensuring that each side of the firewall knows that the other IP address is still the same host. Setting $inet_interfaces to a single IPv4 and/or IPV6 address is primarily useful with virtual @@ -2949,6 +2951,32 @@ block all mail to a site.
+ + +What categories of Postfix-generated mail are subject to +before-queue content inspection by non_smtpd_milters, header_checks +and body_checks. Specify zero or more of the following, separated +by whitespace or comma.
+ +NOTE: It's generally not safe to enable content inspection of +Postfix-generated email messages. The user is warned.
+ +This feature is available in Postfix 2.3 and later.
+ +-If this parameter is non-empty (the default), then the Postfix SMTP server -will reject mail for unknown local users. +If this parameter is non-empty (the default), then the Postfix SMTP +server will reject mail for unknown local users.
@@ -6813,8 +6841,8 @@ the word "ESMTP" appears in the server greeting banner (example: (default: empty)
-An optional numerical network address that the SMTP client should -bind to when making an IPv4 connection. +An optional numerical network address that the Postfix SMTP client +should bind to when making an IPv4 connection.
@@ -6844,8 +6872,8 @@ but this form is not recommended here.
(default: empty)-An optional numerical network address that the SMTP client should -bind to when making an IPv6 connection. +An optional numerical network address that the Postfix SMTP client +should bind to when making an IPv6 connection.
This feature is available in Postfix 2.2 and later.
@@ -6898,7 +6926,8 @@ zero (use the operating system built-in time limit).-When no connection can be made within the deadline, the SMTP client +When no connection can be made within the deadline, the Postfix +SMTP client tries the next address on the mail exchanger list. Specify 0 to disable the time limit (i.e. use whatever timeout is implemented by the operating system). @@ -7089,7 +7118,7 @@ The default time unit is s (seconds).
The SMTP client time limit for sending the SMTP message content. When the connection makes no progress for more than $smtp_data_xfer_timeout -seconds the SMTP client terminates the transfer. +seconds the Postfix SMTP client terminates the transfer.
@@ -7156,7 +7185,7 @@ into concurrency per recipient.
Lookup tables, indexed by the remote SMTP server address, with case insensitive lists of EHLO keywords (pipelining, starttls, auth, -etc.) that the SMTP client will ignore in the EHLO response from a +etc.) that the Postfix SMTP client will ignore in the EHLO response from a remote SMTP server. See smtp_discard_ehlo_keywords for details. The table is not indexed by hostname for consistency with smtpd_discard_ehlo_keyword_address_maps.
@@ -7170,8 +7199,8 @@ table is not indexed by hostname for consistency with (default: empty)A case insensitive list of EHLO keywords (pipelining, starttls, -auth, etc.) that the SMTP client will ignore in the EHLO response -from a remote SMTP server.
+auth, etc.) that the Postfix SMTP client will ignore in the EHLO +response from a remote SMTP server.This feature is available in Postfix 2.2 and later.
@@ -7311,7 +7340,7 @@ The default time unit is s (seconds). (default: dns)-What mechanisms when the SMTP client uses to look up a host's IP +What mechanisms when the Postfix SMTP client uses to look up a host's IP address. This parameter is ignored when DNS lookups are disabled.
@@ -7566,9 +7595,10 @@ Example:Defer mail delivery when an SMTP server does not support SASL -authentication, while smtp_sasl_password_maps contains SASL -login/password information for that server.
+If sender-dependent SASL passwords are turned off, defer mail +delivery when an SMTP server does not support SASL authentication, +while smtp_sasl_password_maps contains SASL login/password information +for that server.
This feature is available in Postfix 2.3 and later.
@@ -7728,8 +7758,8 @@ for authentication. The available types are listed with the (default: no)-Send the non-standard XFORWARD command when the Postfix SMTP server EHLO -response announces XFORWARD support. +Send the non-standard XFORWARD command when the Postfix SMTP server +EHLO response announces XFORWARD support.
@@ -7751,7 +7781,7 @@ This feature is available in Postfix 2.1 and later. (default: no)
-Enable sender-dependent authentication in the SMTP client; this is +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 different senders will use the appropriate credentials.
@@ -7920,7 +7950,7 @@ hence pass the "openssl verify -purpose sslclient ..." test. (default: empty) Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS
-cipher list. As this feature applies to all security levels, it is easy
+cipher list. As this feature applies to all TLS security levels, it is easy
to create inter-operability problems by choosing a non-default cipher
list. Do not use a non-default TLS cipher list on hosts that deliver email
to the public Internet: you will be unable to send email to servers that
@@ -7974,7 +8004,7 @@ specified with $smtp_tls_cert_file<
When TLS encryption is enforced, require that the remote SMTP
+ With mandatory TLS encryption, require that the remote SMTP
server hostname matches the information in the remote SMTP server
certificate. As of RFC 2487 the requirements for hostname checking
for MTA clients are not specified. List of ciphers or cipher types to exclude from the SMTP client cipher
-list at all security levels. This is not an OpenSSL cipherlist, it is
+ List of ciphers or cipher types to exclude from the Postfix
+SMTP client cipher
+list at all TLS security levels. This is not an OpenSSL cipherlist, it is
a simple list separated by whitespace and/or commas. The elements are a
single cipher, or one or more "+" separated cipher properties, in which
case only ciphers matching all the properties are excluded.
The minimum SMTP client TLS cipher grade that is strong enough to -be used with the "encrypt" security level and higher. The default -value "medium" is suitable for most destinations with which you may -want to enforce TLS, and is beyond the reach of today's crypt-analytic -methods. See smtp_tls_policy_maps for information on how to configure -ciphers on a per-destination basis.
+The minimum TLS cipher grade that the Postfix SMTP client will +use with +mandatory TLS encryption. The default value "medium" is suitable +for most destinations with which you may want to enforce TLS, and +is beyond the reach of today's crypt-analytic methods. See +smtp_tls_policy_maps for information on how to configure ciphers +on a per-destination basis.
The following cipher grades are supported:
@@ -8155,11 +8187,10 @@ encryption or authentication).List of ciphers or cipher types to exclude from the SMTP client -cipher list at the mandatory TLS security levels: "encrypt", "verify" -and "secure". See smtp_tls_exclude_ciphers for syntax details. When -both "exclude" parameters are defined, the combined list of ciphers is -excluded (provided the TLS security level is "encrypt" or higher).
+Additional list of ciphers or cipher types to exclude from the +SMTP client cipher list at mandatory TLS security levels. This list +works in addition to the exclusions listed with smtp_tls_exclude_ciphers +(see there for syntax details).
This feature is available in Postfix 2.3 and later.
@@ -8169,8 +8200,8 @@ excluded (provided the TLS security level is "encrypt" or higher).List of TLS protocol versions that are secure enough to be used -with the "encrypt" security level and higher. In main.cf the values +
List of TLS protocols that the Postfix SMTP client will use +with mandatory TLS encryption. In main.cf the values are separated by whitespace, commas or colons. In the policy table (see smtp_tls_policy_maps) the only valid separator is colon. An empty value means allow all protocols. The valid protocol names, @@ -9788,7 +9819,7 @@ null sender address.
Attempt to look up the SMTP client hostname, and verify that +
Attempt to look up the Postfix SMTP client hostname, and verify that the name matches the client IP address. A client name is set to "unknown" when it cannot be looked up or verified, or when name lookup is disabled. Turning off name lookup reduces delays due to @@ -10868,81 +10899,7 @@ clients.
Note: do not use "" quotes around the parameter value.
This feature is available with Postfix version 2.2. It is not used with -Postfix 2.3 and later; use smtpd_tls_ciphers instead.
- - -The minimum acceptable SMTP server TLS cipher grade. It is easy to -create inter-operability problems by choosing a non-default cipher grade. -Do not use a stronger than default minimum cipher grade for MX hosts on -the public Internet. Clients that begin the TLS handshake, but are unable -to agree on a common cipher, may not be able to send any email to the -SMTP server. Using a restricted cipher list may be more appropriate for a -dedicated MSA or an internal mailhub, where one can exert some control over -the TLS software and settings of the connecting clients. Configurations -with no certificates are also not likely to inter-operate with most -clients, see the notes for "smtpd_tls_cert_file".
- -The following cipher grades are supported:
- -This feature is available in Postfix 2.3 and later.
+Postfix 2.3 and later; use smtpd_tls_mandatory_ciphers instead.Your actual source for entropy may differ. Some systems have /dev/random; on other system you may consider using the "Entropy -Gathering Daemon EGD", available at http://www.lothar.com/tech/crypto/. +Gathering Daemon EGD", available at http://egd.sourceforge.net/
Example:
@@ -11036,10 +10993,12 @@ must be accessible without password. (default: empty)List of ciphers or cipher types to exclude from the SMTP server -cipher list. This is not an OpenSSL cipherlist; it is a simple list -separated by whitespace and/or commas. The elements are a single -cipher, or one or more "+" separated cipher properties, in which -case only ciphers matching all the properties are excluded.
+cipher list at all TLS security levels. Excluding valid ciphers +can create interoperability problems. DO NOT exclude ciphers unless it +is essential to do so. This is not an OpenSSL cipherlist; it is a simple +list separated by whitespace and/or commas. The elements are a single +cipher, or one or more "+" separated cipher properties, in which case +only ciphers matching all the properties are excluded.Examples (some of these will cause problems):
@@ -11107,23 +11066,115 @@ loglevel 4 is strongly discouraged.The minimum TLS cipher grade that the Postfix SMTP server will +use with mandatory +TLS encryption. Cipher types listed in smtpd_tls_mandatory_exclude_ciphers +or smtpd_tls_exclude_ciphers are excluded from the base definition +of the selected cipher grade. With opportunistic TLS encryption, +the "export" grade is used unconditionally with exclusions specified +only via smtpd_tls_exclude_ciphers.
+ +The following cipher grades are supported:
+ +This feature is available in Postfix 2.3 and later.
+ + +The list of TLS protocols supported by the Postfix SMTP server. -If the list is empty, the server supports all available TLS protocol -versions. A non-empty value is a list of protocol names separated -by whitespace, commas or colons. The supported protocol names are -"SSLv2", "SSLv3" and "TLSv1", and are not case sensitive.
+Additional list of ciphers or cipher types to exclude from the +SMTP server cipher list at mandatory TLS security levels. This list +works in addition to the exclusions listed with smtpd_tls_exclude_ciphers +(see there for syntax details).
-DO NOT set this to a non-default value on an Internet MX host, -as this may cause inter-operability problems. If you restrict the -protocol list on an Internet MX host, you may lose mail.
+This feature is available in Postfix 2.3 and later.
+ + +The TLS protocols accepted by the Postfix SMTP server with +mandatory TLS encryption. With opportunistic TLS encryption, all +protocols are always accepted. If the list is empty, the server +supports all available TLS protocol versions. A non-empty value +is a list of protocol names separated by whitespace, commas or +colons. The supported protocol names are "SSLv2", "SSLv3" and +"TLSv1", and are not case sensitive.
Example:
-smtpd_tls_protocols = SSLv3, TLSv1 +smtpd_tls_mandatory_protocols = SSLv3, TLSv1
This feature is available in Postfix 2.3 and later.
@@ -11149,7 +11200,7 @@ that was recorded by the final destination can be trusted.When TLS encryption is enforced, require a remote SMTP client +
With mandatory TLS encryption, require a remote SMTP client certificate in order to allow TLS connections to proceed. This option implies "smtpd_tls_ask_ccert = yes".
@@ -11200,6 +11251,8 @@ encrypt" implies "smtpd_tls_auth_o offer STARTTLS due to insufficient privileges to access the server private key. This is intended behavior. +This feature is available in Postfix 2.3 and later.
+The OpenSSL cipherlist for "EXPORT" or higher grade ciphers. This -defines the meaning of the "export" setting in smtpd_tls_ciphers, +defines the meaning of the "export" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. This is the cipherlist for the opportunistic ("may") TLS client security level and is the default cipherlist for the SMTP server. You are @@ -11543,7 +11596,7 @@ strongly encouraged to not change this setting.
(default: !EXPORT:!LOW:!MEDIUM:ALL:+RC4:@STRENGTH)The OpenSSL cipherlist for "HIGH" grade ciphers. This defines -the meaning of the "high" setting in smtpd_tls_ciphers, +the meaning of the "high" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. You are strongly encouraged to not change this setting.
@@ -11556,7 +11609,7 @@ strongly encouraged to not change this setting. (default: !EXPORT:ALL:+RC4:@STRENGTH)The OpenSSL cipherlist for "LOW" or higher grade ciphers. This defines -the meaning of the "low" setting in smtpd_tls_ciphers, +the meaning of the "low" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. You are strongly encouraged to not change this setting.
@@ -11569,7 +11622,7 @@ strongly encouraged to not change this setting. (default: !EXPORT:!LOW:ALL:+RC4:@STRENGTH)The OpenSSL cipherlist for "MEDIUM" or higher grade ciphers. This -defines the meaning of the "medium" setting in smtpd_tls_ciphers, +defines the meaning of the "medium" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. This is the default cipherlist for mandatory TLS encryption in the TLS client (with anonymous ciphers disabled when verifying server @@ -11586,7 +11639,7 @@ setting.
The OpenSSL cipherlist for "NULL" grade ciphers that provide authentication without encryption. This defines the meaning of the "null" -setting in smtpd_tls_ciphers, smtp_tls_mandatory_ciphers and +setting in smtpd_mandatory_tls_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. You are strongly encouraged to not change this setting.
diff --git a/postfix/html/relocated.5.html b/postfix/html/relocated.5.html index bc82e5b50..f3d27d524 100644 --- a/postfix/html/relocated.5.html +++ b/postfix/html/relocated.5.html @@ -91,7 +91,7 @@ RELOCATED(5) RELOCATED(5) regexp_table(5) or pcre_table(5). For a description of the TCP client/server table lookup protocol, see tcp_table(5). This feature is not available up to and including Postfix - version 2.2. + version 2.3. Each pattern is a regular expression that is applied to the entire address being looked up. Thus, user@domain mail @@ -112,7 +112,7 @@ RELOCATED(5) RELOCATED(5) lookups are directed to a TCP-based server. For a descrip- tion of the TCP client/server lookup protocol, see tcp_ta- ble(5). This feature is not available up to and including - Postfix version 2.2. + Postfix version 2.3. Each lookup operation uses the entire address once. Thus, user@domain mail addresses are not broken up into their diff --git a/postfix/html/smtp.8.html b/postfix/html/smtp.8.html index c1aa2caca..ca2302a55 100644 --- a/postfix/html/smtp.8.html +++ b/postfix/html/smtp.8.html @@ -206,14 +206,14 @@ SMTP(8) SMTP(8) Lookup tables, indexed by the remote SMTP server address, with case insensitive lists of EHLO key- words (pipelining, starttls, auth, etc.) that the - SMTP client will ignore in the EHLO response from a - remote SMTP server. + Postfix SMTP client will ignore in the EHLO + response from a remote SMTP server. smtp_discard_ehlo_keywords (empty) A case insensitive list of EHLO keywords (pipelin- - ing, starttls, auth, etc.) that the SMTP client - will ignore in the EHLO response from a remote SMTP - server. + ing, starttls, auth, etc.) that the Postfix SMTP + client will ignore in the EHLO response from a + remote SMTP server. smtp_generic_maps (empty) Optional lookup tables that perform address rewrit- @@ -294,109 +294,99 @@ SMTP(8) SMTP(8) Available in Postfix version 2.3 and later: smtp_sasl_auth_enforce (yes) - Defer mail delivery when an SMTP server does not - support SASL authentication, while smtp_sasl_pass- - word_maps contains SASL login/password information + If sender-dependent SASL passwords are turned off, + defer mail delivery when an SMTP server does not + support SASL authentication, while smtp_sasl_pass- + word_maps contains SASL login/password information for that server. smtp_sender_dependent_authentication (no) - Enable sender-dependent authentication in the SMTP - client; this is available only with SASL authenti- - cation, and disables SMTP connection caching to - ensure that mail from different senders will use - the appropriate credentials. + Enable sender-dependent authentication in the Post- + fix SMTP client; this is available only with SASL + authentication, and disables SMTP connection + caching to ensure that mail from different senders + will use the appropriate credentials. smtp_sasl_path (empty) - Implementation-specific information that is passed - through to the SASL plug-in implementation that is + Implementation-specific information that is passed + 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 + The SASL plug-in type that the Postfix SMTP client should use for authentication. STARTTLS SUPPORT CONTROLS - Detailed information about STARTTLS configuration may be + Detailed information about STARTTLS configuration may be found in the TLS_README document. smtp_tls_security_level (empty) The default SMTP TLS security level for the Postfix - SMTP client; when a non-empty value is specified, - this overrides the obsolete parameters + SMTP client; when a non-empty value is specified, + this overrides the obsolete parameters smtp_use_tls, smtp_enforce_tls, and smtp_tls_enforce_peername. smtp_sasl_tls_security_options ($smtp_sasl_secu- rity_options) - The SASL authentication security options that the - Postfix SMTP client uses for TLS encrypted 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 during TLS startup and shutdown hand- + Time limit for Postfix SMTP client write and read + operations during TLS startup and shutdown hand- shake procedures. smtp_tls_CAfile (empty) - The file with the certificate of the certification - authority (CA) that issued the Postfix SMTP client + The file with the certificate of the certification + authority (CA) that issued the Postfix SMTP client certificate. smtp_tls_CApath (empty) - Directory with PEM format certificate authority - certificates that the Postfix SMTP client uses to + Directory with PEM format certificate authority + certificates that the Postfix SMTP client uses to verify a remote SMTP server certificate. smtp_tls_cert_file (empty) - File with the Postfix SMTP client RSA certificate + File with the Postfix SMTP client RSA certificate in PEM format. smtp_tls_mandatory_ciphers (medium) - The minimum SMTP client TLS cipher grade that is - strong enough to be used with the "encrypt" secu- - rity level and higher. + The minimum TLS cipher grade that the Postfix SMTP + client will use with mandatory TLS encryption. smtp_tls_exclude_ciphers (empty) List of ciphers or cipher types to exclude from the - SMTP client cipher list at all security levels. + Postfix SMTP client cipher list at all TLS security + levels. smtp_tls_mandatory_exclude_ciphers (empty) - List of ciphers or cipher types to exclude from the - SMTP client cipher list at the mandatory TLS secu- - rity levels: "encrypt", "verify" and "secure". + Additional list of ciphers or cipher types to + exclude from the SMTP client cipher list at manda- + tory TLS security levels. smtp_tls_dcert_file (empty) - File with the Postfix SMTP client DSA certificate + File with the Postfix SMTP client DSA certificate in PEM format. smtp_tls_dkey_file ($smtp_tls_dcert_file) - File with the Postfix SMTP client DSA private key + File with the Postfix SMTP client DSA private key in PEM format. smtp_tls_key_file ($smtp_tls_cert_file) - File with the Postfix SMTP client RSA private key + File with the Postfix SMTP client RSA private key in PEM format. smtp_tls_loglevel (0) - Enable additional Postfix SMTP client logging of + 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, when TLS is not already enabled + 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) - Optional lookup tables with the Postfix SMTP client - TLS security policy by next-hop destination; when a - non-empty value is specified, this overrides the - obsolete smtp_tls_per_site parameter. - - smtp_tls_mandatory_protocols (SSLv3, TLSv1) - List of TLS protocol versions that are secure - enough to be used with the "encrypt" security level - and higher. - smtp_tls_scert_verifydepth (5) The verification depth for remote SMTP server cer- tificates. @@ -467,7 +457,7 @@ SMTP(8) SMTP(8) clear. smtp_tls_enforce_peername (yes) - When TLS encryption is enforced, require that the + With mandatory TLS encryption, require that the remote SMTP server hostname matches the information in the remote SMTP server certificate. @@ -476,30 +466,34 @@ SMTP(8) SMTP(8) TLS usage policy by next-hop destination and by remote SMTP server hostname. + smtp_tls_cipherlist (empty) + Obsolete Postfix < 2.3 control for the Postfix SMTP + client TLS cipher list. + 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. lmtp_lhlo_timeout (300s) - The LMTP client time limit for sending the LHLO + The LMTP client time limit for sending the LHLO command, and for receiving the initial server response. @@ -508,30 +502,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: @@ -542,12 +536,12 @@ 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 (20s) - The SMTP client time limit for sending the RSET + The SMTP client time limit for sending the RSET command, and for receiving the server response. Available in Postfix version 2.2 and earlier: @@ -559,11 +553,11 @@ SMTP(8) SMTP(8) Available in Postfix version 2.2 and later: smtp_connection_cache_destinations (empty) - Permanently enable SMTP connection caching for the + Permanently enable SMTP connection caching for the specified destinations. smtp_connection_cache_on_demand (yes) - Temporarily enable SMTP connection caching while a + Temporarily enable SMTP connection caching while a destination has a high volume of mail in the active queue. @@ -573,57 +567,62 @@ SMTP(8) SMTP(8) smtp_connection_cache_time_limit (2s) When SMTP connection caching is enabled, the amount - of time that an unused SMTP client socket is kept + of time that an unused SMTP client socket is kept open before it is closed. Available in Postfix version 2.3 and later: connection_cache_protocol_timeout (5s) - Time limit for connection cache connect, send or + Time limit for connection cache connect, send or receive operations. TROUBLE SHOOTING CONTROLS debug_peer_level (2) - The increment in verbose logging level when a - remote client or server matches a pattern in the + 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 address patterns that cause the verbose - logging level to increase by the amount specified + 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 problems that are caused by policy, + The recipient of postmaster notifications about + mail delivery problems that are caused by policy, resource, software or protocol errors. + internal_mail_filter_classes (empty) + What categories of Postfix-generated mail are sub- + ject to before-queue content inspection by + non_smtpd_milters, header_checks and body_checks. + notify_classes (resource, software) - The list of error classes that are reported to the + The list of error classes that are reported to the postmaster. MISCELLANEOUS CONTROLS best_mx_transport (empty) - Where the Postfix SMTP client should deliver mail + 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 + 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 + 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 + The maximal number of digits after the decimal point when logging sub-second delay values. disable_dns_lookups (no) - Disable DNS lookups in the Postfix SMTP and LMTP + Disable DNS lookups in the Postfix SMTP and LMTP clients. inet_interfaces (all) @@ -631,7 +630,7 @@ SMTP(8) SMTP(8) tem receives mail on. inet_protocols (ipv4) - The Internet protocols Postfix will attempt to use + The Internet protocols Postfix will attempt to use when making or accepting connections. ipc_timeout (3600s) @@ -639,74 +638,74 @@ SMTP(8) SMTP(8) over an internal communication channel. lmtp_tcp_port (24) - The default TCP port that the Postfix LMTP client + 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 waits for the next service request + The maximum amount of time that an idle Postfix + daemon process waits for the next service request before exiting. max_use (100) - The maximal number of connection requests before a + The maximal number of connection requests before a Postfix daemon process terminates. process_id (read-only) - The process ID of a Postfix command or daemon + The process ID of a Postfix command or daemon process. process_name (read-only) - The process name of a Postfix command or daemon + The process name of a Postfix command or daemon process. proxy_interfaces (empty) The network interface addresses that this mail sys- - tem receives mail on by way of a proxy or network + tem receives mail on by way of a proxy or network address translation unit. smtp_bind_address (empty) - An optional numerical network address that the SMTP - client should bind to when making an IPv4 connec- - tion. + 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 SMTP - client should bind to when making an IPv6 connec- - tion. + An optional numerical network address that the + Postfix SMTP client should bind to when making an + IPv6 connection. smtp_helo_name ($myhostname) - The hostname to send in the SMTP EHLO or HELO com- + The hostname to send in the SMTP EHLO or HELO com- mand. lmtp_lhlo_name ($myhostname) The hostname to send in the LMTP LHLO command. smtp_host_lookup (dns) - What mechanisms when the SMTP client uses to look - up a host's IP address. + What mechanisms when the Postfix SMTP client uses + to look up a host's IP address. smtp_randomize_addresses (yes) - Randomize the order of equal-preference MX host + Randomize the order of equal-preference MX host addresses. syslog_facility (mail) The syslog facility of Postfix logging. syslog_name (postfix) - The mail system name that is prepended to the - process name in syslog records, so that "smtpd" + The mail system name that is prepended to the + process name in syslog records, so that "smtpd" becomes, for example, "postfix/smtpd". Available with Postfix 2.2 and earlier: fallback_relay (empty) - Optional list of relay hosts for SMTP destinations + Optional list of relay hosts for SMTP destinations that can't be found or that are unreachable. Available with Postfix 2.3 and later: smtp_fallback_relay ($fallback_relay) - Optional list of relay hosts for SMTP destinations + Optional list of relay hosts for SMTP destinations that can't be found or that are unreachable. SEE ALSO @@ -724,7 +723,7 @@ SMTP(8) SMTP(8) TLS_README, Postfix STARTTLS howto LICENSE - The Secure Mailer license must be distributed with this + The Secure Mailer license must be distributed with this software. AUTHOR(S) diff --git a/postfix/html/smtpd.8.html b/postfix/html/smtpd.8.html index 476b23482..0a55a893b 100644 --- a/postfix/html/smtpd.8.html +++ b/postfix/html/smtpd.8.html @@ -328,88 +328,89 @@ SMTPD(8) SMTPD(8) Detailed information about STARTTLS configuration may be found in the TLS_README document. - smtpd_use_tls (no) - Opportunistic TLS: announce STARTTLS support to - SMTP clients, but do not require that clients use - TLS encryption. - - smtpd_enforce_tls (no) - Mandatory TLS: announce STARTTLS support to SMTP - clients, and require that clients use TLS encryp- - tion. + smtpd_tls_security_level (empty) + The SMTP TLS security level for the Postfix SMTP + server; when a non-empty value is specified, this + overrides the obsolete parameters smtpd_use_tls and + smtpd_enforce_tls. smtpd_sasl_tls_security_options ($smtpd_sasl_secu- rity_options) - The SASL authentication security options that the - Postfix SMTP server uses for TLS encrypted SMTP + The SASL authentication security options that the + Postfix SMTP server uses for TLS encrypted SMTP sessions. smtpd_starttls_timeout (300s) - The time limit for Postfix SMTP server write and - read operations during TLS startup and shutdown + The time limit for Postfix SMTP server write and + read operations during TLS startup and shutdown handshake procedures. smtpd_tls_CAfile (empty) - The file with the certificate of the certification - authority (CA) that issued the Postfix SMTP server + The file with the certificate of the certification + authority (CA) that issued the Postfix SMTP server certificate. smtpd_tls_CAfile (empty) - The file with the certificate of the certification - authority (CA) that issued the Postfix SMTP server + The file with the certificate of the certification + authority (CA) that issued the Postfix SMTP server certificate. smtpd_tls_ask_ccert (no) - Ask a remote SMTP client for a client certificate. + Ask a remote SMTP client for a client certificate. smtpd_tls_auth_only (no) When TLS encryption is optional in the Postfix SMTP - server, do not announce or accept SASL authentica- + server, do not announce or accept SASL authentica- tion over unencrypted connections. smtpd_tls_ccert_verifydepth (5) - The verification depth for remote SMTP client cer- + The verification depth for remote SMTP client cer- tificates. smtpd_tls_cert_file (empty) - File with the Postfix SMTP server RSA certificate + File with the Postfix SMTP server RSA certificate in PEM format. - smtpd_tls_ciphers (export) - The minimum acceptable SMTP server TLS cipher - grade. - smtpd_tls_exclude_ciphers (empty) List of ciphers or cipher types to exclude from the - SMTP server cipher list. + SMTP server cipher list at all TLS security levels. smtpd_tls_dcert_file (empty) - File with the Postfix SMTP server DSA certificate + File with the Postfix SMTP server DSA certificate in PEM format. smtpd_tls_dh1024_param_file (empty) - File with DH parameters that the Postfix SMTP - server should use with EDH ciphers. - - smtpd_tls_dh512_param_file (empty) File with DH parameters that the Postfix SMTP server should use with EDH ciphers. + smtpd_tls_dh512_param_file (empty) + File with DH parameters that the Postfix SMTP + server should use with EDH ciphers. + smtpd_tls_dkey_file ($smtpd_tls_dcert_file) - File with the Postfix SMTP server DSA private key + File with the Postfix SMTP server DSA private key in PEM format. smtpd_tls_key_file ($smtpd_tls_cert_file) - File with the Postfix SMTP server RSA private key + File with the Postfix SMTP server RSA private key in PEM format. smtpd_tls_loglevel (0) - Enable additional Postfix SMTP server logging of + Enable additional Postfix SMTP server logging of TLS activity. - smtpd_tls_protocols (empty) - The list of TLS protocols supported by the Postfix - SMTP server. + smtpd_tls_mandatory_ciphers (medium) + The minimum TLS cipher grade that the Postfix SMTP + server will use with mandatory TLS encryption. + + smtpd_tls_mandatory_exclude_ciphers (empty) + Additional list of ciphers or cipher types to + exclude from the SMTP server cipher list at manda- + tory TLS security levels. + + smtpd_tls_mandatory_protocols (SSLv3, TLSv1) + The TLS protocols accepted by the Postfix SMTP + server with mandatory TLS encryption. smtpd_tls_received_header (no) Request that the Postfix SMTP server produces @@ -419,7 +420,7 @@ SMTPD(8) SMTPD(8) CommonName. smtpd_tls_req_ccert (no) - When TLS encryption is enforced, require a remote + With mandatory TLS encryption, require a remote SMTP client certificate in order to allow TLS con- nections to proceed. @@ -442,14 +443,6 @@ SMTPD(8) SMTPD(8) server in order to seed its internal pseudo random number generator (PRNG). - Available in Postfix version 2.3 and later: - - smtpd_tls_security_level (empty) - The SMTP TLS security level for the Postfix SMTP - server; when a non-empty value is specified, this - overrides the obsolete parameters smtpd_use_tls and - smtpd_enforce_tls. - tls_high_cipherlist (!EXPORT:!LOW:!MEDIUM:ALL:+RC4:@STRENGTH) The OpenSSL cipherlist for "HIGH" grade ciphers. @@ -459,7 +452,7 @@ SMTPD(8) SMTPD(8) ciphers. tls_low_cipherlist (!EXPORT:ALL:+RC4:@STRENGTH) - The OpenSSL cipherlist for "LOW" or higher grade + The OpenSSL cipherlist for "LOW" or higher grade ciphers. tls_export_cipherlist (ALL:+RC4:@STRENGTH) @@ -467,9 +460,28 @@ SMTPD(8) SMTPD(8) ciphers. tls_null_cipherlist (!aNULL:eNULL+kRSA) - The OpenSSL cipherlist for "NULL" grade ciphers + The OpenSSL cipherlist for "NULL" grade ciphers that provide authentication without encryption. +OBSOLETE STARTTLS CONTROLS + The following configuration parameters exist for compati- + bility with Postfix versions before 2.3. Support for these + will be removed in a future release. + + smtpd_use_tls (no) + Opportunistic TLS: announce STARTTLS support to + SMTP clients, but do not require that clients use + TLS encryption. + + smtpd_enforce_tls (no) + Mandatory TLS: announce STARTTLS support to SMTP + clients, and require that clients use TLS encryp- + tion. + + smtpd_tls_cipherlist (empty) + Obsolete Postfix < 2.3 control for the Postfix SMTP + server TLS cipher list. + VERP SUPPORT CONTROLS With VERP style delivery, each recipient of a message receives a customized copy of the message with his/her own @@ -522,6 +534,11 @@ SMTPD(8) SMTPD(8) mail delivery problems that are caused by policy, resource, software or protocol errors. + internal_mail_filter_classes (empty) + What categories of Postfix-generated mail are sub- + ject to before-queue content inspection by + non_smtpd_milters, header_checks and body_checks. + notify_classes (resource, software) The list of error classes that are reported to the postmaster. @@ -677,8 +694,9 @@ SMTPD(8) SMTPD(8) Available in Postfix version 2.3 and later: smtpd_peername_lookup (yes) - Attempt to look up the SMTP client hostname, and - verify that the name matches the client IP address. + Attempt to look up the Postfix SMTP client host- + name, and verify that the name matches the client + IP address. The per SMTP client connection count and request rate lim- its are implemented in co-operation with the anvil(8) ser- diff --git a/postfix/html/transport.5.html b/postfix/html/transport.5.html index 6d28a3c62..3fc1f1c04 100644 --- a/postfix/html/transport.5.html +++ b/postfix/html/transport.5.html @@ -243,7 +243,7 @@ TRANSPORT(5) TRANSPORT(5) lookups are directed to a TCP-based server. For a descrip- tion of the TCP client/server lookup protocol, see tcp_ta- ble(5). This feature is not available up to and including - Postfix version 2.2. + Postfix version 2.3. Each lookup operation uses the entire recipient address once. Thus, some.domain.hierarchy is not looked up via diff --git a/postfix/html/virtual.5.html b/postfix/html/virtual.5.html index d8dfe9898..ab0649357 100644 --- a/postfix/html/virtual.5.html +++ b/postfix/html/virtual.5.html @@ -209,7 +209,7 @@ VIRTUAL(5) VIRTUAL(5) lookups are directed to a TCP-based server. For a descrip- tion of the TCP client/server lookup protocol, see tcp_ta- ble(5). This feature is not available up to and including - Postfix version 2.2. + Postfix version 2.3. Each lookup operation uses the entire address once. Thus, user@domain mail addresses are not broken up into their diff --git a/postfix/man/man5/access.5 b/postfix/man/man5/access.5 index 668d0c2e3..ad4f084a4 100644 --- a/postfix/man/man5/access.5 +++ b/postfix/man/man5/access.5 @@ -340,7 +340,7 @@ pattern can be interpolated as \fB$1\fR, \fB$2\fR and so on. This section describes how the table lookups change when lookups are directed to a TCP-based server. For a description of the TCP client/server lookup protocol, see \fBtcp_table\fR(5). -This feature is not available up to and including Postfix version 2.2. +This feature is not available up to and including Postfix version 2.3. Each lookup operation uses the entire query string once. Depending on the application, that string is an entire client diff --git a/postfix/man/man5/canonical.5 b/postfix/man/man5/canonical.5 index 5ee395108..1faefbca7 100644 --- a/postfix/man/man5/canonical.5 +++ b/postfix/man/man5/canonical.5 @@ -166,7 +166,7 @@ pattern can be interpolated as \fB$1\fR, \fB$2\fR and so on. This section describes how the table lookups change when lookups are directed to a TCP-based server. For a description of the TCP client/server lookup protocol, see \fBtcp_table\fR(5). -This feature is not available up to and including Postfix version 2.2. +This feature is not available up to and including Postfix version 2.3. Each lookup operation uses the entire address once. Thus, \fIuser@domain\fR mail addresses are not broken up into their diff --git a/postfix/man/man5/generic.5 b/postfix/man/man5/generic.5 index 5aa6172d4..e0ec31a84 100644 --- a/postfix/man/man5/generic.5 +++ b/postfix/man/man5/generic.5 @@ -150,7 +150,7 @@ pattern can be interpolated as \fB$1\fR, \fB$2\fR and so on. This section describes how the table lookups change when lookups are directed to a TCP-based server. For a description of the TCP client/server lookup protocol, see \fBtcp_table\fR(5). -This feature is not available up to and including Postfix version 2.2. +This feature is not available up to and including Postfix version 2.3. Each lookup operation uses the entire address once. Thus, \fIuser@domain\fR mail addresses are not broken up into their diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5 index f024a3df5..69f3c1824 100644 --- a/postfix/man/man5/postconf.5 +++ b/postfix/man/man5/postconf.5 @@ -559,7 +559,8 @@ $virtual_alias_domains, or $virtual_mailbox_domains. By default, the Postfix SMTP client returns such mail as undeliverable. .PP Specify, for example, "best_mx_transport = local" to pass the mail -from the SMTP client to the \fBlocal\fR(8) delivery agent. You can specify +from the Postfix SMTP client to the \fBlocal\fR(8) delivery agent. You +can specify any message delivery "transport" or "transport:nexthop" that is defined in the master.cf file. See the \fBtransport\fR(5) manual page for the syntax and meaning of "transport" or "transport:nexthop". @@ -1525,7 +1526,8 @@ for IPv6. .PP A better solution for multi-homed firewalls is to leave inet_interfaces at the default value and instead use explicit IP addresses in -the master.cf SMTP server definitions. This preserves the SMTP client's +the master.cf SMTP server definitions. This preserves the Postfix +SMTP client's loop detection, by ensuring that each side of the firewall knows that the other IP address is still the same host. Setting $inet_interfaces to a single IPv4 and/or IPV6 address is primarily useful with virtual @@ -1600,6 +1602,22 @@ and via the \fBpipe\fR(8) and \fBvirtual\fR(8) delivery agents. .PP Warning: with concurrency of 1, one bad message can be enough to block all mail to a site. +.SH internal_mail_filter_classes (default: empty) +What categories of Postfix-generated mail are subject to +before-queue content inspection by non_smtpd_milters, header_checks +and body_checks. Specify zero or more of the following, separated +by whitespace or comma. +.IP "\fB bounce \fR" +Inspect the content of delivery +status notifications. +.IP "\fB notify \fR" +Inspect the content of postmaster +notifications by the \fBsmtp\fR(8) and \fBsmtpd\fR(8) processes. +.PP +NOTE: It's generally not safe to enable content inspection of +Postfix-generated email messages. The user is warned. +.PP +This feature is available in Postfix 2.3 and later. .SH invalid_hostname_reject_code (default: 501) The numerical Postfix SMTP server response code when the client HELO or EHLO command parameter is rejected by the reject_invalid_helo_hostname @@ -2232,8 +2250,8 @@ Technically, tables listed with $local_recipient_maps are used as lists: Postfix needs to know only if a lookup string is found or not, but it does not use the result from table lookup. .PP -If this parameter is non-empty (the default), then the Postfix SMTP server -will reject mail for unknown local users. +If this parameter is non-empty (the default), then the Postfix SMTP +server will reject mail for unknown local users. .PP To turn off local recipient checking in the Postfix SMTP server, specify "local_recipient_maps =" (i.e. empty). @@ -3764,8 +3782,8 @@ With "smtp_always_send_ehlo = no", Postfix sends EHLO only when the word "ESMTP" appears in the server greeting banner (example: 220 spike.porcupine.org ESMTP Postfix). .SH smtp_bind_address (default: empty) -An optional numerical network address that the SMTP client should -bind to when making an IPv4 connection. +An optional numerical network address that the Postfix SMTP client +should bind to when making an IPv4 connection. .PP This can be specified in the main.cf file for all SMTP clients, or it can be specified in the master.cf file for a specific client, @@ -3789,8 +3807,8 @@ inet_interfaces documentation for more detail. Note 2: address information may be enclosed inside [], but this form is not recommended here. .SH smtp_bind_address6 (default: empty) -An optional numerical network address that the SMTP client should -bind to when making an IPv6 connection. +An optional numerical network address that the Postfix SMTP client +should bind to when making an IPv6 connection. .PP This feature is available in Postfix 2.2 and later. .PP @@ -3829,7 +3847,8 @@ This feature is available in Postfix 2.2.9 and later. The SMTP client time limit for completing a TCP connection, or zero (use the operating system built-in time limit). .PP -When no connection can be made within the deadline, the SMTP client +When no connection can be made within the deadline, the Postfix +SMTP client tries the next address on the mail exchanger list. Specify 0 to disable the time limit (i.e. use whatever timeout is implemented by the operating system). @@ -3951,7 +3970,7 @@ The default time unit is s (seconds). .SH smtp_data_xfer_timeout (default: 180s) The SMTP client time limit for sending the SMTP message content. When the connection makes no progress for more than $smtp_data_xfer_timeout -seconds the SMTP client terminates the transfer. +seconds the Postfix SMTP client terminates the transfer. .PP Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks). The default time unit is s (seconds). @@ -3983,7 +4002,7 @@ into concurrency per recipient. .SH smtp_discard_ehlo_keyword_address_maps (default: empty) Lookup tables, indexed by the remote SMTP server address, with case insensitive lists of EHLO keywords (pipelining, starttls, auth, -etc.) that the SMTP client will ignore in the EHLO response from a +etc.) that the Postfix SMTP client will ignore in the EHLO response from a remote SMTP server. See smtp_discard_ehlo_keywords for details. The table is not indexed by hostname for consistency with smtpd_discard_ehlo_keyword_address_maps. @@ -3991,8 +4010,8 @@ smtpd_discard_ehlo_keyword_address_maps. This feature is available in Postfix 2.2 and later. .SH smtp_discard_ehlo_keywords (default: empty) A case insensitive list of EHLO keywords (pipelining, starttls, -auth, etc.) that the SMTP client will ignore in the EHLO response -from a remote SMTP server. +auth, etc.) that the Postfix SMTP client will ignore in the EHLO +response from a remote SMTP server. .PP This feature is available in Postfix 2.2 and later. .PP @@ -4080,7 +4099,7 @@ and for receiving the initial server response. Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks). The default time unit is s (seconds). .SH smtp_host_lookup (default: dns) -What mechanisms when the SMTP client uses to look up a host's IP +What mechanisms when the Postfix SMTP client uses to look up a host's IP address. This parameter is ignored when DNS lookups are disabled. .PP Specify one of the following: @@ -4200,9 +4219,10 @@ smtp_sasl_auth_enable = yes .ad .ft R .SH smtp_sasl_auth_enforce (default: yes) -Defer mail delivery when an SMTP server does not support SASL -authentication, while smtp_sasl_password_maps contains SASL -login/password information for that server. +If sender-dependent SASL passwords are turned off, defer mail +delivery when an SMTP server does not support SASL authentication, +while smtp_sasl_password_maps contains SASL login/password information +for that server. .PP This feature is available in Postfix 2.3 and later. .SH smtp_sasl_mechanism_filter (default: empty) @@ -4295,8 +4315,8 @@ for authentication. The available types are listed with the .PP This feature is available in Postfix 2.3 and later. .SH smtp_send_xforward_command (default: no) -Send the non-standard XFORWARD command when the Postfix SMTP server EHLO -response announces XFORWARD support. +Send the non-standard XFORWARD command when the Postfix SMTP server +EHLO response announces XFORWARD support. .PP This allows an "smtp" delivery agent, used for injecting mail into a content filter, to forward the name, address, protocol and HELO @@ -4306,7 +4326,7 @@ localhost[127.0.0.1] etc. .PP This feature is available in Postfix 2.1 and later. .SH smtp_sender_dependent_authentication (default: no) -Enable sender-dependent authentication in the SMTP client; this is +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 different senders will use the appropriate credentials. @@ -4435,7 +4455,7 @@ smtp_tls_cert_file = /etc/postfix/client.pem This feature is available in Postfix 2.2 and later. .SH smtp_tls_cipherlist (default: empty) Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS -cipher list. As this feature applies to all security levels, it is easy +cipher list. As this feature applies to all TLS security levels, it is easy to create inter-operability problems by choosing a non-default cipher list. Do not use a non-default TLS cipher list on hosts that deliver email to the public Internet: you will be unable to send email to servers that @@ -4474,7 +4494,7 @@ specified with $smtp_tls_cert_file. .PP This feature is available in Postfix 2.2 and later. .SH smtp_tls_enforce_peername (default: yes) -When TLS encryption is enforced, require that the remote SMTP +With mandatory TLS encryption, require that the remote SMTP server hostname matches the information in the remote SMTP server certificate. As of RFC 2487 the requirements for hostname checking for MTA clients are not specified. @@ -4491,8 +4511,9 @@ CommonName of this attacker will be logged). This feature is available in Postfix 2.2 and later. With Postfix 2.3 and later use smtp_tls_security_level instead. .SH smtp_tls_exclude_ciphers (default: empty) -List of ciphers or cipher types to exclude from the SMTP client cipher -list at all security levels. This is not an OpenSSL cipherlist, it is +List of ciphers or cipher types to exclude from the Postfix +SMTP client cipher +list at all TLS security levels. This is not an OpenSSL cipherlist, it is a simple list separated by whitespace and/or commas. The elements are a single cipher, or one or more "+" separated cipher properties, in which case only ciphers matching \fBall\fR the properties are excluded. @@ -4560,12 +4581,13 @@ loglevel 4 is strongly discouraged. .PP This feature is available in Postfix 2.2 and later. .SH smtp_tls_mandatory_ciphers (default: medium) -The minimum SMTP client TLS cipher grade that is strong enough to -be used with the "encrypt" security level and higher. The default -value "medium" is suitable for most destinations with which you may -want to enforce TLS, and is beyond the reach of today's crypt-analytic -methods. See smtp_tls_policy_maps for information on how to configure -ciphers on a per-destination basis. +The minimum TLS cipher grade that the Postfix SMTP client will +use with +mandatory TLS encryption. The default value "medium" is suitable +for most destinations with which you may want to enforce TLS, and +is beyond the reach of today's crypt-analytic methods. See +smtp_tls_policy_maps for information on how to configure ciphers +on a per-destination basis. .PP The following cipher grades are supported: .IP "\fBexport\fR" @@ -4621,16 +4643,15 @@ encryption or authentication). .PP This feature is available in Postfix 2.3 and later. .SH smtp_tls_mandatory_exclude_ciphers (default: empty) -List of ciphers or cipher types to exclude from the SMTP client -cipher list at the mandatory TLS security levels: "encrypt", "verify" -and "secure". See smtp_tls_exclude_ciphers for syntax details. When -both "exclude" parameters are defined, the combined list of ciphers is -excluded (provided the TLS security level is "encrypt" or higher). +Additional list of ciphers or cipher types to exclude from the +SMTP client cipher list at mandatory TLS security levels. This list +works in addition to the exclusions listed with smtp_tls_exclude_ciphers +(see there for syntax details). .PP This feature is available in Postfix 2.3 and later. .SH smtp_tls_mandatory_protocols (default: SSLv3, TLSv1) -List of TLS protocol versions that are secure enough to be used -with the "encrypt" security level and higher. In main.cf the values +List of TLS protocols that the Postfix SMTP client will use +with mandatory TLS encryption. In main.cf the values are separated by whitespace, commas or colons. In the policy table (see smtp_tls_policy_maps) the only valid separator is colon. An empty value means allow all protocols. The valid protocol names, @@ -5810,7 +5831,7 @@ This list overrides any commands built into the Postfix SMTP server. The lookup key to be used in SMTP \fBaccess\fR(5) tables instead of the null sender address. .SH smtpd_peername_lookup (default: yes) -Attempt to look up the SMTP client hostname, and verify that +Attempt to look up the Postfix SMTP client hostname, and verify that the name matches the client IP address. A client name is set to "unknown" when it cannot be looked up or verified, or when name lookup is disabled. Turning off name lookup reduces delays due to @@ -6530,67 +6551,7 @@ clients. \fBNote:\fR do not use "" quotes around the parameter value. .PP This feature is available with Postfix version 2.2. It is not used with -Postfix 2.3 and later; use smtpd_tls_ciphers instead. -.SH smtpd_tls_ciphers (default: export) -The minimum acceptable SMTP server TLS cipher grade. It is easy to -create inter-operability problems by choosing a non-default cipher grade. -Do not use a stronger than default minimum cipher grade for MX hosts on -the public Internet. Clients that begin the TLS handshake, but are unable -to agree on a common cipher, may not be able to send any email to the -SMTP server. Using a restricted cipher list may be more appropriate for a -dedicated MSA or an internal mailhub, where one can exert some control over -the TLS software and settings of the connecting clients. Configurations -with no certificates are also not likely to inter-operate with most -clients, see the notes for "smtpd_tls_cert_file". -.PP -The following cipher grades are supported: -.IP "\fBexport\fR" -Enable the mainstream "EXPORT" grade or better OpenSSL ciphers. -This is the most appropriate setting for public MX hosts. The underlying -cipherlist is specified via the tls_export_cipherlist configuration -parameter, which you are strongly encouraged to not change. The default -value of tls_export_cipherlist includes anonymous ciphers, but these -are automatically filtered out if the server is configured to ask for -client certificates. If you must always exclude anonymous ciphers, -set "smtpd_tls_exclude_ciphers = aNULL". -.IP "\fBlow\fR" -Enable the mainstream "LOW" grade or better OpenSSL ciphers. This -setting is only appropriate for internal mail servers. The underlying -cipherlist is specified via the tls_low_cipherlist configuration -parameter, which you are strongly encouraged to not change. The default -value of tls_low_cipherlist includes anonymous ciphers, but these -are automatically filtered out if the server is configured to ask for -client certificates. If you must always exclude anonymous ciphers, -set "smtpd_tls_exclude_ciphers = aNULL". -.IP "\fBmedium\fR" -Enable the mainstream "MEDIUM" grade or better OpenSSL ciphers. This -setting is only appropriate for internal mail servers. The underlying -cipherlist is specified via the tls_medium_cipherlist configuration -parameter, which you are strongly encouraged to not change. The default -value of tls_medium_cipherlist includes anonymous ciphers, but these -are automatically filtered out if the server is configured to ask for -client certificates. If you must always exclude anonymous ciphers, -set "smtpd_tls_exclude_ciphers = aNULL". -.IP "\fBhigh\fR" -Enable only the mainstream "HIGH" grade OpenSSL ciphers. This -setting is only appropriate for internal mail servers. The underlying -cipherlist is specified via the tls_high_cipherlist configuration -parameter, which you are strongly encouraged to not change. The default -value of tls_high_cipherlist includes anonymous ciphers, but these -are automatically filtered out if the server is configured to ask for -client certificates. If you must always exclude anonymous ciphers, set -"smtpd_tls_exclude_ciphers = aNULL". -.IP "\fBnull\fR" -Enable only the "NULL" OpenSSL ciphers, these provide authentication -without encryption. This setting is only appropriate in the rare -case that all clients are prepared to use NULL ciphers (not normally -enabled in TLS clients). The underlying cipherlist is specified via the -tls_null_cipherlist configuration parameter, which you are strongly -encouraged to not change. The default value of tls_null_cipherlist -excludes anonymous ciphers (OpenSSL 0.9.8 has NULL ciphers that offer -data integrity without encryption or authentication). -.PP -This feature is available in Postfix 2.3 and later. +Postfix 2.3 and later; use smtpd_tls_mandatory_ciphers instead. .SH smtpd_tls_dcert_file (default: empty) File with the Postfix SMTP server DSA certificate in PEM format. This file may also contain the server private key. @@ -6626,7 +6587,7 @@ openssl gendh -out /etc/postfix/dh_1024.pem -2 -rand /var/run/egd-pool 1024 .PP Your actual source for entropy may differ. Some systems have /dev/random; on other system you may consider using the "Entropy -Gathering Daemon EGD", available at http://www.lothar.com/tech/crypto/. +Gathering Daemon EGD", available at http://egd.sourceforge.net/ .PP Example: .PP @@ -6668,10 +6629,12 @@ must be accessible without password. This feature is available in Postfix 2.2 and later. .SH smtpd_tls_exclude_ciphers (default: empty) List of ciphers or cipher types to exclude from the SMTP server -cipher list. This is not an OpenSSL cipherlist; it is a simple list -separated by whitespace and/or commas. The elements are a single -cipher, or one or more "+" separated cipher properties, in which -case only ciphers matching \fBall\fR the properties are excluded. +cipher list at all TLS security levels. Excluding valid ciphers +can create interoperability problems. DO NOT exclude ciphers unless it +is essential to do so. This is not an OpenSSL cipherlist; it is a simple +list separated by whitespace and/or commas. The elements are a single +cipher, or one or more "+" separated cipher properties, in which case +only ciphers matching \fBall\fR the properties are excluded. .PP Examples (some of these will cause problems): .PP @@ -6723,23 +6686,95 @@ Use "smtpd_tls_loglevel = 3" only in case of problems. Use of loglevel 4 is strongly discouraged. .PP This feature is available in Postfix 2.2 and later. -.SH smtpd_tls_protocols (default: empty) -The list of TLS protocols supported by the Postfix SMTP server. -If the list is empty, the server supports all available TLS protocol -versions. A non-empty value is a list of protocol names separated -by whitespace, commas or colons. The supported protocol names are -"SSLv2", "SSLv3" and "TLSv1", and are not case sensitive. +.SH smtpd_tls_mandatory_ciphers (default: medium) +The minimum TLS cipher grade that the Postfix SMTP server will +use with mandatory +TLS encryption. Cipher types listed in smtpd_tls_mandatory_exclude_ciphers +or smtpd_tls_exclude_ciphers are excluded from the base definition +of the selected cipher grade. With opportunistic TLS encryption, +the "export" grade is used unconditionally with exclusions specified +only via smtpd_tls_exclude_ciphers. .PP -DO NOT set this to a non-default value on an Internet MX host, -as this may cause inter-operability problems. If you restrict the -protocol list on an Internet MX host, you may lose mail. +The following cipher grades are supported: +.IP "\fBexport\fR" +Enable the mainstream "EXPORT" grade or better OpenSSL ciphers. +This is the most appropriate setting for public MX hosts, and is always +used with opportunistic TLS encryption. The underlying cipherlist +is specified via the tls_export_cipherlist configuration parameter, +which you are strongly encouraged to not change. The default value +of tls_export_cipherlist includes anonymous ciphers, but these are +automatically filtered out if the server is configured to ask for +client certificates. If you must always exclude anonymous ciphers, +set "smtpd_tls_exclude_ciphers = aNULL". To exclude anonymous ciphers +only when TLS is enforced, set "smtpd_tls_mandatory_exclude_ciphers = +aNULL". +.IP "\fBlow\fR" +Enable the mainstream "LOW" grade or better OpenSSL ciphers. The +underlying cipherlist is specified via the tls_low_cipherlist +configuration parameter, which you are strongly encouraged to +not change. The default value of tls_low_cipherlist includes +anonymous ciphers, but these are automatically filtered out if the +server is configured to ask for client certificates. If you must +always exclude anonymous ciphers, set "smtpd_tls_exclude_ciphers = +aNULL". To exclude anonymous ciphers only when TLS is enforced, set +"smtpd_tls_mandatory_exclude_ciphers = aNULL". +.IP "\fBmedium\fR" +Enable the mainstream "MEDIUM" grade or better OpenSSL ciphers. These +are essentially the 128-bit or stronger ciphers. This is the default +minimum strength for mandatory TLS encryption. MSAs that enforce +TLS and have clients that do not support any "MEDIUM" or "HIGH" +grade ciphers, may need to configure a weaker ("low" or "export") +minimum cipher grade. The underlying cipherlist is specified via the +tls_medium_cipherlist configuration parameter, which you are strongly +encouraged to not change. The default value of tls_medium_cipherlist +includes anonymous ciphers, but these are automatically filtered out if +the server is configured to ask for client certificates. If you must +always exclude anonymous ciphers, set "smtpd_tls_exclude_ciphers = +aNULL". To exclude anonymous ciphers only when TLS is enforced, set +"smtpd_tls_mandatory_exclude_ciphers = aNULL". +.IP "\fBhigh\fR" +Enable only the mainstream "HIGH" grade OpenSSL ciphers. The +underlying cipherlist is specified via the tls_high_cipherlist +configuration parameter, which you are strongly encouraged to +not change. The default value of tls_high_cipherlist includes +anonymous ciphers, but these are automatically filtered out if the +server is configured to ask for client certificates. If you must +always exclude anonymous ciphers, set "smtpd_tls_exclude_ciphers = +aNULL". To exclude anonymous ciphers only when TLS is enforced, set +"smtpd_tls_mandatory_exclude_ciphers = aNULL". +.IP "\fBnull\fR" +Enable only the "NULL" OpenSSL ciphers, these provide authentication +without encryption. This setting is only appropriate in the rare +case that all clients are prepared to use NULL ciphers (not normally +enabled in TLS clients). The underlying cipherlist is specified via the +tls_null_cipherlist configuration parameter, which you are strongly +encouraged to not change. The default value of tls_null_cipherlist +excludes anonymous ciphers (OpenSSL 0.9.8 has NULL ciphers that offer +data integrity without encryption or authentication). +.PP +This feature is available in Postfix 2.3 and later. +.SH smtpd_tls_mandatory_exclude_ciphers (default: empty) +Additional list of ciphers or cipher types to exclude from the +SMTP server cipher list at mandatory TLS security levels. This list +works in addition to the exclusions listed with smtpd_tls_exclude_ciphers +(see there for syntax details). +.PP +This feature is available in Postfix 2.3 and later. +.SH smtpd_tls_mandatory_protocols (default: SSLv3, TLSv1) +The TLS protocols accepted by the Postfix SMTP server with +mandatory TLS encryption. With opportunistic TLS encryption, all +protocols are always accepted. If the list is empty, the server +supports all available TLS protocol versions. A non-empty value +is a list of protocol names separated by whitespace, commas or +colons. The supported protocol names are "SSLv2", "SSLv3" and +"TLSv1", and are not case sensitive. .PP Example: .PP .nf .na .ft C -smtpd_tls_protocols = SSLv3, TLSv1 +smtpd_tls_mandatory_protocols = SSLv3, TLSv1 .fi .ad .ft R @@ -6755,7 +6790,7 @@ that was recorded by the final destination can be trusted. .PP This feature is available in Postfix 2.2 and later. .SH smtpd_tls_req_ccert (default: no) -When TLS encryption is enforced, require a remote SMTP client +With mandatory TLS encryption, require a remote SMTP client certificate in order to allow TLS connections to proceed. This option implies "smtpd_tls_ask_ccert = yes". .PP @@ -6794,6 +6829,8 @@ encrypt" implies "smtpd_tls_auth_only = yes". Note 3: when invoked via "sendmail -bs", Postfix will never offer STARTTLS due to insufficient privileges to access the server private key. This is intended behavior. +.PP +This feature is available in Postfix 2.3 and later. .SH smtpd_tls_session_cache_database (default: empty) Name of the file containing the optional Postfix SMTP server TLS session cache. Specify a database type that supports enumeration, @@ -6977,7 +7014,7 @@ bytes (equivalent to 256 bits) is sufficient to generate a 128bit This feature is available in Postfix 2.2 and later. .SH tls_export_cipherlist (default: ALL:+RC4:@STRENGTH) The OpenSSL cipherlist for "EXPORT" or higher grade ciphers. This -defines the meaning of the "export" setting in smtpd_tls_ciphers, +defines the meaning of the "export" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. This is the cipherlist for the opportunistic ("may") TLS client security level and is the default cipherlist for the SMTP server. You are @@ -6986,21 +7023,21 @@ strongly encouraged to not change this setting. This feature is available in Postfix 2.3 and later. .SH tls_high_cipherlist (default: !EXPORT:!LOW:!MEDIUM:ALL:+RC4:@STRENGTH) The OpenSSL cipherlist for "HIGH" grade ciphers. This defines -the meaning of the "high" setting in smtpd_tls_ciphers, +the meaning of the "high" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. You are strongly encouraged to not change this setting. .PP This feature is available in Postfix 2.3 and later. .SH tls_low_cipherlist (default: !EXPORT:ALL:+RC4:@STRENGTH) The OpenSSL cipherlist for "LOW" or higher grade ciphers. This defines -the meaning of the "low" setting in smtpd_tls_ciphers, +the meaning of the "low" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. You are strongly encouraged to not change this setting. .PP This feature is available in Postfix 2.3 and later. .SH tls_medium_cipherlist (default: !EXPORT:!LOW:ALL:+RC4:@STRENGTH) The OpenSSL cipherlist for "MEDIUM" or higher grade ciphers. This -defines the meaning of the "medium" setting in smtpd_tls_ciphers, +defines the meaning of the "medium" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. This is the default cipherlist for mandatory TLS encryption in the TLS client (with anonymous ciphers disabled when verifying server @@ -7011,7 +7048,7 @@ This feature is available in Postfix 2.3 and later. .SH tls_null_cipherlist (default: !aNULL:eNULL+kRSA) The OpenSSL cipherlist for "NULL" grade ciphers that provide authentication without encryption. This defines the meaning of the "null" -setting in smtpd_tls_ciphers, smtp_tls_mandatory_ciphers and +setting in smtpd_mandatory_tls_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. You are strongly encouraged to not change this setting. .PP diff --git a/postfix/man/man5/relocated.5 b/postfix/man/man5/relocated.5 index 67f42ad1c..e1d65a2d6 100644 --- a/postfix/man/man5/relocated.5 +++ b/postfix/man/man5/relocated.5 @@ -98,7 +98,7 @@ directed to a TCP-based server. For a description of regular expression lookup table syntax, see \fBregexp_table\fR(5) or \fBpcre_table\fR(5). For a description of the TCP client/server table lookup protocol, see \fBtcp_table\fR(5). -This feature is not available up to and including Postfix version 2.2. +This feature is not available up to and including Postfix version 2.3. Each pattern is a regular expression that is applied to the entire address being looked up. Thus, \fIuser@domain\fR mail addresses are not @@ -119,7 +119,7 @@ pattern can be interpolated as \fB$1\fR, \fB$2\fR and so on. This section describes how the table lookups change when lookups are directed to a TCP-based server. For a description of the TCP client/server lookup protocol, see \fBtcp_table\fR(5). -This feature is not available up to and including Postfix version 2.2. +This feature is not available up to and including Postfix version 2.3. Each lookup operation uses the entire address once. Thus, \fIuser@domain\fR mail addresses are not broken up into their diff --git a/postfix/man/man5/transport.5 b/postfix/man/man5/transport.5 index e9a286495..e37cfe151 100644 --- a/postfix/man/man5/transport.5 +++ b/postfix/man/man5/transport.5 @@ -249,7 +249,7 @@ pattern can be interpolated as \fB$1\fR, \fB$2\fR and so on. This section describes how the table lookups change when lookups are directed to a TCP-based server. For a description of the TCP client/server lookup protocol, see \fBtcp_table\fR(5). -This feature is not available up to and including Postfix version 2.2. +This feature is not available up to and including Postfix version 2.3. Each lookup operation uses the entire recipient address once. Thus, \fIsome.domain.hierarchy\fR is not looked up via its parent domains, diff --git a/postfix/man/man5/virtual.5 b/postfix/man/man5/virtual.5 index 804ae9d62..0ea07d0af 100644 --- a/postfix/man/man5/virtual.5 +++ b/postfix/man/man5/virtual.5 @@ -221,7 +221,7 @@ pattern can be interpolated as \fB$1\fR, \fB$2\fR and so on. This section describes how the table lookups change when lookups are directed to a TCP-based server. For a description of the TCP client/server lookup protocol, see \fBtcp_table\fR(5). -This feature is not available up to and including Postfix version 2.2. +This feature is not available up to and including Postfix version 2.3. Each lookup operation uses the entire address once. Thus, \fIuser@domain\fR mail addresses are not broken up into their diff --git a/postfix/man/man8/bounce.8 b/postfix/man/man8/bounce.8 index ab5e86583..0e100933b 100644 --- a/postfix/man/man8/bounce.8 +++ b/postfix/man/man8/bounce.8 @@ -95,6 +95,10 @@ file or \fBbounce\fR(8) logfile. .IP "\fBipc_timeout (3600s)\fR" The time limit for sending or receiving information over an internal communication channel. +.IP "\fBinternal_mail_filter_classes (empty)\fR" +What categories of Postfix-generated mail are subject to +before-queue content inspection by non_smtpd_milters, header_checks +and body_checks. .IP "\fBmail_name (Postfix)\fR" The mail system name that is displayed in Received: headers, in the SMTP greeting banner, and in bounced mail. diff --git a/postfix/man/man8/smtp.8 b/postfix/man/man8/smtp.8 index cdb5fb019..942f20c76 100644 --- a/postfix/man/man8/smtp.8 +++ b/postfix/man/man8/smtp.8 @@ -192,12 +192,12 @@ Available in Postfix version 2.2 and later: .IP "\fBsmtp_discard_ehlo_keyword_address_maps (empty)\fR" Lookup tables, indexed by the remote SMTP server address, with case insensitive lists of EHLO keywords (pipelining, starttls, auth, -etc.) that the SMTP client will ignore in the EHLO response from a +etc.) that the Postfix SMTP client will ignore in the EHLO response from a remote SMTP server. .IP "\fBsmtp_discard_ehlo_keywords (empty)\fR" A case insensitive list of EHLO keywords (pipelining, starttls, -auth, etc.) that the SMTP client will ignore in the EHLO response -from a remote SMTP server. +auth, etc.) that the Postfix SMTP client will ignore in the EHLO +response from a remote SMTP server. .IP "\fBsmtp_generic_maps (empty)\fR" Optional lookup tables that perform address rewriting in the SMTP client, typically to transform a locally valid address into @@ -238,8 +238,8 @@ The maximal recursion level that the MIME processor will handle. .fi Available in Postfix version 2.1 and later: .IP "\fBsmtp_send_xforward_command (no)\fR" -Send the non-standard XFORWARD command when the Postfix SMTP server EHLO -response announces XFORWARD support. +Send the non-standard XFORWARD command when the Postfix SMTP server +EHLO response announces XFORWARD support. .SH "SASL AUTHENTICATION CONTROLS" .na .nf @@ -263,11 +263,12 @@ server's list of offered SASL mechanisms. .PP Available in Postfix version 2.3 and later: .IP "\fBsmtp_sasl_auth_enforce (yes)\fR" -Defer mail delivery when an SMTP server does not support SASL -authentication, while smtp_sasl_password_maps contains SASL -login/password information for that server. +If sender-dependent SASL passwords are turned off, defer mail +delivery when an SMTP server does not support SASL authentication, +while smtp_sasl_password_maps contains SASL login/password information +for that server. .IP "\fBsmtp_sender_dependent_authentication (no)\fR" -Enable sender-dependent authentication in the SMTP client; this is +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 different senders will use the appropriate credentials. @@ -305,15 +306,16 @@ certificate. .IP "\fBsmtp_tls_cert_file (empty)\fR" File with the Postfix SMTP client RSA certificate in PEM format. .IP "\fBsmtp_tls_mandatory_ciphers (medium)\fR" -The minimum SMTP client TLS cipher grade that is strong enough to -be used with the "encrypt" security level and higher. +The minimum TLS cipher grade that the Postfix SMTP client will +use with +mandatory TLS encryption. .IP "\fBsmtp_tls_exclude_ciphers (empty)\fR" -List of ciphers or cipher types to exclude from the SMTP client cipher -list at all security levels. +List of ciphers or cipher types to exclude from the Postfix +SMTP client cipher +list at all TLS security levels. .IP "\fBsmtp_tls_mandatory_exclude_ciphers (empty)\fR" -List of ciphers or cipher types to exclude from the SMTP client -cipher list at the mandatory TLS security levels: "encrypt", "verify" -and "secure". +Additional list of ciphers or cipher types to exclude from the +SMTP client cipher list at mandatory TLS security levels. .IP "\fBsmtp_tls_dcert_file (empty)\fR" File with the Postfix SMTP client DSA certificate in PEM format. .IP "\fBsmtp_tls_dkey_file ($smtp_tls_dcert_file)\fR" @@ -325,13 +327,6 @@ Enable additional Postfix SMTP client logging of TLS activity. .IP "\fBsmtp_tls_note_starttls_offer (no)\fR" Log the hostname of a remote SMTP server that offers STARTTLS, when TLS is not already enabled for that server. -.IP "\fBsmtp_tls_policy_maps (empty)\fR" -Optional lookup tables with the Postfix SMTP client TLS security -policy by next-hop destination; when a non-empty value is specified, -this overrides the obsolete smtp_tls_per_site parameter. -.IP "\fBsmtp_tls_mandatory_protocols (SSLv3, TLSv1)\fR" -List of TLS protocol versions that are secure enough to be used -with the "encrypt" security level and higher. .IP "\fBsmtp_tls_scert_verifydepth (5)\fR" The verification depth for remote SMTP server certificates. .IP "\fBsmtp_tls_secure_cert_match (nexthop, dot-nexthop)\fR" @@ -382,12 +377,15 @@ STARTTLS support, otherwise send the mail in the clear. Enforcement mode: require that remote SMTP servers use TLS encryption, and never send mail in the clear. .IP "\fBsmtp_tls_enforce_peername (yes)\fR" -When TLS encryption is enforced, require that the remote SMTP +With mandatory TLS encryption, require that the remote SMTP server hostname matches the information in the remote SMTP server certificate. .IP "\fBsmtp_tls_per_site (empty)\fR" Optional lookup tables with the Postfix SMTP client TLS usage policy by next-hop destination and by remote SMTP server hostname. +.IP "\fBsmtp_tls_cipherlist (empty)\fR" +Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS +cipher list. .SH "RESOURCE AND RATE CONTROLS" .na .nf @@ -480,6 +478,10 @@ by the amount specified in $debug_peer_level. The recipient of postmaster notifications about mail delivery problems that are caused by policy, resource, software or protocol errors. +.IP "\fBinternal_mail_filter_classes (empty)\fR" +What categories of Postfix-generated mail are subject to +before-queue content inspection by non_smtpd_milters, header_checks +and body_checks. .IP "\fBnotify_classes (resource, software)\fR" The list of error classes that are reported to the postmaster. .SH "MISCELLANEOUS CONTROLS" @@ -526,17 +528,17 @@ The process name of a Postfix command or daemon process. The network interface addresses that this mail system receives mail on by way of a proxy or network address translation unit. .IP "\fBsmtp_bind_address (empty)\fR" -An optional numerical network address that the SMTP client should -bind to when making an IPv4 connection. +An optional numerical network address that the Postfix SMTP client +should bind to when making an IPv4 connection. .IP "\fBsmtp_bind_address6 (empty)\fR" -An optional numerical network address that the SMTP client should -bind to when making an IPv6 connection. +An optional numerical network address that the Postfix SMTP client +should bind to when making an IPv6 connection. .IP "\fBsmtp_helo_name ($myhostname)\fR" The hostname to send in the SMTP EHLO or HELO command. .IP "\fBlmtp_lhlo_name ($myhostname)\fR" The hostname to send in the LMTP LHLO command. .IP "\fBsmtp_host_lookup (dns)\fR" -What mechanisms when the SMTP client uses to look up a host's IP +What mechanisms when the Postfix SMTP client uses to look up a host's IP address. .IP "\fBsmtp_randomize_addresses (yes)\fR" Randomize the order of equal-preference MX host addresses. diff --git a/postfix/man/man8/smtpd.8 b/postfix/man/man8/smtpd.8 index 75f17799c..53ea25205 100644 --- a/postfix/man/man8/smtpd.8 +++ b/postfix/man/man8/smtpd.8 @@ -294,12 +294,10 @@ for authentication. .fi Detailed information about STARTTLS configuration may be found in the TLS_README document. -.IP "\fBsmtpd_use_tls (no)\fR" -Opportunistic TLS: announce STARTTLS support to SMTP clients, -but do not require that clients use TLS encryption. -.IP "\fBsmtpd_enforce_tls (no)\fR" -Mandatory TLS: announce STARTTLS support to SMTP clients, -and require that clients use TLS encryption. +.IP "\fBsmtpd_tls_security_level (empty)\fR" +The SMTP TLS security level for the Postfix SMTP server; when +a non-empty value is specified, this overrides the obsolete parameters +smtpd_use_tls and smtpd_enforce_tls. .IP "\fBsmtpd_sasl_tls_security_options ($smtpd_sasl_security_options)\fR" The SASL authentication security options that the Postfix SMTP server uses for TLS encrypted SMTP sessions. @@ -322,11 +320,9 @@ connections. The verification depth for remote SMTP client certificates. .IP "\fBsmtpd_tls_cert_file (empty)\fR" File with the Postfix SMTP server RSA certificate in PEM format. -.IP "\fBsmtpd_tls_ciphers (export)\fR" -The minimum acceptable SMTP server TLS cipher grade. .IP "\fBsmtpd_tls_exclude_ciphers (empty)\fR" List of ciphers or cipher types to exclude from the SMTP server -cipher list. +cipher list at all TLS security levels. .IP "\fBsmtpd_tls_dcert_file (empty)\fR" File with the Postfix SMTP server DSA certificate in PEM format. .IP "\fBsmtpd_tls_dh1024_param_file (empty)\fR" @@ -341,15 +337,23 @@ File with the Postfix SMTP server DSA private key in PEM format. File with the Postfix SMTP server RSA private key in PEM format. .IP "\fBsmtpd_tls_loglevel (0)\fR" Enable additional Postfix SMTP server logging of TLS activity. -.IP "\fBsmtpd_tls_protocols (empty)\fR" -The list of TLS protocols supported by the Postfix SMTP server. +.IP "\fBsmtpd_tls_mandatory_ciphers (medium)\fR" +The minimum TLS cipher grade that the Postfix SMTP server will +use with mandatory +TLS encryption. +.IP "\fBsmtpd_tls_mandatory_exclude_ciphers (empty)\fR" +Additional list of ciphers or cipher types to exclude from the +SMTP server cipher list at mandatory TLS security levels. +.IP "\fBsmtpd_tls_mandatory_protocols (SSLv3, TLSv1)\fR" +The TLS protocols accepted by the Postfix SMTP server with +mandatory TLS encryption. .IP "\fBsmtpd_tls_received_header (no)\fR" Request that the Postfix SMTP server produces Received: message headers that include information about the protocol and cipher used, as well as the client CommonName and client certificate issuer CommonName. .IP "\fBsmtpd_tls_req_ccert (no)\fR" -When TLS encryption is enforced, require a remote SMTP client +With mandatory TLS encryption, require a remote SMTP client certificate in order to allow TLS connections to proceed. .IP "\fBsmtpd_tls_session_cache_database (empty)\fR" Name of the file containing the optional Postfix SMTP server @@ -364,12 +368,6 @@ instead of using the STARTTLS command. The number of pseudo-random bytes that an \fBsmtp\fR(8) or \fBsmtpd\fR(8) process requests from the \fBtlsmgr\fR(8) server in order to seed its internal pseudo random number generator (PRNG). -.PP -Available in Postfix version 2.3 and later: -.IP "\fBsmtpd_tls_security_level (empty)\fR" -The SMTP TLS security level for the Postfix SMTP server; when -a non-empty value is specified, this overrides the obsolete parameters -smtpd_use_tls and smtpd_enforce_tls. .IP "\fBtls_high_cipherlist (!EXPORT:!LOW:!MEDIUM:ALL:+RC4:@STRENGTH)\fR" The OpenSSL cipherlist for "HIGH" grade ciphers. .IP "\fBtls_medium_cipherlist (!EXPORT:!LOW:ALL:+RC4:@STRENGTH)\fR" @@ -381,6 +379,23 @@ The OpenSSL cipherlist for "EXPORT" or higher grade ciphers. .IP "\fBtls_null_cipherlist (!aNULL:eNULL+kRSA)\fR" The OpenSSL cipherlist for "NULL" grade ciphers that provide authentication without encryption. +.SH "OBSOLETE STARTTLS CONTROLS" +.na +.nf +.ad +.fi +The following configuration parameters exist for compatibility +with Postfix versions before 2.3. Support for these will +be removed in a future release. +.IP "\fBsmtpd_use_tls (no)\fR" +Opportunistic TLS: announce STARTTLS support to SMTP clients, +but do not require that clients use TLS encryption. +.IP "\fBsmtpd_enforce_tls (no)\fR" +Mandatory TLS: announce STARTTLS support to SMTP clients, +and require that clients use TLS encryption. +.IP "\fBsmtpd_tls_cipherlist (empty)\fR" +Obsolete Postfix < 2.3 control for the Postfix SMTP server TLS +cipher list. .SH "VERP SUPPORT CONTROLS" .na .nf @@ -427,6 +442,10 @@ by the amount specified in $debug_peer_level. The recipient of postmaster notifications about mail delivery problems that are caused by policy, resource, software or protocol errors. +.IP "\fBinternal_mail_filter_classes (empty)\fR" +What categories of Postfix-generated mail are subject to +before-queue content inspection by non_smtpd_milters, header_checks +and body_checks. .IP "\fBnotify_classes (resource, software)\fR" The list of error classes that are reported to the postmaster. .IP "\fBsoft_bounce (no)\fR" @@ -543,7 +562,7 @@ before it is flushed upon receipt of EHLO, RSET, or end of DATA. .PP Available in Postfix version 2.3 and later: .IP "\fBsmtpd_peername_lookup (yes)\fR" -Attempt to look up the SMTP client hostname, and verify that +Attempt to look up the Postfix SMTP client hostname, and verify that the name matches the client IP address. .PP The per SMTP client connection count and request rate limits are diff --git a/postfix/mantools/postlink b/postfix/mantools/postlink index cebb2798b..57e3c8a43 100755 --- a/postfix/mantools/postlink +++ b/postfix/mantools/postlink @@ -182,6 +182,7 @@ while (<>) { s;\bhopcount_limit\b;$&;g; s;\bhtml_direc[-]*\n*[By default, address verification results are not saved. To avoid +probing the same address repeatedly, you can store the result in a +persistent database as described later.
+@@ -633,6 +634,13 @@ after-filter smtpd process, so that filtered mail is logged with the real client name IP address. See smtp(8) and XFORWARD_README for more information. +/etc/postfix/main.cf: diff --git a/postfix/proto/FILTER_README.html b/postfix/proto/FILTER_README.html index 7161a05f6..fb7679144 100644 --- a/postfix/proto/FILTER_README.html +++ b/postfix/proto/FILTER_README.html @@ -615,6 +615,7 @@ how one would set up the service in the Postfix master.cf file: # ============================================================= scan unix - - n - 10 smtp -o smtp_send_xforward_command=yes + -o disable_mime_output_conversion=yes
With "-o disable_mime_output_conversion=yes", the scan +delivery agent will not convert 8BITMIME mail to quoted-printable +form while delivering to the content filter, as that would invalidate +domainkeys and other digital signatures. This workaround is needed +because some SMTP-based content filters don't announce 8BITMIME +support, even though they can handle it just fine.
+Postfix 2.3 implements all the requests of Sendmail version 8 Milter protocols up to version 4, except one: message body replacement. -See, however, the limitations section -at the end of this document.
+See, however, the workarounds and limitations sections at the end of this +document.This document provides information on the following topics:
@@ -337,7 +338,7 @@ Connect to the specified TCP port on the specified local or remote host. The host and port can be specified in numeric or symbolic form. -Note: Postfix syntax differs from Milter syntax which has the +
NOTE: Postfix syntax differs from Milter syntax which has the form inet:port@host.
Content filters may break domain key etc. signatures. If you +use an SMTP-based filter as described in FILTER_README, then you +should add a line to master.cf with "disable_mime_output_conversion += yes", as described in the advanced content filter +example.
+Sendmail Milter applications were originally developed for the Sendmail version 8 MTA, which has a different architecture than Postfix. The result is that some Milter applications make assumptions @@ -618,6 +626,10 @@ that aren't true in a Postfix environment.
Some Milter applications use the "{if_addr}" macro +to recognize local mail; this macro does not exist in Postfix. +Workaround: use the "{client_addr}" macro instead.
+Some Milter applications log a warning that looks like this:
@@ -635,13 +647,14 @@ X-SenderID: Sendmail Sender-ID Filter vx.y.z host.example.com <unknown-msgid& -This happens because the Milter application expects that the +
This happens because some Milter applications expect that the queue ID is known before the MTA accepts the MAIL FROM -(sender) command. Postfix, on the other hand, does not create a -queue file until after Postfix accepts the first valid RCPT -TO (recipient) command. This queue file name must be globally unique -across multiple queue directories, so it cannot be chosen until the -file is actually created.
+(sender) command. Postfix, on the other hand, does not choose a +queue file name until after it accepts the first valid RCPT +TO (recipient) command. Postfix queue file names must be unique +across multiple directories, so the name can't be chosen before the +file is created. If multiple messages were to use the same queue +ID simultaneously, mail would be lost.To work around the ugly message header from Milter applications, we add a little code to the Milter source to look up the queue ID @@ -659,21 +672,32 @@ the top shown as bold text below:
--sic = (Context) smfi_getpriv(ctx); -assert(sic != NULL); +dfc = cc->cctx_msg; +assert(dfc != NULL); -/* -** Determine the job ID for logging. -*/ -if (sic->ctx_jobid == 0 || strcmp(sic->ctx_jobid, MSGIDUNKNOWN) == 0) { +/* Determine the job ID for logging. */ +if (dfc->mctx_jobid == 0 || strcmp(dfc->mctx_jobid, JOBIDUNKNOWN) == 0) { char *jobid = smfi_getsymval(ctx, "i"); if (jobid != 0) - sic->ctx_jobid = jobid; + dfc->mctx_jobid = jobid; } + +/* get hostname; used in the X header and in new MIME boundaries */
This does not remove the WARNING message, however.
+NOTES:
+ +Different mail filters use slightly different names for +variables. If the above code does not compile, look for the code +at the start of the mlfi_eoh() routine.
+ +This fixes only the ugly message header, but not the WARNING +message. Fortunately, dk-filter logs that message only once.
+ +With some Milter applications we can fix both the WARNING and the "unknown-msgid" by postponing the call of mlfi_eoh() diff --git a/postfix/proto/TLS_README.html b/postfix/proto/TLS_README.html index d4b5f73da..249e3b22c 100644 --- a/postfix/proto/TLS_README.html +++ b/postfix/proto/TLS_README.html @@ -247,7 +247,7 @@ back to plain text after a TLS handshake failure, the server will be unable to receive email from most TLS enabled clients. To avoid accidental configurations with no certificates, Postfix 2.3 enables certificate-less operation only when the administrator explicitly sets -"smtpd_tls_cert_file = none". This ensures that new Postfix +"smtpd_tls_cert_file = none". This ensures that new Postfix configurations will not accidentally run with no certificates.
Both RSA and DSA certificates are supported. Typically you will @@ -436,8 +436,8 @@ since the headers may be changed by intermediate servers.
By default, TLS is disabled in the Postfix SMTP server, so no difference to plain Postfix is visible. Explicitly switch it on -with "smtpd_tls_security_level = may" (Postfix 2.3 and -later) or "smtpd_use_tls = yes" (obsolete but still +with "smtpd_tls_security_level = may" (Postfix 2.3 and +later) or "smtpd_use_tls = yes" (obsolete but still supported).
Example:
@@ -463,8 +463,8 @@ private key. This is intended behavior.You can ENFORCE the use of TLS, so that the Postfix SMTP server announces STARTTLS and accepts no mail without TLS encryption, by setting -"smtpd_tls_security_level = encrypt" (Postfix 2.3 and -later) or "smtpd_enforce_tls = yes" (obsolete but still +"smtpd_tls_security_level = encrypt" (Postfix 2.3 and +later) or "smtpd_enforce_tls = yes" (obsolete but still supported). According to RFC 2487 this MUST NOT be applied in case of a publicly-referenced Postfix SMTP server. This option is off by default and should only seldom be used.
@@ -490,7 +490,7 @@ and OE (5.01 Mac on all ports).It is strictly discouraged to use this mode from main.cf. If you want to support this service, enable a special port in master.cf -and specify "-o smtpd_tls_wrappermode = yes" as an smtpd(8) command +and specify "-o smtpd_tls_wrappermode = yes" as an smtpd(8) command line option. Port 465 (smtps) was once chosen for this feature.
@@ -536,9 +536,9 @@ when the server is configured to ask for client certificates.When TLS is enforced you may also decide to REQUIRE a remote SMTP client certificate for all TLS connections, -by setting "smtpd_tls_req_ccert = yes". This feature implies -"smtpd_tls_ask_ccert = yes". When TLS is not enforced, -"smtpd_tls_req_ccert = yes" is ignored and a warning is +by setting "smtpd_tls_req_ccert = yes". This feature implies +"smtpd_tls_ask_ccert = yes". When TLS is not enforced, +"smtpd_tls_req_ccert = yes" is ignored and a warning is logged.
Example:
@@ -573,16 +573,16 @@ CA issues special CA which then issues the actual certificate...)Sending AUTH data over an unencrypted channel poses a security risk. When TLS layer encryption is required -("smtpd_tls_security_level = encrypt" or the obsolete -"smtpd_enforce_tls = yes"), the Postfix SMTP server will +("smtpd_tls_security_level = encrypt" or the obsolete +"smtpd_enforce_tls = yes"), the Postfix SMTP server will announce and accept AUTH only after the TLS layer has been activated with STARTTLS. When TLS layer encryption is optional -("smtpd_tls_security_level = may" or the obsolete -"smtpd_enforce_tls = no"), it may however still be useful +("smtpd_tls_security_level = may" or the obsolete +"smtpd_enforce_tls = no"), it may however still be useful to only offer AUTH when TLS is active. To maintain compatibility with non-TLS clients, the default is to accept AUTH without encryption. In order to change this behavior, set -"smtpd_tls_auth_only = yes".
+"smtpd_tls_auth_only = yes".Example:
@@ -707,36 +707,44 @@ the user or host.The description below is for Postfix 2.3; for Postfix < 2.3 the smtpd_tls_cipherlist parameter specifies the acceptable ciphers as an -explicit OpenSSL cipherlist.
+explicit OpenSSL cipherlist. The obsolete setting applies even when TLS +encryption is not enforced. Use of this control on public MX hosts is +strongly discouraged. + +With mandatory TLS encryption, the Postfix SMTP server will by +default only use SSLv3 or TLSv1. SSLv2 is only used when TLS encryption +is optional. This is controlled by the smtpd_tls_mandatory_protocols +configuration parameter.
The Postfix SMTP server supports 5 distinct cipher security levels -as specified by the smtpd_tls_ciphers configuration parameter. The -default value is "export" which is the only one appropriate for public -MX hosts. On private MX hosts or MSAs one can further restrict the -OpenSSL cipherlist selection.
+as specified by the smtpd_tls_mandatory_ciphers configuration parameter, +which determines the cipher grade with mandatory TLS encryption. The +default value is "medium" which is essentially 128-bit encryption or better. +With opportunistic TLS encryption, the minimum accepted cipher grade is +always "export".By default anonymous ciphers are allowed, and automatically disabled when client certificates are requested. If clients are expected to always verify the server certificate you may want to exclude anonymous ciphers -by setting "smtpd_tls_exclude_ciphers = aNULL". One can't -force a client to check the server certificate, so excluding anonymous -ciphers is generally unnecessary.
+by setting "smtpd_tls_mandatory_exclude_ciphers = aNULL". +One can't force a client to check the server certificate, so excluding +anonymous ciphers is generally unnecessary.For a server that is not a public Internet MX host, Postfix 2.3 supports configurations with no server certificates that use only the anonymous ciphers. This is -enabled by explicitly setting "smtpd_tls_cert_file = none" +enabled by explicitly setting "smtpd_tls_cert_file = none" and not specifying an smtpd_tls_dcert_file.
-Example: (MSA that requires TLS with reasonably secure ciphers)
+Example: (MSA that requires TLS with high grade ciphers)
/etc/postfix/main.cf: smtpd_tls_cert_file = /etc/postfix/cert.pem smtpd_tls_key_file = /etc/postfix/key.pem - smtpd_tls_ciphers = medium - smtpd_tls_exclude_ciphers = aNULL, MD5 + smtpd_tls_mandatory_ciphers = high + smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5 # Postfix 2.3 and later smtpd_tls_security_level = encrypt # Obsolete, but still supported @@ -1186,11 +1194,11 @@ in the sections that follow.At the "none" TLS security level, TLS encryption is disabled. This is the default security level. With Postfix 2.3 and later, -it can be configured explicitly by setting "smtp_tls_security_level = none".
+it can be configured explicitly by setting "smtp_tls_security_level = none".With Postfix 2.2 and earlier, or when smtp_tls_security_level is set to its default (backwards compatible) empty value, the appropriate configuration -settings are "smtp_use_tls = no" and "smtp_enforce_tls = no". +settings are "smtp_use_tls = no" and "smtp_enforce_tls = no". With either approach, TLS is not used even if supported by the server. For LMTP, use the corresponding "lmtp_" parameters.
@@ -1211,7 +1219,7 @@ table, specify the "NONE" keyword. The SMTP transaction is encrypted if the STARTTLS ESMTP feature is supported by the server. Otherwise, messages are sent in the clear. With Postfix 2.3 and later, opportunistic TLS can be configured by -setting "smtp_tls_security_level = may". +setting "smtp_tls_security_level = may".Since sending in the clear is acceptable, demanding stronger than default TLS security merely reduces inter-operability. For @@ -1222,9 +1230,9 @@ better ciphers are used.
With Postfix 2.2 and earlier, or when smtp_tls_security_level is set to its default (backwards compatible) empty value, the appropriate -configuration settings are "smtp_use_tls = yes" and -"smtp_enforce_tls = no". -For LMTP use the corresponding "lmtp" parameters.
+configuration settings are "smtp_use_tls = yes" and +"smtp_enforce_tls = no". +For LMTP use the corresponding "lmtp_" parameters.With opportunistic TLS, mail delivery continues even if the server certificate is untrusted or bears the wrong name. Starting @@ -1280,7 +1288,7 @@ over TLS encrypted sessions. The SMTP transaction is aborted unless the STARTTLS ESMTP feature is supported by the server. If no suitable servers are found, the message will be deferred. With Postfix 2.3 and later, mandatory TLS encryption can be configured by setting -"smtp_tls_security_level = encrypt". Even though TLS +"smtp_tls_security_level = encrypt". Even though TLS encryption is always used, mail delivery continues if the server certificate is untrusted or bears the wrong name.
@@ -1294,9 +1302,9 @@ parameters includes useful interoperability and security guidelines.With Postfix 2.2 and earlier, or when smtp_tls_security_level is set to its default (backwards compatible) empty value, the -appropriate configuration settings are "smtp_enforce_tls = yes" -and "smtp_tls_enforce_peername = no". For LMTP use the corresponding -lmtp_ parameters.
+appropriate configuration settings are "smtp_enforce_tls = yes" +and "smtp_tls_enforce_peername = no". For LMTP use the corresponding +"lmtp_" parameters.Despite the potential for eliminating passive eavesdropping attacks, mandatory TLS encryption is not viable as a default security level for @@ -1407,7 +1415,7 @@ TLS encrypted sessions if the server certificate is valid (not expired or revoked, and signed by a trusted certificate authority) and if the server certificate name matches a known pattern. Mandatory server certificate verification can be configured by setting -"smtp_tls_security_level = verify". The +"smtp_tls_security_level = verify". The smtp_tls_verify_cert_match parameter can override the default "hostname" certificate name matching strategy. Fine-tuning the matching strategy is generally only appropriate for secure-channel destinations.
With Postfix 2.2 and earlier, or when smtp_tls_security_level is set to its default (backwards compatible) empty value, the -appropriate configuration settings are "smtp_enforce_tls = yes" and -"smtp_tls_enforce_peername = yes". For LMTP use the corresponding -lmtp_ parameters.
+appropriate configuration settings are "smtp_enforce_tls = yes" and +"smtp_tls_enforce_peername = yes". For LMTP use the corresponding +"lmtp_" parameters.If the server certificate chain is trusted (see smtp_tls_CAfile and smtp_tls_CApath), any DNS names in the SubjectAlternativeName @@ -1491,16 +1499,16 @@ to example.com recipients uses "high" grade ciphers.
secure-channel TLS sessions where DNS forgery resistant server certificate verification succeeds. If no suitable servers are found, the message will be deferred. With Postfix 2.3 and later, secure-channels -can be configured by setting "smtp_tls_security_level = secure". +can be configured by setting "smtp_tls_security_level = secure". The smtp_tls_secure_cert_match parameter can override the default "nexthop, dot-nexthop" certificate match strategy.With Postfix 2.2 and earlier, or when smtp_tls_security_level is set to its default (backwards compatible) empty value, the -appropriate configuration settings are "smtp_enforce_tls = yes" -and "smtp_tls_enforce_peername = yes" with additional settings to +appropriate configuration settings are "smtp_enforce_tls = yes" +and "smtp_tls_enforce_peername = yes" with additional settings to harden peer certificate verification -against forged DNS data. For LMTP, use the corresponding lmtp_ +against forged DNS data. For LMTP, use the corresponding "lmtp_" parameters.
If the server certificate chain is trusted (see smtp_tls_CAfile and @@ -1854,7 +1862,7 @@ settings.
When neither the remote SMTP server hostname nor the next-hop destination are found in the smtp_tls_per_site table, the policy is based on smtp_use_tls, smtp_enforce_tls and -smtp_tls_enforce_peername. Note: "smtp_enforce_tls = yes" and -"smtp_tls_enforce_peername = yes" imply "smtp_use_tls = yes".
+smtp_tls_enforce_peername. Note: "smtp_enforce_tls = yes" and +"smtp_tls_enforce_peername = yes" imply "smtp_use_tls = yes".When both hostname and next-hop destination lookups produce a result, the more specific per-site policy (NONE, MUST, etc) @@ -1891,7 +1899,7 @@ policy (MUST, etc) overrides the less secure one (NONE).
After the per-site policy lookups are combined, the result generally overrides the global policy. The exception is the less specific "MAY" per-site policy, which is overruled by the more -specific global "smtp_enforce_tls = yes" with server certificate +specific global "smtp_enforce_tls = yes" with server certificate verification as specified with the smtp_tls_enforce_peername parameter.
@@ -1929,7 +1937,7 @@ server hostname that is used for TLS policy lookup and server certificate verification.Disallow CNAME hostname overrides. In main.cf, specify -"smtp_cname_overrides_servername = no". This prevents false hostname +"smtp_cname_overrides_servername = no". This prevents false hostname information in DNS CNAME records from changing the server hostname that Postfix uses for TLS policy lookup and server certificate verification. This feature requires Postfix 2.2.9 or later. The @@ -2025,14 +2033,14 @@ methods. See smtp_tls_policy_maps for information on how to configure ciphers on a per-destination basis.
By default anonymous ciphers are allowed, and automatically -disabled when server certificates are verified. If you -want to disable even at the "encrypt" security level, set -"smtp_tls_mandatory_exclude_ciphers = aNULL", -to disable anonymous ciphers even with opportunistic TLS, set -"smtp_tls_exclude_ciphers = aNULL". There is generally no -need to take these measures. Anonymous ciphers save bandwidth and TLS -session cache space, if certificates are ignored, there is little point -in requesting them.
+disabled when server certificates are verified. If you want to +disable anonymous ciphers even at the "encrypt" security level, set +"smtp_tls_mandatory_exclude_ciphers = aNULL"; and to +disable anonymous ciphers even with opportunistic TLS, set +"smtp_tls_exclude_ciphers = aNULL". There is generally +no need to take these measures. Anonymous ciphers save bandwidth +and TLS session cache space, if certificates are ignored, there is +little point in requesting them.Example:
@@ -2336,14 +2344,14 @@ generation (PRNG) pool, and in order to access the TLS session cache databases. Such a protocol cannot be run across fifos.smtp_tls_per_site: the MUST_NOPEERMATCH per-site policy -cannot override the global "smtp_tls_enforce_peername = yes" setting. +cannot override the global "smtp_tls_enforce_peername = yes" setting.
smtp_tls_per_site: a combined (NONE + MAY) lookup result for (hostname and next-hop destination) produces counter-intuitive results for different main.cf settings. TLS is enabled with -"smtp_tls_enforce_peername = no", but it is disabled when both -"smtp_enforce_tls = yes" and "smtp_tls_enforce_peername = yes". +"smtp_tls_enforce_peername = no", but it is disabled when both +"smtp_enforce_tls = yes" and "smtp_tls_enforce_peername = yes".
diff --git a/postfix/proto/access b/postfix/proto/access index 7491acd62..2e2af8615 100644 --- a/postfix/proto/access +++ b/postfix/proto/access @@ -339,7 +339,7 @@ # This section describes how the table lookups change when lookups # are directed to a TCP-based server. For a description of the TCP # client/server lookup protocol, see \fBtcp_table\fR(5). -# This feature is not available up to and including Postfix version 2.2. +# This feature is not available up to and including Postfix version 2.3. # # Each lookup operation uses the entire query string once. # Depending on the application, that string is an entire client diff --git a/postfix/proto/canonical b/postfix/proto/canonical index 30d99fec3..1aeb6e752 100644 --- a/postfix/proto/canonical +++ b/postfix/proto/canonical @@ -146,7 +146,7 @@ # This section describes how the table lookups change when lookups # are directed to a TCP-based server. For a description of the TCP # client/server lookup protocol, see \fBtcp_table\fR(5). -# This feature is not available up to and including Postfix version 2.2. +# This feature is not available up to and including Postfix version 2.3. # # Each lookup operation uses the entire address once. Thus, # \fIuser@domain\fR mail addresses are not broken up into their diff --git a/postfix/proto/generic b/postfix/proto/generic index 8a0e8e972..d19dfde45 100644 --- a/postfix/proto/generic +++ b/postfix/proto/generic @@ -130,7 +130,7 @@ # This section describes how the table lookups change when lookups # are directed to a TCP-based server. For a description of the TCP # client/server lookup protocol, see \fBtcp_table\fR(5). -# This feature is not available up to and including Postfix version 2.2. +# This feature is not available up to and including Postfix version 2.3. # # Each lookup operation uses the entire address once. Thus, # \fIuser@domain\fR mail addresses are not broken up into their diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index 19233b2e3..f233c4662 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -608,7 +608,8 @@ the Postfix SMTP client returns such mail as undeliverable.Specify, for example, "best_mx_transport = local" to pass the mail -from the SMTP client to the local(8) delivery agent. You can specify +from the Postfix SMTP client to the local(8) delivery agent. You +can specify any message delivery "transport" or "transport:nexthop" that is defined in the master.cf file. See the transport(5) manual page for the syntax and meaning of "transport" or "transport:nexthop". @@ -1703,7 +1704,8 @@ for IPv6.
A better solution for multi-homed firewalls is to leave inet_interfaces at the default value and instead use explicit IP addresses in -the master.cf SMTP server definitions. This preserves the SMTP client's +the master.cf SMTP server definitions. This preserves the Postfix +SMTP client's loop detection, by ensuring that each side of the firewall knows that the other IP address is still the same host. Setting $inet_interfaces to a single IPv4 and/or IPV6 address is primarily useful with virtual @@ -2070,8 +2072,8 @@ lists: Postfix needs to know only if a lookup string is found or not, but it does not use the result from table lookup.
-If this parameter is non-empty (the default), then the Postfix SMTP server -will reject mail for unknown local users. +If this parameter is non-empty (the default), then the Postfix SMTP +server will reject mail for unknown local users.
@@ -3498,8 +3500,8 @@ the word "ESMTP" appears in the server greeting banner (example: %PARAM smtp_bind_address
-An optional numerical network address that the SMTP client should -bind to when making an IPv4 connection. +An optional numerical network address that the Postfix SMTP client +should bind to when making an IPv4 connection.
@@ -3525,8 +3527,8 @@ but this form is not recommended here.
%PARAM smtp_bind_address6-An optional numerical network address that the SMTP client should -bind to when making an IPv6 connection. +An optional numerical network address that the Postfix SMTP client +should bind to when making an IPv6 connection.
This feature is available in Postfix 2.2 and later.
@@ -3673,7 +3675,8 @@ zero (use the operating system built-in time limit).-When no connection can be made within the deadline, the SMTP client +When no connection can be made within the deadline, the Postfix +SMTP client tries the next address on the mail exchanger list. Specify 0 to disable the time limit (i.e. use whatever timeout is implemented by the operating system). @@ -3718,7 +3721,7 @@ The default time unit is s (seconds).
The SMTP client time limit for sending the SMTP message content. When the connection makes no progress for more than $smtp_data_xfer_timeout -seconds the SMTP client terminates the transfer. +seconds the Postfix SMTP client terminates the transfer.
@@ -3864,7 +3867,7 @@ The default time unit is s (seconds). %PARAM smtp_host_lookup dns
-What mechanisms when the SMTP client uses to look up a host's IP +What mechanisms when the Postfix SMTP client uses to look up a host's IP address. This parameter is ignored when DNS lookups are disabled.
@@ -4123,8 +4126,8 @@ smtp_sasl_mechanism_filter = !gssapi, !login, static:rest %PARAM smtp_send_xforward_command no-Send the non-standard XFORWARD command when the Postfix SMTP server EHLO -response announces XFORWARD support. +Send the non-standard XFORWARD command when the Postfix SMTP server +EHLO response announces XFORWARD support.
@@ -7861,8 +7864,8 @@ and virtual_alias_maps.
%PARAM smtp_discard_ehlo_keywordsA case insensitive list of EHLO keywords (pipelining, starttls, -auth, etc.) that the SMTP client will ignore in the EHLO response -from a remote SMTP server.
+auth, etc.) that the Postfix SMTP client will ignore in the EHLO +response from a remote SMTP server.This feature is available in Postfix 2.2 and later.
@@ -7902,7 +7905,7 @@ to discard EHLO keywords selectively.Lookup tables, indexed by the remote SMTP server address, with case insensitive lists of EHLO keywords (pipelining, starttls, auth, -etc.) that the SMTP client will ignore in the EHLO response from a +etc.) that the Postfix SMTP client will ignore in the EHLO response from a remote SMTP server. See smtp_discard_ehlo_keywords for details. The table is not indexed by hostname for consistency with smtpd_discard_ehlo_keyword_address_maps.
@@ -8279,7 +8282,7 @@ may be annoying, so this option is "off" by default. %PARAM smtpd_tls_req_ccert no -When TLS encryption is enforced, require a remote SMTP client +
With mandatory TLS encryption, require a remote SMTP client certificate in order to allow TLS connections to proceed. This option implies "smtpd_tls_ask_ccert = yes".
@@ -8384,7 +8387,7 @@ clients.Note: do not use "" quotes around the parameter value.
This feature is available with Postfix version 2.2. It is not used with -Postfix 2.3 and later; use smtpd_tls_ciphers instead.
+Postfix 2.3 and later; use smtpd_tls_mandatory_ciphers instead. %PARAM smtpd_tls_dh1024_param_file @@ -8401,7 +8404,7 @@ openssl gendh -out /etc/postfix/dh_1024.pem -2 -rand /var/run/egd-pool 1024Your actual source for entropy may differ. Some systems have /dev/random; on other system you may consider using the "Entropy -Gathering Daemon EGD", available at http://www.lothar.com/tech/crypto/. +Gathering Daemon EGD", available at http://egd.sourceforge.net/
Example:
@@ -8636,7 +8639,7 @@ Postfix 2.3 and later use smtp_tls_security_level instead. %PARAM smtp_tls_enforce_peername yes -When TLS encryption is enforced, require that the remote SMTP +
With mandatory TLS encryption, require that the remote SMTP server hostname matches the information in the remote SMTP server certificate. As of RFC 2487 the requirements for hostname checking for MTA clients are not specified.
@@ -8753,7 +8756,7 @@ postfix/smtp[pid]: Host offered STARTTLS: [name.of.host] %PARAM smtp_tls_cipherlistObsolete Postfix < 2.3 control for the Postfix SMTP client TLS -cipher list. As this feature applies to all security levels, it is easy +cipher list. As this feature applies to all TLS security levels, it is easy to create inter-operability problems by choosing a non-default cipher list. Do not use a non-default TLS cipher list on hosts that deliver email to the public Internet: you will be unable to send email to servers that @@ -8938,7 +8941,7 @@ process instance while mail is being forwarded.
%PARAM smtpd_peername_lookup yes -Attempt to look up the SMTP client hostname, and verify that +
Attempt to look up the Postfix SMTP client hostname, and verify that the name matches the client IP address. A client name is set to "unknown" when it cannot be looked up or verified, or when name lookup is disabled. Turning off name lookup reduces delays due to @@ -9015,7 +9018,7 @@ This feature is available in Postfix 2.3 and later. %PARAM smtp_sender_dependent_authentication no
-Enable sender-dependent authentication in the SMTP client; this is +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 different senders will use the appropriate credentials.
@@ -9614,8 +9617,8 @@ configurations in environments where DNS security is not assured. %PARAM smtp_tls_mandatory_protocols SSLv3, TLSv1 -List of TLS protocol versions that are secure enough to be used -with the "encrypt" security level and higher. In main.cf the values +
List of TLS protocols that the Postfix SMTP client will use +with mandatory TLS encryption. In main.cf the values are separated by whitespace, commas or colons. In the policy table (see smtp_tls_policy_maps) the only valid separator is colon. An empty value means allow all protocols. The valid protocol names, @@ -9772,22 +9775,20 @@ configuration parameter. See there for details.
This feature is available in Postfix 2.3 and later.
-%PARAM smtpd_tls_protocols +%PARAM smtpd_tls_mandatory_protocols SSLv3, TLSv1 -The list of TLS protocols supported by the Postfix SMTP server. -If the list is empty, the server supports all available TLS protocol -versions. A non-empty value is a list of protocol names separated -by whitespace, commas or colons. The supported protocol names are -"SSLv2", "SSLv3" and "TLSv1", and are not case sensitive.
- -DO NOT set this to a non-default value on an Internet MX host, -as this may cause inter-operability problems. If you restrict the -protocol list on an Internet MX host, you may lose mail.
+The TLS protocols accepted by the Postfix SMTP server with +mandatory TLS encryption. With opportunistic TLS encryption, all +protocols are always accepted. If the list is empty, the server +supports all available TLS protocol versions. A non-empty value +is a list of protocol names separated by whitespace, commas or +colons. The supported protocol names are "SSLv2", "SSLv3" and +"TLSv1", and are not case sensitive.
Example:
-smtpd_tls_protocols = SSLv3, TLSv1 +smtpd_tls_mandatory_protocols = SSLv3, TLSv1
This feature is available in Postfix 2.3 and later.
@@ -10070,61 +10071,68 @@ meanings.This feature is available in Postfix 2.3 and later.
-%PARAM smtpd_tls_ciphers export +%PARAM smtpd_tls_mandatory_ciphers medium -The minimum acceptable SMTP server TLS cipher grade. It is easy to -create inter-operability problems by choosing a non-default cipher grade. -Do not use a stronger than default minimum cipher grade for MX hosts on -the public Internet. Clients that begin the TLS handshake, but are unable -to agree on a common cipher, may not be able to send any email to the -SMTP server. Using a restricted cipher list may be more appropriate for a -dedicated MSA or an internal mailhub, where one can exert some control over -the TLS software and settings of the connecting clients. Configurations -with no certificates are also not likely to inter-operate with most -clients, see the notes for "smtpd_tls_cert_file".
+The minimum TLS cipher grade that the Postfix SMTP server will +use with mandatory +TLS encryption. Cipher types listed in smtpd_tls_mandatory_exclude_ciphers +or smtpd_tls_exclude_ciphers are excluded from the base definition +of the selected cipher grade. With opportunistic TLS encryption, +the "export" grade is used unconditionally with exclusions specified +only via smtpd_tls_exclude_ciphers.
The following cipher grades are supported:
List of ciphers or cipher types to exclude from the SMTP server -cipher list. This is not an OpenSSL cipherlist; it is a simple list -separated by whitespace and/or commas. The elements are a single -cipher, or one or more "+" separated cipher properties, in which -case only ciphers matching all the properties are excluded.
+cipher list at all TLS security levels. Excluding valid ciphers +can create interoperability problems. DO NOT exclude ciphers unless it +is essential to do so. This is not an OpenSSL cipherlist; it is a simple +list separated by whitespace and/or commas. The elements are a single +cipher, or one or more "+" separated cipher properties, in which case +only ciphers matching all the properties are excluded.Examples (some of these will cause problems):
@@ -10167,14 +10177,24 @@ key exchange with RSA authentication.This feature is available in Postfix 2.3 and later.
+%PARAM smtpd_tls_mandatory_exclude_ciphers + +Additional list of ciphers or cipher types to exclude from the +SMTP server cipher list at mandatory TLS security levels. This list +works in addition to the exclusions listed with smtpd_tls_exclude_ciphers +(see there for syntax details).
+ +This feature is available in Postfix 2.3 and later.
+ %PARAM smtp_tls_mandatory_ciphers medium -The minimum SMTP client TLS cipher grade that is strong enough to -be used with the "encrypt" security level and higher. The default -value "medium" is suitable for most destinations with which you may -want to enforce TLS, and is beyond the reach of today's crypt-analytic -methods. See smtp_tls_policy_maps for information on how to configure -ciphers on a per-destination basis.
+The minimum TLS cipher grade that the Postfix SMTP client will +use with +mandatory TLS encryption. The default value "medium" is suitable +for most destinations with which you may want to enforce TLS, and +is beyond the reach of today's crypt-analytic methods. See +smtp_tls_policy_maps for information on how to configure ciphers +on a per-destination basis.
The following cipher grades are supported:
@@ -10240,8 +10260,9 @@ encryption or authentication). %PARAM smtp_tls_exclude_ciphers -List of ciphers or cipher types to exclude from the SMTP client cipher -list at all security levels. This is not an OpenSSL cipherlist, it is +
List of ciphers or cipher types to exclude from the Postfix +SMTP client cipher +list at all TLS security levels. This is not an OpenSSL cipherlist, it is a simple list separated by whitespace and/or commas. The elements are a single cipher, or one or more "+" separated cipher properties, in which case only ciphers matching all the properties are excluded.
@@ -10267,18 +10288,17 @@ key exchange with RSA authentication. %PARAM smtp_tls_mandatory_exclude_ciphers -List of ciphers or cipher types to exclude from the SMTP client -cipher list at the mandatory TLS security levels: "encrypt", "verify" -and "secure". See smtp_tls_exclude_ciphers for syntax details. When -both "exclude" parameters are defined, the combined list of ciphers is -excluded (provided the TLS security level is "encrypt" or higher).
+Additional list of ciphers or cipher types to exclude from the +SMTP client cipher list at mandatory TLS security levels. This list +works in addition to the exclusions listed with smtp_tls_exclude_ciphers +(see there for syntax details).
This feature is available in Postfix 2.3 and later.
%PARAM tls_high_cipherlist !EXPORT:!LOW:!MEDIUM:ALL:+RC4:@STRENGTHThe OpenSSL cipherlist for "HIGH" grade ciphers. This defines -the meaning of the "high" setting in smtpd_tls_ciphers, +the meaning of the "high" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. You are strongly encouraged to not change this setting.
@@ -10287,7 +10307,7 @@ strongly encouraged to not change this setting. %PARAM tls_medium_cipherlist !EXPORT:!LOW:ALL:+RC4:@STRENGTHThe OpenSSL cipherlist for "MEDIUM" or higher grade ciphers. This -defines the meaning of the "medium" setting in smtpd_tls_ciphers, +defines the meaning of the "medium" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. This is the default cipherlist for mandatory TLS encryption in the TLS client (with anonymous ciphers disabled when verifying server @@ -10299,7 +10319,7 @@ setting.
%PARAM tls_low_cipherlist !EXPORT:ALL:+RC4:@STRENGTHThe OpenSSL cipherlist for "LOW" or higher grade ciphers. This defines -the meaning of the "low" setting in smtpd_tls_ciphers, +the meaning of the "low" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. You are strongly encouraged to not change this setting.
@@ -10308,7 +10328,7 @@ strongly encouraged to not change this setting. %PARAM tls_export_cipherlist ALL:+RC4:@STRENGTHThe OpenSSL cipherlist for "EXPORT" or higher grade ciphers. This -defines the meaning of the "export" setting in smtpd_tls_ciphers, +defines the meaning of the "export" setting in smtpd_tls_mandatory_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. This is the cipherlist for the opportunistic ("may") TLS client security level and is the default cipherlist for the SMTP server. You are @@ -10320,7 +10340,7 @@ strongly encouraged to not change this setting.
The OpenSSL cipherlist for "NULL" grade ciphers that provide authentication without encryption. This defines the meaning of the "null" -setting in smtpd_tls_ciphers, smtp_tls_mandatory_ciphers and +setting in smtpd_mandatory_tls_ciphers, smtp_tls_mandatory_ciphers and lmtp_tls_mandatory_ciphers. You are strongly encouraged to not change this setting.
@@ -10349,9 +10369,10 @@ configuration parameter. See there for details. %PARAM smtp_sasl_auth_enforce yes -Defer mail delivery when an SMTP server does not support SASL -authentication, while smtp_sasl_password_maps contains SASL -login/password information for that server.
+If sender-dependent SASL passwords are turned off, defer mail +delivery when an SMTP server does not support SASL authentication, +while smtp_sasl_password_maps contains SASL login/password information +for that server.
This feature is available in Postfix 2.3 and later.
@@ -10399,3 +10420,27 @@ encrypt" implies "smtpd_tls_auth_only = yes".Note 3: when invoked via "sendmail -bs", Postfix will never offer STARTTLS due to insufficient privileges to access the server private key. This is intended behavior.
+ +This feature is available in Postfix 2.3 and later.
+ +%PARAM internal_mail_filter_classes + +What categories of Postfix-generated mail are subject to +before-queue content inspection by non_smtpd_milters, header_checks +and body_checks. Specify zero or more of the following, separated +by whitespace or comma.
+ +NOTE: It's generally not safe to enable content inspection of +Postfix-generated email messages. The user is warned.
+ +This feature is available in Postfix 2.3 and later.
diff --git a/postfix/proto/relocated b/postfix/proto/relocated index 49a3a2eac..f1e1fe55b 100644 --- a/postfix/proto/relocated +++ b/postfix/proto/relocated @@ -82,7 +82,7 @@ # expression lookup table syntax, see \fBregexp_table\fR(5) or # \fBpcre_table\fR(5). For a description of the TCP client/server # table lookup protocol, see \fBtcp_table\fR(5). -# This feature is not available up to and including Postfix version 2.2. +# This feature is not available up to and including Postfix version 2.3. # # Each pattern is a regular expression that is applied to the entire # address being looked up. Thus, \fIuser@domain\fR mail addresses are not @@ -101,7 +101,7 @@ # This section describes how the table lookups change when lookups # are directed to a TCP-based server. For a description of the TCP # client/server lookup protocol, see \fBtcp_table\fR(5). -# This feature is not available up to and including Postfix version 2.2. +# This feature is not available up to and including Postfix version 2.3. # # Each lookup operation uses the entire address once. Thus, # \fIuser@domain\fR mail addresses are not broken up into their diff --git a/postfix/proto/transport b/postfix/proto/transport index 4546a0095..0a6029f2b 100644 --- a/postfix/proto/transport +++ b/postfix/proto/transport @@ -229,7 +229,7 @@ # This section describes how the table lookups change when lookups # are directed to a TCP-based server. For a description of the TCP # client/server lookup protocol, see \fBtcp_table\fR(5). -# This feature is not available up to and including Postfix version 2.2. +# This feature is not available up to and including Postfix version 2.3. # # Each lookup operation uses the entire recipient address once. Thus, # \fIsome.domain.hierarchy\fR is not looked up via its parent domains, diff --git a/postfix/proto/virtual b/postfix/proto/virtual index e732a1a68..7f60d562b 100644 --- a/postfix/proto/virtual +++ b/postfix/proto/virtual @@ -199,7 +199,7 @@ # This section describes how the table lookups change when lookups # are directed to a TCP-based server. For a description of the TCP # client/server lookup protocol, see \fBtcp_table\fR(5). -# This feature is not available up to and including Postfix version 2.2. +# This feature is not available up to and including Postfix version 2.3. # # Each lookup operation uses the entire address once. Thus, # \fIuser@domain\fR mail addresses are not broken up into their diff --git a/postfix/src/bounce/bounce.c b/postfix/src/bounce/bounce.c index d9fe163b5..c09d36eed 100644 --- a/postfix/src/bounce/bounce.c +++ b/postfix/src/bounce/bounce.c @@ -83,6 +83,10 @@ /* .IP "\fBipc_timeout (3600s)\fR" /* The time limit for sending or receiving information over an internal /* communication channel. +/* .IP "\fBinternal_mail_filter_classes (empty)\fR" +/* What categories of Postfix-generated mail are subject to +/* before-queue content inspection by non_smtpd_milters, header_checks +/* and body_checks. /* .IP "\fBmail_name (Postfix)\fR" /* The mail system name that is displayed in Received: headers, in /* the SMTP greeting banner, and in bounced mail. diff --git a/postfix/src/bounce/bounce_notify_service.c b/postfix/src/bounce/bounce_notify_service.c index 8c3550594..2f9fdb81b 100644 --- a/postfix/src/bounce/bounce_notify_service.c +++ b/postfix/src/bounce/bounce_notify_service.c @@ -174,7 +174,7 @@ int bounce_notify_service(int flags, char *service, char *queue_name, postmaster = var_2bounce_rcpt; if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(), postmaster, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { @@ -213,7 +213,7 @@ int bounce_notify_service(int flags, char *service, char *queue_name, */ else { if ((bounce = post_mail_fopen_nowait(NULL_SENDER, recipient, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { @@ -267,7 +267,7 @@ int bounce_notify_service(int flags, char *service, char *queue_name, postmaster = var_bounce_rcpt; if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(), postmaster, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { count = -1; diff --git a/postfix/src/bounce/bounce_notify_verp.c b/postfix/src/bounce/bounce_notify_verp.c index 4fcdf644c..dbc5e5613 100644 --- a/postfix/src/bounce/bounce_notify_verp.c +++ b/postfix/src/bounce/bounce_notify_verp.c @@ -158,7 +158,7 @@ int bounce_notify_verp(int flags, char *service, char *queue_name, } else { verp_sender(verp_buf, verp_delims, recipient, rcpt->address); if ((bounce = post_mail_fopen_nowait(NULL_SENDER, STR(verp_buf), - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { @@ -217,7 +217,7 @@ int bounce_notify_verp(int flags, char *service, char *queue_name, postmaster = var_bounce_rcpt; if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(), postmaster, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { if (bounce_header(bounce, bounce_info, postmaster, diff --git a/postfix/src/bounce/bounce_one_service.c b/postfix/src/bounce/bounce_one_service.c index 6d6ca629a..5373e74e1 100644 --- a/postfix/src/bounce/bounce_one_service.c +++ b/postfix/src/bounce/bounce_one_service.c @@ -147,7 +147,7 @@ int bounce_one_service(int flags, char *queue_name, char *queue_id, } else { if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(), var_2bounce_rcpt, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { @@ -183,7 +183,7 @@ int bounce_one_service(int flags, char *queue_name, char *queue_id, bounce_status = 0; } else { if ((bounce = post_mail_fopen_nowait(NULL_SENDER, orig_sender, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { @@ -228,7 +228,7 @@ int bounce_one_service(int flags, char *queue_name, char *queue_id, */ if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(), var_bounce_rcpt, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { if (bounce_header(bounce, bounce_info, var_bounce_rcpt, diff --git a/postfix/src/bounce/bounce_trace_service.c b/postfix/src/bounce/bounce_trace_service.c index 747e6f400..78d1b9362 100644 --- a/postfix/src/bounce/bounce_trace_service.c +++ b/postfix/src/bounce/bounce_trace_service.c @@ -140,7 +140,7 @@ int bounce_trace_service(int flags, char *service, char *queue_name, * a new queue file. */ if ((bounce = post_mail_fopen_nowait(NULL_SENDER, recipient, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { count = -1; diff --git a/postfix/src/bounce/bounce_warn_service.c b/postfix/src/bounce/bounce_warn_service.c index 98db272ea..cb19579a1 100644 --- a/postfix/src/bounce/bounce_warn_service.c +++ b/postfix/src/bounce/bounce_warn_service.c @@ -164,7 +164,7 @@ int bounce_warn_service(int unused_flags, char *service, char *queue_name, postmaster = var_delay_rcpt; if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(), postmaster, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { @@ -202,7 +202,7 @@ int bounce_warn_service(int unused_flags, char *service, char *queue_name, */ else { if ((bounce = post_mail_fopen_nowait(NULL_SENDER, recipient, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { @@ -252,7 +252,7 @@ int bounce_warn_service(int unused_flags, char *service, char *queue_name, postmaster = var_delay_rcpt; if ((bounce = post_mail_fopen_nowait(mail_addr_double_bounce(), postmaster, - CLEANUP_FLAG_MASK_INTERNAL, + INT_FILT_BOUNCE, NULL_TRACE_FLAGS, new_id)) != 0) { count = -1; diff --git a/postfix/src/cleanup/cleanup.h b/postfix/src/cleanup/cleanup.h index 2db16f4cf..cc0a9bd51 100644 --- a/postfix/src/cleanup/cleanup.h +++ b/postfix/src/cleanup/cleanup.h @@ -90,6 +90,8 @@ typedef struct CLEANUP_STATE { int defer_delay; /* deferred delivery */ #endif MILTERS *milters; /* mail filters */ + const char *client_name; /* real or ersatz client */ + const char *client_addr; /* real or ersatz client */ } CLEANUP_STATE; /* diff --git a/postfix/src/cleanup/cleanup_milter.c b/postfix/src/cleanup/cleanup_milter.c index f5d49c102..ebd1f5ce7 100644 --- a/postfix/src/cleanup/cleanup_milter.c +++ b/postfix/src/cleanup/cleanup_milter.c @@ -1265,7 +1265,8 @@ void cleanup_milter_receive(CLEANUP_STATE *state, int count) /* cleanup_milter_apply - apply Milter reponse, non-zero if rejecting */ -static const char *cleanup_milter_apply(CLEANUP_STATE *state, const char *resp) +static const char *cleanup_milter_apply(CLEANUP_STATE *state, const char *event, + const char *resp) { const char *myname = "cleanup_milter_apply"; const char *action; @@ -1337,7 +1338,9 @@ static const char *cleanup_milter_apply(CLEANUP_STATE *state, const char *resp) default: msg_panic("%s: unexpected mail filter reply: %s", myname, resp); } - vstring_sprintf(state->temp1, "%s: %s;", state->queue_id, action); + vstring_sprintf(state->temp1, "%s: %s: %s from %s[%s]: %s;", + state->queue_id, action, event, state->client_name, + state->client_addr, text); if (state->sender) vstring_sprintf_append(state->temp1, " from=<%s>", state->sender); if (state->recip) @@ -1346,7 +1349,6 @@ static const char *cleanup_milter_apply(CLEANUP_STATE *state, const char *resp) vstring_sprintf_append(state->temp1, " proto=%s", attr); if ((attr = nvtable_find(state->attr, MAIL_ATTR_LOG_HELO_NAME)) != 0) vstring_sprintf_append(state->temp1, " helo=<%s>", attr); - vstring_sprintf_append(state->temp1, ": %s", text); msg_info("%s", vstring_str(state->temp1)); return (ret); @@ -1368,7 +1370,7 @@ void cleanup_milter_inspect(CLEANUP_STATE *state, MILTERS *milters) */ if ((resp = milter_message(milters, state->handle->stream, state->data_offset)) != 0) - cleanup_milter_apply(state, resp); + cleanup_milter_apply(state, "END-OF-MESSAGE", resp); if (msg_verbose) msg_info("leave %s", myname); } @@ -1380,8 +1382,6 @@ void cleanup_milter_emul_mail(CLEANUP_STATE *state, const char *addr) { const char *resp; - const char *client_name; - const char *client_addr; const char *proto_attr; const char *client_port; int client_af; @@ -1404,14 +1404,15 @@ void cleanup_milter_emul_mail(CLEANUP_STATE *state, */ #define NO_CLIENT_PORT "0" - client_name = nvtable_find(state->attr, MAIL_ATTR_ACT_CLIENT_NAME); - client_addr = nvtable_find(state->attr, MAIL_ATTR_ACT_CLIENT_ADDR); + state->client_name = nvtable_find(state->attr, MAIL_ATTR_ACT_CLIENT_NAME); + state->client_addr = nvtable_find(state->attr, MAIL_ATTR_ACT_CLIENT_ADDR); + client_port = nvtable_find(state->attr, MAIL_ATTR_ACT_CLIENT_PORT); proto_attr = nvtable_find(state->attr, MAIL_ATTR_ACT_CLIENT_AF); - if (client_name == 0 || client_addr == 0 || proto_attr == 0 + if (state->client_name == 0 || state->client_addr == 0 || proto_attr == 0 || !alldig(proto_attr)) { - client_name = "localhost"; - client_addr = "127.0.0.1"; + state->client_name = "localhost"; + state->client_addr = "127.0.0.1"; client_af = AF_INET; } else client_af = atoi(proto_attr); @@ -1421,18 +1422,18 @@ void cleanup_milter_emul_mail(CLEANUP_STATE *state, /* * Emulate SMTP events. */ - if ((resp = milter_conn_event(milters, client_name, client_addr, + if ((resp = milter_conn_event(milters, state->client_name, state->client_addr, client_port, client_af)) != 0) { - cleanup_milter_apply(state, resp); + cleanup_milter_apply(state, "CONNECT", resp); return; } #define PRETEND_ESMTP 1 if (CLEANUP_MILTER_OK(state)) { if ((helo = nvtable_find(state->attr, MAIL_ATTR_ACT_HELO_NAME)) == 0) - helo = client_name; + helo = state->client_name; if ((resp = milter_helo_event(milters, helo, PRETEND_ESMTP)) != 0) { - cleanup_milter_apply(state, resp); + cleanup_milter_apply(state, "EHLO", resp); return; } } @@ -1440,7 +1441,7 @@ void cleanup_milter_emul_mail(CLEANUP_STATE *state, argv[0] = addr; argv[1] = 0; if ((resp = milter_mail_event(milters, argv)) != 0) { - cleanup_milter_apply(state, resp); + cleanup_milter_apply(state, "MAIL", resp); return; } } @@ -1463,7 +1464,7 @@ void cleanup_milter_emul_rcpt(CLEANUP_STATE *state, argv[0] = addr; argv[1] = 0; if ((resp = milter_rcpt_event(milters, argv)) != 0 - && cleanup_milter_apply(state, resp) != 0) { + && cleanup_milter_apply(state, "RCPT", resp) != 0) { msg_warn("%s: milter configuration error: can't reject recipient " "in non-smtpd(8) submission", state->queue_id); msg_warn("%s: deferring delivery of this message", state->queue_id); @@ -1481,7 +1482,7 @@ void cleanup_milter_emul_data(CLEANUP_STATE *state, MILTERS *milters) const char *resp; if ((resp = milter_data_event(milters)) != 0) - cleanup_milter_apply(state, resp); + cleanup_milter_apply(state, "DATA", resp); } #ifdef TEST diff --git a/postfix/src/cleanup/cleanup_state.c b/postfix/src/cleanup/cleanup_state.c index 495ece4b3..fae7fdd58 100644 --- a/postfix/src/cleanup/cleanup_state.c +++ b/postfix/src/cleanup/cleanup_state.c @@ -108,6 +108,8 @@ CLEANUP_STATE *cleanup_state_alloc(VSTREAM *src) state->dsn_orcpt = 0; state->verp_delims = 0; state->milters = 0; + state->client_name = 0; + state->client_addr = 0; return (state); } diff --git a/postfix/src/global/Makefile.in b/postfix/src/global/Makefile.in index 21ec0d22d..ab9162360 100644 --- a/postfix/src/global/Makefile.in +++ b/postfix/src/global/Makefile.in @@ -1,88 +1,85 @@ SHELL = /bin/sh SRCS = abounce.c anvil_clnt.c been_here.c bounce.c bounce_log.c \ canon_addr.c cfg_parser.c cleanup_strerror.c cleanup_strflags.c \ - clnt_stream.c debug_peer.c debug_process.c defer.c db_common.c \ - deliver_completed.c deliver_flock.c deliver_pass.c deliver_request.c \ - dict_ldap.c dict_mysql.c dict_pgsql.c dict_proxy.c domain_list.c \ - dot_lockfile.c dot_lockfile_as.c ext_prop.c file_id.c flush_clnt.c \ - header_opts.c header_token.c input_transp.c \ - is_header.c log_adhoc.c mail_addr.c mail_addr_crunch.c \ - mail_addr_find.c mail_addr_map.c mail_command_client.c \ - mail_command_server.c mail_conf.c mail_conf_bool.c mail_conf_int.c \ - mail_conf_raw.c mail_conf_str.c mail_conf_time.c mail_connect.c \ - mail_copy.c mail_date.c mail_dict.c mail_error.c mail_flush.c \ - mail_open_ok.c mail_params.c mail_pathname.c mail_queue.c \ - mail_run.c mail_scan_dir.c mail_stream.c mail_task.c mail_trigger.c \ - maps.c mark_corrupt.c match_parent_style.c mbox_conf.c \ - mbox_open.c mime_state.c mkmap_db.c mkmap_dbm.c mkmap_open.c \ - mynetworks.c mypwd.c namadr_list.c off_cvt.c opened.c \ - own_inet_addr.c pipe_command.c post_mail.c quote_821_local.c \ - quote_822_local.c rec_streamlf.c rec_type.c recipient_list.c \ - record.c remove.c resolve_clnt.c resolve_local.c rewrite_clnt.c \ + clnt_stream.c conv_time.c db_common.c debug_peer.c debug_process.c \ + defer.c deliver_completed.c deliver_flock.c deliver_pass.c \ + deliver_request.c dict_ldap.c dict_mysql.c dict_pgsql.c \ + dict_proxy.c domain_list.c dot_lockfile.c dot_lockfile_as.c \ + dsb_scan.c dsn.c dsn_buf.c dsn_mask.c dsn_print.c dsn_util.c \ + ehlo_mask.c ext_prop.c file_id.c flush_clnt.c header_opts.c \ + header_token.c input_transp.c int_filt.c is_header.c log_adhoc.c \ + mail_addr.c mail_addr_crunch.c mail_addr_find.c mail_addr_map.c \ + mail_command_client.c mail_command_server.c mail_conf.c \ + mail_conf_bool.c mail_conf_int.c mail_conf_long.c mail_conf_raw.c \ + mail_conf_str.c mail_conf_time.c mail_connect.c mail_copy.c \ + mail_date.c mail_dict.c mail_error.c mail_flush.c mail_open_ok.c \ + mail_params.c mail_pathname.c mail_queue.c mail_run.c \ + mail_scan_dir.c mail_stream.c mail_task.c mail_trigger.c maps.c \ + mark_corrupt.c match_parent_style.c mbox_conf.c mbox_open.c \ + mime_state.c mkmap_cdb.c mkmap_db.c mkmap_dbm.c mkmap_open.c \ + mkmap_sdbm.c msg_stats_print.c msg_stats_scan.c mynetworks.c \ + mypwd.c namadr_list.c off_cvt.c opened.c own_inet_addr.c \ + pipe_command.c post_mail.c quote_821_local.c quote_822_local.c \ + rcpt_buf.c rcpt_print.c rec_attr_map.c rec_streamlf.c rec_type.c \ + recipient_list.c record.c remove.c resolve_clnt.c resolve_local.c \ + rewrite_clnt.c scache_clnt.c scache_multi.c scache_single.c \ sent.c smtp_stream.c split_addr.c string_list.c strip_addr.c \ sys_exits.c timed_ipc.c tok822_find.c tok822_node.c tok822_parse.c \ - tok822_resolve.c tok822_rewrite.c tok822_tree.c trace.c verify.c \ - verify_clnt.c verp_sender.c xtext.c scache_single.c \ - scache_clnt.c scache_multi.c user_acl.c mkmap_cdb.c mkmap_sdbm.c \ - ehlo_mask.c \ - wildcard_inet_addr.c valid_mailhost_addr.c dsn_util.c dsn_mask.c \ - rec_attr_map.c dsn.c dsn_buf.c rcpt_buf.c rcpt_print.c dsn_print.c \ - dsb_scan.c mail_conf_long.c msg_stats_print.c msg_stats_scan.c \ - conv_time.c + tok822_resolve.c tok822_rewrite.c tok822_tree.c trace.c \ + user_acl.c valid_mailhost_addr.c verify.c verify_clnt.c \ + verp_sender.c wildcard_inet_addr.c xtext.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 debug_peer.o debug_process.o defer.o db_common.o \ - deliver_completed.o deliver_flock.o deliver_pass.o deliver_request.o \ - dict_ldap.o dict_mysql.o dict_pgsql.o dict_proxy.o domain_list.o \ - dot_lockfile.o dot_lockfile_as.o ext_prop.o file_id.o flush_clnt.o \ - header_opts.o header_token.o input_transp.o \ - is_header.o log_adhoc.o mail_addr.o mail_addr_crunch.o \ - mail_addr_find.o mail_addr_map.o mail_command_client.o \ - mail_command_server.o mail_conf.o mail_conf_bool.o mail_conf_int.o \ - mail_conf_raw.o mail_conf_str.o mail_conf_time.o mail_connect.o \ - mail_copy.o mail_date.o mail_dict.o mail_error.o mail_flush.o \ - mail_open_ok.o mail_params.o mail_pathname.o mail_queue.o \ - mail_run.o mail_scan_dir.o mail_stream.o mail_task.o mail_trigger.o \ - maps.o mark_corrupt.o match_parent_style.o mbox_conf.o \ - mbox_open.o mime_state.o mkmap_db.o mkmap_dbm.o mkmap_open.o \ - mynetworks.o mypwd.o namadr_list.o off_cvt.o opened.o \ - own_inet_addr.o pipe_command.o post_mail.o quote_821_local.o \ - quote_822_local.o rec_streamlf.o rec_type.o recipient_list.o \ - record.o remove.o resolve_clnt.o resolve_local.o rewrite_clnt.o \ + clnt_stream.o conv_time.o db_common.o debug_peer.o debug_process.o \ + defer.o deliver_completed.o deliver_flock.o deliver_pass.o \ + deliver_request.o dict_ldap.o dict_mysql.o dict_pgsql.o \ + dict_proxy.o domain_list.o dot_lockfile.o dot_lockfile_as.o \ + dsb_scan.o dsn.o dsn_buf.o dsn_mask.o dsn_print.o dsn_util.o \ + ehlo_mask.o ext_prop.o file_id.o flush_clnt.o header_opts.o \ + header_token.o input_transp.o int_filt.o is_header.o log_adhoc.o \ + mail_addr.o mail_addr_crunch.o mail_addr_find.o mail_addr_map.o \ + mail_command_client.o mail_command_server.o mail_conf.o \ + mail_conf_bool.o mail_conf_int.o mail_conf_long.o mail_conf_raw.o \ + mail_conf_str.o mail_conf_time.o mail_connect.o mail_copy.o \ + mail_date.o mail_dict.o mail_error.o mail_flush.o mail_open_ok.o \ + mail_params.o mail_pathname.o mail_queue.o mail_run.o \ + mail_scan_dir.o mail_stream.o mail_task.o mail_trigger.o maps.o \ + mark_corrupt.o match_parent_style.o mbox_conf.o mbox_open.o \ + mime_state.o mkmap_cdb.o mkmap_db.o mkmap_dbm.o mkmap_open.o \ + mkmap_sdbm.o msg_stats_print.o msg_stats_scan.o mynetworks.o \ + mypwd.o namadr_list.o off_cvt.o opened.o own_inet_addr.o \ + pipe_command.o post_mail.o quote_821_local.o quote_822_local.o \ + rcpt_buf.o rcpt_print.o rec_attr_map.o rec_streamlf.o rec_type.o \ + recipient_list.o record.o remove.o resolve_clnt.o resolve_local.o \ + rewrite_clnt.o scache_clnt.o scache_multi.o scache_single.o \ sent.o smtp_stream.o split_addr.o string_list.o strip_addr.o \ sys_exits.o timed_ipc.o tok822_find.o tok822_node.o tok822_parse.o \ - tok822_resolve.o tok822_rewrite.o tok822_tree.o trace.o verify.o \ - verify_clnt.o verp_sender.o xtext.o scache_single.o \ - scache_clnt.o scache_multi.o user_acl.o mkmap_cdb.o mkmap_sdbm.o \ - ehlo_mask.o \ - wildcard_inet_addr.o valid_mailhost_addr.o dsn_util.o dsn_mask.o \ - rec_attr_map.o dsn.o dsn_buf.o rcpt_buf.o rcpt_print.o dsn_print.o \ - dsb_scan.o mail_conf_long.o msg_stats_print.o msg_stats_scan.o \ - conv_time.o + tok822_resolve.o tok822_rewrite.o tok822_tree.o trace.o \ + user_acl.o valid_mailhost_addr.o verify.o verify_clnt.o \ + verp_sender.o wildcard_inet_addr.o xtext.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 \ - debug_peer.h debug_process.h defer.h deliver_completed.h \ - deliver_flock.h deliver_pass.h deliver_request.h dict_ldap.h \ - dict_mysql.h dict_pgsql.h dict_proxy.h domain_list.h dot_lockfile.h \ - dot_lockfile_as.h ext_prop.h file_id.h flush_clnt.h header_opts.h \ - header_token.h input_transp.h is_header.h \ - lex_822.h log_adhoc.h mail_addr.h mail_addr_crunch.h \ - mail_addr_find.h mail_addr_map.h mail_conf.h mail_copy.h \ - mail_date.h mail_dict.h mail_error.h mail_flush.h mail_open_ok.h \ - mail_params.h mail_proto.h mail_queue.h mail_run.h mail_scan_dir.h \ - mail_stream.h mail_task.h mail_version.h maps.h mark_corrupt.h \ - match_parent_style.h mbox_conf.h mbox_open.h mime_state.h \ - mkmap.h mynetworks.h mypwd.h namadr_list.h off_cvt.h opened.h \ - own_inet_addr.h pipe_command.h post_mail.h qmgr_user.h \ - qmqp_proto.h quote_821_local.h quote_822_local.h quote_flags.h \ - rec_streamlf.h rec_type.h recipient_list.h record.h resolve_clnt.h \ - resolve_local.h rewrite_clnt.h sent.h smtp_stream.h split_addr.h \ + conv_time.h db_common.h debug_peer.h debug_process.h defer.h \ + deliver_completed.h deliver_flock.h deliver_pass.h deliver_request.h \ + dict_ldap.h dict_mysql.h dict_pgsql.h dict_proxy.h domain_list.h \ + dot_lockfile.h dot_lockfile_as.h dsb_scan.h dsn.h dsn_buf.h \ + dsn_mask.h dsn_print.h dsn_util.h ehlo_mask.h ext_prop.h \ + file_id.h flush_clnt.h header_opts.h header_token.h input_transp.h \ + int_filt.h is_header.h lex_822.h log_adhoc.h mail_addr.h \ + mail_addr_crunch.h mail_addr_find.h mail_addr_map.h mail_conf.h \ + mail_copy.h mail_date.h mail_dict.h mail_error.h mail_flush.h \ + mail_open_ok.h mail_params.h mail_proto.h mail_queue.h mail_run.h \ + mail_scan_dir.h mail_stream.h mail_task.h mail_version.h maps.h \ + mark_corrupt.h match_parent_style.h mbox_conf.h mbox_open.h \ + mime_state.h mkmap.h msg_stats.h mynetworks.h mypwd.h namadr_list.h \ + off_cvt.h opened.h own_inet_addr.h pipe_command.h post_mail.h \ + qmgr_user.h qmqp_proto.h quote_821_local.h quote_822_local.h \ + quote_flags.h rcpt_buf.h rcpt_print.h rec_attr_map.h rec_streamlf.h \ + rec_type.h recipient_list.h record.h resolve_clnt.h resolve_local.h \ + rewrite_clnt.h scache.h sent.h smtp_stream.h split_addr.h \ string_list.h strip_addr.h sys_exits.h timed_ipc.h tok822.h \ - trace.h verify.h verify_clnt.h verp_sender.h \ - xtext.h scache.h user_acl.h ehlo_mask.h db_common.h \ - wildcard_inet_addr.h valid_mailhost_addr.h dsn_util.h dsn_mask.h \ - rec_attr_map.h dsn.h dsn_buf.h rcpt_buf.h rcpt_print.h dsn_print.h \ - dsb_scan.h msg_stats.h conv_time.h + trace.h user_acl.h valid_mailhost_addr.h verify.h verify_clnt.h \ + verp_sender.h wildcard_inet_addr.h xtext.h TESTSRC = rec2stream.c stream2rec.c recdump.c DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE) CFLAGS = $(DEBUG) $(OPT) $(DEFS) @@ -871,6 +868,13 @@ input_transp.o: cleanup_user.h input_transp.o: input_transp.c input_transp.o: input_transp.h input_transp.o: mail_params.h +int_filt.o: ../../include/name_mask.h +int_filt.o: ../../include/sys_defs.h +int_filt.o: ../../include/vbuf.h +int_filt.o: ../../include/vstring.h +int_filt.o: int_filt.c +int_filt.o: int_filt.h +int_filt.o: mail_params.h is_header.o: ../../include/sys_defs.h is_header.o: is_header.c is_header.o: is_header.h diff --git a/postfix/src/global/ext_prop.c b/postfix/src/global/ext_prop.c index c6860cf2b..9ae7cc493 100644 --- a/postfix/src/global/ext_prop.c +++ b/postfix/src/global/ext_prop.c @@ -1,16 +1,16 @@ /*++ /* NAME -/* exp_prop 3 +/* ext_prop 3 /* SUMMARY /* address extension propagation control /* SYNOPSIS -/* #include