mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 05:38:06 +00:00
postfix-3.6-20210418
This commit is contained in:
parent
7240584ca1
commit
0b5b2ce9cd
@ -25507,3 +25507,21 @@ Apologies for any names omitted.
|
||||
|
||||
Documentation: updated examples and TLS configuration. File
|
||||
proto/CONNECTION_CACHE_README.html.
|
||||
|
||||
20210418
|
||||
|
||||
Bitrot: new "known_tcp_ports" configuration parameter to
|
||||
reduce Postfix dependency on the services(5) database.
|
||||
There is no agreement about the name of the port 465 service:
|
||||
the intersection of different systems is reportedly empty.
|
||||
By default, Postfix now "knows" the port numbers for SMTP
|
||||
services. Files: proto/postconf.proto, global/Makefile.in,
|
||||
global/config_known_tcp_ports.c, global/config_known_tcp_ports.h,
|
||||
global/config_known_tcp_ports.ref, global/mail_params.c,
|
||||
global/mail_params.h, global/mail_version.h,
|
||||
global/namadr_list.ref, master/master.c,
|
||||
posttls-finger/Makefile.in, posttls-finger/posttls-finger.c,
|
||||
smtp/Makefile.in, smtp/smtp.c, smtp/smtp_connect.c,
|
||||
smtpd/smtpd.c, util/Makefile.in, util/find_inet.c,
|
||||
util/known_tcp_ports.c, util/known_tcp_ports.h,
|
||||
util/known_tcp_ports.ref, util/myaddrinfo.c.
|
||||
|
@ -32,6 +32,9 @@ Postfix version 3.6 deprecates terminology that implies white is
|
||||
better than black. Instead, Postfix prefers 'allowlist', 'denylist',
|
||||
and variations on those words.
|
||||
|
||||
Set "respectful_logging = no" in main.cf to keep using the old
|
||||
behavior (parameter names and logging).
|
||||
|
||||
Noel Jones assisted with the initial transition.
|
||||
|
||||
Changes in documentation
|
||||
|
@ -372,6 +372,11 @@ SMTP(8) SMTP(8)
|
||||
".") that Postfix may use to determine whether DNSSEC validation
|
||||
is available.
|
||||
|
||||
<b>known_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submis-</b>
|
||||
<b>sion=587)</b>
|
||||
Optional setting that avoids lookups in the <b>services</b>(5) data-
|
||||
base.
|
||||
|
||||
<b>MIME PROCESSING CONTROLS</b>
|
||||
Available in Postfix version 2.0 and later:
|
||||
|
||||
@ -388,7 +393,7 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 2.1 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_send_xforward_command">smtp_send_xforward_command</a> (no)</b>
|
||||
Send the non-standard XFORWARD command when the Postfix SMTP
|
||||
Send the non-standard XFORWARD command when the Postfix SMTP
|
||||
server EHLO response announces XFORWARD support.
|
||||
|
||||
<b>SASL AUTHENTICATION CONTROLS</b>
|
||||
@ -396,62 +401,62 @@ SMTP(8) SMTP(8)
|
||||
Enable SASL authentication in the Postfix SMTP client.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_password_maps">smtp_sasl_password_maps</a> (empty)</b>
|
||||
Optional Postfix SMTP client lookup tables with one user-
|
||||
name:password entry per sender, remote hostname or next-hop
|
||||
Optional Postfix SMTP client lookup tables with one user-
|
||||
name:password entry per sender, remote hostname or next-hop
|
||||
domain.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_security_options">smtp_sasl_security_options</a> (noplaintext, noanonymous)</b>
|
||||
Postfix SMTP client SASL security options; as of Postfix 2.3 the
|
||||
list of available features depends on the SASL client implemen-
|
||||
list of available features depends on the SASL client implemen-
|
||||
tation that is selected with <b><a href="postconf.5.html#smtp_sasl_type">smtp_sasl_type</a></b>.
|
||||
|
||||
Available in Postfix version 2.2 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_mechanism_filter">smtp_sasl_mechanism_filter</a> (empty)</b>
|
||||
If non-empty, a Postfix SMTP client filter for the remote SMTP
|
||||
If non-empty, a Postfix SMTP client filter for the remote SMTP
|
||||
server's list of offered SASL mechanisms.
|
||||
|
||||
Available in Postfix version 2.3 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sender_dependent_authentication">smtp_sender_dependent_authentication</a> (no)</b>
|
||||
Enable sender-dependent authentication in the Postfix SMTP
|
||||
client; this is available only with SASL authentication, and
|
||||
disables SMTP connection caching to ensure that mail from dif-
|
||||
client; this is available only with SASL authentication, and
|
||||
disables SMTP connection caching to ensure that mail from dif-
|
||||
ferent senders will use the appropriate credentials.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_path">smtp_sasl_path</a> (empty)</b>
|
||||
Implementation-specific information that the Postfix SMTP client
|
||||
passes through to the SASL plug-in implementation that is
|
||||
passes through to the SASL plug-in implementation that is
|
||||
selected with <b><a href="postconf.5.html#smtp_sasl_type">smtp_sasl_type</a></b>.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_type">smtp_sasl_type</a> (cyrus)</b>
|
||||
The SASL plug-in type that the Postfix SMTP client should use
|
||||
The SASL plug-in type that the Postfix SMTP client should use
|
||||
for authentication.
|
||||
|
||||
Available in Postfix version 2.5 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_auth_cache_name">smtp_sasl_auth_cache_name</a> (empty)</b>
|
||||
An optional table to prevent repeated SASL authentication fail-
|
||||
ures with the same remote SMTP server hostname, username and
|
||||
An optional table to prevent repeated SASL authentication fail-
|
||||
ures with the same remote SMTP server hostname, username and
|
||||
password.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_auth_cache_time">smtp_sasl_auth_cache_time</a> (90d)</b>
|
||||
The maximal age of an <a href="postconf.5.html#smtp_sasl_auth_cache_name">smtp_sasl_auth_cache_name</a> entry before it
|
||||
The maximal age of an <a href="postconf.5.html#smtp_sasl_auth_cache_name">smtp_sasl_auth_cache_name</a> entry before it
|
||||
is removed.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_auth_soft_bounce">smtp_sasl_auth_soft_bounce</a> (yes)</b>
|
||||
When a remote SMTP server rejects a SASL authentication request
|
||||
with a 535 reply code, defer mail delivery instead of returning
|
||||
When a remote SMTP server rejects a SASL authentication request
|
||||
with a 535 reply code, defer mail delivery instead of returning
|
||||
mail as undeliverable.
|
||||
|
||||
Available in Postfix version 2.9 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a> (no)</b>
|
||||
Whether or not to append the "AUTH=<>" option to the MAIL FROM
|
||||
Whether or not to append the "AUTH=<>" option to the MAIL FROM
|
||||
command in SASL-authenticated SMTP sessions.
|
||||
|
||||
<b>STARTTLS SUPPORT CONTROLS</b>
|
||||
Detailed information about STARTTLS configuration may be found in the
|
||||
Detailed information about STARTTLS configuration may be found in the
|
||||
<a href="TLS_README.html">TLS_README</a> document.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_security_level">smtp_tls_security_level</a> (empty)</b>
|
||||
@ -461,20 +466,20 @@ SMTP(8) SMTP(8)
|
||||
<a href="postconf.5.html#smtp_tls_enforce_peername">smtp_tls_enforce_peername</a>.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_tls_security_options">smtp_sasl_tls_security_options</a> ($<a href="postconf.5.html#smtp_sasl_security_options">smtp_sasl_security_options</a>)</b>
|
||||
The SASL authentication security options that the Postfix SMTP
|
||||
The SASL authentication security options that the Postfix SMTP
|
||||
client uses for TLS encrypted SMTP sessions.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_starttls_timeout">smtp_starttls_timeout</a> (300s)</b>
|
||||
Time limit for Postfix SMTP client write and read operations
|
||||
Time limit for Postfix SMTP client write and read operations
|
||||
during TLS startup and shutdown handshake procedures.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_CAfile">smtp_tls_CAfile</a> (empty)</b>
|
||||
A file containing CA certificates of root CAs trusted to sign
|
||||
either remote SMTP server certificates or intermediate CA cer-
|
||||
A file containing CA certificates of root CAs trusted to sign
|
||||
either remote SMTP server certificates or intermediate CA cer-
|
||||
tificates.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_CApath">smtp_tls_CApath</a> (empty)</b>
|
||||
Directory with PEM format Certification Authority certificates
|
||||
Directory with PEM format Certification Authority certificates
|
||||
that the Postfix SMTP client uses to verify a remote SMTP server
|
||||
certificate.
|
||||
|
||||
@ -482,7 +487,7 @@ SMTP(8) SMTP(8)
|
||||
File with the Postfix SMTP client RSA certificate in PEM format.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_mandatory_ciphers">smtp_tls_mandatory_ciphers</a> (medium)</b>
|
||||
The minimum TLS cipher grade that the Postfix SMTP client will
|
||||
The minimum TLS cipher grade that the Postfix SMTP client will
|
||||
use with mandatory TLS encryption.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_exclude_ciphers">smtp_tls_exclude_ciphers</a> (empty)</b>
|
||||
@ -490,8 +495,8 @@ SMTP(8) SMTP(8)
|
||||
client cipher list at all TLS security levels.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_mandatory_exclude_ciphers">smtp_tls_mandatory_exclude_ciphers</a> (empty)</b>
|
||||
Additional list of ciphers or cipher types to exclude from the
|
||||
Postfix SMTP client cipher list at mandatory TLS security lev-
|
||||
Additional list of ciphers or cipher types to exclude from the
|
||||
Postfix SMTP client cipher list at mandatory TLS security lev-
|
||||
els.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_dcert_file">smtp_tls_dcert_file</a> (empty)</b>
|
||||
@ -507,7 +512,7 @@ SMTP(8) SMTP(8)
|
||||
Enable additional Postfix SMTP client logging of TLS activity.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_note_starttls_offer">smtp_tls_note_starttls_offer</a> (no)</b>
|
||||
Log the hostname of a remote SMTP server that offers STARTTLS,
|
||||
Log the hostname of a remote SMTP server that offers STARTTLS,
|
||||
when TLS is not already enabled for that server.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_policy_maps">smtp_tls_policy_maps</a> (empty)</b>
|
||||
@ -516,14 +521,14 @@ SMTP(8) SMTP(8)
|
||||
fied, this overrides the obsolete <a href="postconf.5.html#smtp_tls_per_site">smtp_tls_per_site</a> parameter.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> (see 'postconf -d' output)</b>
|
||||
TLS protocols that the Postfix SMTP client will use with manda-
|
||||
TLS protocols that the Postfix SMTP client will use with manda-
|
||||
tory TLS encryption.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_scert_verifydepth">smtp_tls_scert_verifydepth</a> (9)</b>
|
||||
The verification depth for remote SMTP server certificates.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_secure_cert_match">smtp_tls_secure_cert_match</a> (nexthop, dot-nexthop)</b>
|
||||
How the Postfix SMTP client verifies the server certificate
|
||||
How the Postfix SMTP client verifies the server certificate
|
||||
peername for the "secure" TLS security level.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_session_cache_database">smtp_tls_session_cache_database</a> (empty)</b>
|
||||
@ -531,16 +536,16 @@ SMTP(8) SMTP(8)
|
||||
session cache.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_session_cache_timeout">smtp_tls_session_cache_timeout</a> (3600s)</b>
|
||||
The expiration time of Postfix SMTP client TLS session cache
|
||||
The expiration time of Postfix SMTP client TLS session cache
|
||||
information.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_verify_cert_match">smtp_tls_verify_cert_match</a> (hostname)</b>
|
||||
How the Postfix SMTP client verifies the server certificate
|
||||
How the Postfix SMTP client verifies the server certificate
|
||||
peername for the "verify" TLS security level.
|
||||
|
||||
<b><a href="postconf.5.html#tls_daemon_random_bytes">tls_daemon_random_bytes</a> (32)</b>
|
||||
The number of pseudo-random bytes that an <a href="smtp.8.html"><b>smtp</b>(8)</a> or <a href="smtpd.8.html"><b>smtpd</b>(8)</a>
|
||||
process requests from the <a href="tlsmgr.8.html"><b>tlsmgr</b>(8)</a> server in order to seed its
|
||||
The number of pseudo-random bytes that an <a href="smtp.8.html"><b>smtp</b>(8)</a> or <a href="smtpd.8.html"><b>smtpd</b>(8)</a>
|
||||
process requests from the <a href="tlsmgr.8.html"><b>tlsmgr</b>(8)</a> server in order to seed its
|
||||
internal pseudo random number generator (PRNG).
|
||||
|
||||
<b><a href="postconf.5.html#tls_high_cipherlist">tls_high_cipherlist</a> (see 'postconf -d' output)</b>
|
||||
@ -556,52 +561,52 @@ SMTP(8) SMTP(8)
|
||||
The OpenSSL cipherlist for "export" or higher grade ciphers.
|
||||
|
||||
<b><a href="postconf.5.html#tls_null_cipherlist">tls_null_cipherlist</a> (eNULL:!aNULL)</b>
|
||||
The OpenSSL cipherlist for "NULL" grade ciphers that provide
|
||||
The OpenSSL cipherlist for "NULL" grade ciphers that provide
|
||||
authentication without encryption.
|
||||
|
||||
Available in Postfix version 2.4 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_tls_verified_security_options">smtp_sasl_tls_verified_security_options</a> ($<a href="postconf.5.html#smtp_sasl_tls_security_options">smtp_sasl_tls_secu</a>-</b>
|
||||
<b><a href="postconf.5.html#smtp_sasl_tls_security_options">rity_options</a>)</b>
|
||||
The SASL authentication security options that the Postfix SMTP
|
||||
client uses for TLS encrypted SMTP sessions with a verified
|
||||
The SASL authentication security options that the Postfix SMTP
|
||||
client uses for TLS encrypted SMTP sessions with a verified
|
||||
server certificate.
|
||||
|
||||
Available in Postfix version 2.5 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_fingerprint_cert_match">smtp_tls_fingerprint_cert_match</a> (empty)</b>
|
||||
List of acceptable remote SMTP server certificate fingerprints
|
||||
for the "fingerprint" TLS security level (<b><a href="postconf.5.html#smtp_tls_security_level">smtp_tls_secu</a>-</b>
|
||||
List of acceptable remote SMTP server certificate fingerprints
|
||||
for the "fingerprint" TLS security level (<b><a href="postconf.5.html#smtp_tls_security_level">smtp_tls_secu</a>-</b>
|
||||
<b><a href="postconf.5.html#smtp_tls_security_level">rity_level</a></b> = fingerprint).
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_fingerprint_digest">smtp_tls_fingerprint_digest</a> (see 'postconf -d' output)</b>
|
||||
The message digest algorithm used to construct remote SMTP
|
||||
The message digest algorithm used to construct remote SMTP
|
||||
server certificate fingerprints.
|
||||
|
||||
Available in Postfix version 2.6 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> (see postconf -d output)</b>
|
||||
TLS protocols that the Postfix SMTP client will use with oppor-
|
||||
TLS protocols that the Postfix SMTP client will use with oppor-
|
||||
tunistic TLS encryption.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_ciphers">smtp_tls_ciphers</a> (medium)</b>
|
||||
The minimum TLS cipher grade that the Postfix SMTP client will
|
||||
The minimum TLS cipher grade that the Postfix SMTP client will
|
||||
use with opportunistic TLS encryption.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_eccert_file">smtp_tls_eccert_file</a> (empty)</b>
|
||||
File with the Postfix SMTP client ECDSA certificate in PEM for-
|
||||
File with the Postfix SMTP client ECDSA certificate in PEM for-
|
||||
mat.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_eckey_file">smtp_tls_eckey_file</a> ($<a href="postconf.5.html#smtp_tls_eccert_file">smtp_tls_eccert_file</a>)</b>
|
||||
File with the Postfix SMTP client ECDSA private key in PEM for-
|
||||
File with the Postfix SMTP client ECDSA private key in PEM for-
|
||||
mat.
|
||||
|
||||
Available in Postfix version 2.7 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_block_early_mail_reply">smtp_tls_block_early_mail_reply</a> (no)</b>
|
||||
Try to detect a mail hijacking attack based on a TLS protocol
|
||||
vulnerability (CVE-2009-3555), where an attacker prepends mali-
|
||||
cious HELO, MAIL, RCPT, DATA commands to a Postfix SMTP client
|
||||
Try to detect a mail hijacking attack based on a TLS protocol
|
||||
vulnerability (CVE-2009-3555), where an attacker prepends mali-
|
||||
cious HELO, MAIL, RCPT, DATA commands to a Postfix SMTP client
|
||||
TLS session.
|
||||
|
||||
Available in Postfix version 2.8 and later:
|
||||
@ -621,11 +626,11 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 2.11 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_trust_anchor_file">smtp_tls_trust_anchor_file</a> (empty)</b>
|
||||
Zero or more PEM-format files with trust-anchor certificates
|
||||
Zero or more PEM-format files with trust-anchor certificates
|
||||
and/or public keys.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_force_insecure_host_tlsa_lookup">smtp_tls_force_insecure_host_tlsa_lookup</a> (no)</b>
|
||||
Lookup the associated DANE TLSA RRset even when a hostname is
|
||||
Lookup the associated DANE TLSA RRset even when a hostname is
|
||||
not an alias and its address records lie in an unsigned zone.
|
||||
|
||||
<b><a href="postconf.5.html#tlsmgr_service_name">tlsmgr_service_name</a> (tlsmgr)</b>
|
||||
@ -634,14 +639,14 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 3.0 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_wrappermode">smtp_tls_wrappermode</a> (no)</b>
|
||||
Request that the Postfix SMTP client connects using the legacy
|
||||
Request that the Postfix SMTP client connects using the legacy
|
||||
SMTPS protocol instead of using the STARTTLS command.
|
||||
|
||||
Available in Postfix version 3.1 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_dane_insecure_mx_policy">smtp_tls_dane_insecure_mx_policy</a> (see 'postconf -d' output)</b>
|
||||
The TLS policy for MX hosts with "secure" TLSA records when the
|
||||
nexthop destination security level is <b>dane</b>, but the MX record
|
||||
The TLS policy for MX hosts with "secure" TLSA records when the
|
||||
nexthop destination security level is <b>dane</b>, but the MX record
|
||||
was found via an "insecure" MX lookup.
|
||||
|
||||
Available in Postfix version 3.4 and later:
|
||||
@ -650,54 +655,54 @@ SMTP(8) SMTP(8)
|
||||
Try to make multiple deliveries per TLS-encrypted connection.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_chain_files">smtp_tls_chain_files</a> (empty)</b>
|
||||
List of one or more PEM files, each holding one or more private
|
||||
List of one or more PEM files, each holding one or more private
|
||||
keys directly followed by a corresponding certificate chain.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_servername">smtp_tls_servername</a> (empty)</b>
|
||||
Optional name to send to the remote SMTP server in the TLS
|
||||
Optional name to send to the remote SMTP server in the TLS
|
||||
Server Name Indication (SNI) extension.
|
||||
|
||||
Available in Postfix 3.5, 3.4.6, 3.3.5, 3.2.10, 3.1.13 and later:
|
||||
|
||||
<b><a href="postconf.5.html#tls_fast_shutdown_enable">tls_fast_shutdown_enable</a> (yes)</b>
|
||||
A workaround for implementations that hang Postfix while shut-
|
||||
A workaround for implementations that hang Postfix while shut-
|
||||
ting down a TLS session, until Postfix times out.
|
||||
|
||||
<b>OBSOLETE STARTTLS CONTROLS</b>
|
||||
The following configuration parameters exist for compatibility with
|
||||
Postfix versions before 2.3. Support for these will be removed in a
|
||||
The following configuration parameters exist for compatibility with
|
||||
Postfix versions before 2.3. Support for these will be removed in a
|
||||
future release.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_use_tls">smtp_use_tls</a> (no)</b>
|
||||
Opportunistic mode: use TLS when a remote SMTP server announces
|
||||
Opportunistic mode: use TLS when a remote SMTP server announces
|
||||
STARTTLS support, otherwise send the mail in the clear.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_enforce_tls">smtp_enforce_tls</a> (no)</b>
|
||||
Enforcement mode: require that remote SMTP servers use TLS
|
||||
Enforcement mode: require that remote SMTP servers use TLS
|
||||
encryption, and never send mail in the clear.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_enforce_peername">smtp_tls_enforce_peername</a> (yes)</b>
|
||||
With mandatory TLS encryption, require that the remote SMTP
|
||||
server hostname matches the information in the remote SMTP
|
||||
With mandatory TLS encryption, require that the remote SMTP
|
||||
server hostname matches the information in the remote SMTP
|
||||
server certificate.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_per_site">smtp_tls_per_site</a> (empty)</b>
|
||||
Optional lookup tables with the Postfix SMTP client TLS usage
|
||||
policy by next-hop destination and by remote SMTP server host-
|
||||
Optional lookup tables with the Postfix SMTP client TLS usage
|
||||
policy by next-hop destination and by remote SMTP server host-
|
||||
name.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_cipherlist">smtp_tls_cipherlist</a> (empty)</b>
|
||||
Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS
|
||||
Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS
|
||||
cipher list.
|
||||
|
||||
<b>RESOURCE AND RATE CONTROLS</b>
|
||||
<b><a href="postconf.5.html#smtp_connect_timeout">smtp_connect_timeout</a> (30s)</b>
|
||||
The Postfix SMTP client time limit for completing a TCP connec-
|
||||
The Postfix SMTP client time limit for completing a TCP connec-
|
||||
tion, or zero (use the operating system built-in time limit).
|
||||
|
||||
<b><a href="postconf.5.html#smtp_helo_timeout">smtp_helo_timeout</a> (300s)</b>
|
||||
The Postfix SMTP client time limit for sending the HELO or EHLO
|
||||
command, and for receiving the initial remote SMTP server
|
||||
The Postfix SMTP client time limit for sending the HELO or EHLO
|
||||
command, and for receiving the initial remote SMTP server
|
||||
response.
|
||||
|
||||
<b><a href="postconf.5.html#lmtp_lhlo_timeout">lmtp_lhlo_timeout</a> (300s)</b>
|
||||
@ -709,19 +714,19 @@ SMTP(8) SMTP(8)
|
||||
mand, and for receiving the remote SMTP server response.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_mail_timeout">smtp_mail_timeout</a> (300s)</b>
|
||||
The Postfix SMTP client time limit for sending the MAIL FROM
|
||||
The Postfix SMTP client time limit for sending the MAIL FROM
|
||||
command, and for receiving the remote SMTP server response.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_rcpt_timeout">smtp_rcpt_timeout</a> (300s)</b>
|
||||
The Postfix SMTP client time limit for sending the SMTP RCPT TO
|
||||
The Postfix SMTP client time limit for sending the SMTP RCPT TO
|
||||
command, and for receiving the remote SMTP server response.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_data_init_timeout">smtp_data_init_timeout</a> (120s)</b>
|
||||
The Postfix SMTP client time limit for sending the SMTP DATA
|
||||
The Postfix SMTP client time limit for sending the SMTP DATA
|
||||
command, and for receiving the remote SMTP server response.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_data_xfer_timeout">smtp_data_xfer_timeout</a> (180s)</b>
|
||||
The Postfix SMTP client time limit for sending the SMTP message
|
||||
The Postfix SMTP client time limit for sending the SMTP message
|
||||
content.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_data_done_timeout">smtp_data_done_timeout</a> (600s)</b>
|
||||
@ -735,13 +740,13 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 2.1 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_mx_address_limit">smtp_mx_address_limit</a> (5)</b>
|
||||
The maximal number of MX (mail exchanger) IP addresses that can
|
||||
result from Postfix SMTP client mail exchanger lookups, or zero
|
||||
The maximal number of MX (mail exchanger) IP addresses that can
|
||||
result from Postfix SMTP client mail exchanger lookups, or zero
|
||||
(no limit).
|
||||
|
||||
<b><a href="postconf.5.html#smtp_mx_session_limit">smtp_mx_session_limit</a> (2)</b>
|
||||
The maximal number of SMTP sessions per delivery request before
|
||||
the Postfix SMTP client gives up or delivers to a fall-back
|
||||
The maximal number of SMTP sessions per delivery request before
|
||||
the Postfix SMTP client gives up or delivers to a fall-back
|
||||
<a href="postconf.5.html#relayhost">relay host</a>, or zero (no limit).
|
||||
|
||||
<b><a href="postconf.5.html#smtp_rset_timeout">smtp_rset_timeout</a> (20s)</b>
|
||||
@ -751,17 +756,17 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 2.2 and earlier:
|
||||
|
||||
<b><a href="postconf.5.html#lmtp_cache_connection">lmtp_cache_connection</a> (yes)</b>
|
||||
Keep Postfix LMTP client connections open for up to $<a href="postconf.5.html#max_idle">max_idle</a>
|
||||
Keep Postfix LMTP client connections open for up to $<a href="postconf.5.html#max_idle">max_idle</a>
|
||||
seconds.
|
||||
|
||||
Available in Postfix version 2.2 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_connection_cache_destinations">smtp_connection_cache_destinations</a> (empty)</b>
|
||||
Permanently enable SMTP connection caching for the specified
|
||||
Permanently enable SMTP connection caching for the specified
|
||||
destinations.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_connection_cache_on_demand">smtp_connection_cache_on_demand</a> (yes)</b>
|
||||
Temporarily enable SMTP connection caching while a destination
|
||||
Temporarily enable SMTP connection caching while a destination
|
||||
has a high volume of mail in the <a href="QSHAPE_README.html#active_queue">active queue</a>.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a> (300s)</b>
|
||||
@ -775,23 +780,23 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 2.3 and later:
|
||||
|
||||
<b><a href="postconf.5.html#connection_cache_protocol_timeout">connection_cache_protocol_timeout</a> (5s)</b>
|
||||
Time limit for connection cache connect, send or receive opera-
|
||||
Time limit for connection cache connect, send or receive opera-
|
||||
tions.
|
||||
|
||||
Available in Postfix version 2.9 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_per_record_deadline">smtp_per_record_deadline</a> (no)</b>
|
||||
Change the behavior of the smtp_*_timeout time limits, from a
|
||||
time limit per read or write system call, to a time limit to
|
||||
send or receive a complete record (an SMTP command line, SMTP
|
||||
response line, SMTP message content line, or TLS protocol mes-
|
||||
Change the behavior of the smtp_*_timeout time limits, from a
|
||||
time limit per read or write system call, to a time limit to
|
||||
send or receive a complete record (an SMTP command line, SMTP
|
||||
response line, SMTP message content line, or TLS protocol mes-
|
||||
sage).
|
||||
|
||||
Available in Postfix version 2.11 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_connection_reuse_count_limit">smtp_connection_reuse_count_limit</a> (0)</b>
|
||||
When SMTP connection caching is enabled, the number of times
|
||||
that an SMTP session may be reused before it is closed, or zero
|
||||
When SMTP connection caching is enabled, the number of times
|
||||
that an SMTP session may be reused before it is closed, or zero
|
||||
(no limit).
|
||||
|
||||
Available in Postfix version 3.4 and later:
|
||||
@ -803,54 +808,54 @@ SMTP(8) SMTP(8)
|
||||
|
||||
<b>transport_destination_concurrency_limit ($<a href="postconf.5.html#default_destination_concurrency_limit">default_destination_concur</a>-</b>
|
||||
<b><a href="postconf.5.html#default_destination_concurrency_limit">rency_limit</a>)</b>
|
||||
A transport-specific override for the default_destination_con-
|
||||
A transport-specific override for the default_destination_con-
|
||||
currency_limit parameter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a>
|
||||
name of the message delivery transport.
|
||||
|
||||
<b>transport_destination_recipient_limit ($<a href="postconf.5.html#default_destination_recipient_limit">default_destination_recipi</a>-</b>
|
||||
<b><a href="postconf.5.html#default_destination_recipient_limit">ent_limit</a>)</b>
|
||||
A transport-specific override for the <a href="postconf.5.html#default_destination_recipient_limit">default_destination_recip</a>-
|
||||
<a href="postconf.5.html#default_destination_recipient_limit">ient_limit</a> parameter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a>
|
||||
<a href="postconf.5.html#default_destination_recipient_limit">ient_limit</a> parameter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a>
|
||||
name of the message delivery transport.
|
||||
|
||||
<b>SMTPUTF8 CONTROLS</b>
|
||||
Preliminary SMTPUTF8 support is introduced with Postfix 3.0.
|
||||
|
||||
<b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (yes)</b>
|
||||
Enable preliminary SMTPUTF8 support for the protocols described
|
||||
Enable preliminary SMTPUTF8 support for the protocols described
|
||||
in <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a>..6533.
|
||||
|
||||
<b><a href="postconf.5.html#smtputf8_autodetect_classes">smtputf8_autodetect_classes</a> (sendmail, verify)</b>
|
||||
Detect that a message requires SMTPUTF8 support for the speci-
|
||||
Detect that a message requires SMTPUTF8 support for the speci-
|
||||
fied mail origin classes.
|
||||
|
||||
Available in Postfix version 3.2 and later:
|
||||
|
||||
<b><a href="postconf.5.html#enable_idna2003_compatibility">enable_idna2003_compatibility</a> (no)</b>
|
||||
Enable 'transitional' compatibility between IDNA2003 and
|
||||
IDNA2008, when converting UTF-8 domain names to/from the ASCII
|
||||
Enable 'transitional' compatibility between IDNA2003 and
|
||||
IDNA2008, when converting UTF-8 domain names to/from the ASCII
|
||||
form that is used for DNS lookups.
|
||||
|
||||
<b>TROUBLE SHOOTING CONTROLS</b>
|
||||
<b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
|
||||
The increment in verbose logging level when a nexthop destina-
|
||||
tion, remote client or server name or network address matches a
|
||||
The increment in verbose logging level when a nexthop destina-
|
||||
tion, remote client or server name or network address matches a
|
||||
pattern given with the <a href="postconf.5.html#debug_peer_list">debug_peer_list</a> parameter.
|
||||
|
||||
<b><a href="postconf.5.html#debug_peer_list">debug_peer_list</a> (empty)</b>
|
||||
Optional list of nexthop destination, remote client or server
|
||||
name or network address patterns that, if matched, cause the
|
||||
verbose logging level to increase by the amount specified in
|
||||
Optional list of nexthop destination, remote client or server
|
||||
name or network address patterns that, if matched, cause the
|
||||
verbose logging level to increase by the amount specified in
|
||||
$<a href="postconf.5.html#debug_peer_level">debug_peer_level</a>.
|
||||
|
||||
<b><a href="postconf.5.html#error_notice_recipient">error_notice_recipient</a> (postmaster)</b>
|
||||
The recipient of postmaster notifications about mail delivery
|
||||
The recipient of postmaster notifications about mail delivery
|
||||
problems that are caused by policy, resource, software or proto-
|
||||
col errors.
|
||||
|
||||
<b><a href="postconf.5.html#internal_mail_filter_classes">internal_mail_filter_classes</a> (empty)</b>
|
||||
What categories of Postfix-generated mail are subject to
|
||||
before-queue content inspection by <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
|
||||
What categories of Postfix-generated mail are subject to
|
||||
before-queue content inspection by <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
|
||||
<a href="postconf.5.html#header_checks">header_checks</a> and <a href="postconf.5.html#body_checks">body_checks</a>.
|
||||
|
||||
<b><a href="postconf.5.html#notify_classes">notify_classes</a> (resource, software)</b>
|
||||
@ -858,46 +863,46 @@ SMTP(8) SMTP(8)
|
||||
|
||||
<b>MISCELLANEOUS CONTROLS</b>
|
||||
<b><a href="postconf.5.html#best_mx_transport">best_mx_transport</a> (empty)</b>
|
||||
Where the Postfix SMTP client should deliver mail when it
|
||||
Where the Postfix SMTP client should deliver mail when it
|
||||
detects a "mail loops back to myself" error condition.
|
||||
|
||||
<b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
|
||||
The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
|
||||
The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
|
||||
figuration files.
|
||||
|
||||
<b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b>
|
||||
How much time a Postfix daemon process may take to handle a
|
||||
How much time a Postfix daemon process may take to handle a
|
||||
request before it is terminated by a built-in watchdog timer.
|
||||
|
||||
<b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
|
||||
The maximal number of digits after the decimal point when log-
|
||||
The maximal number of digits after the decimal point when log-
|
||||
ging sub-second delay values.
|
||||
|
||||
<b><a href="postconf.5.html#disable_dns_lookups">disable_dns_lookups</a> (no)</b>
|
||||
Disable DNS lookups in the Postfix SMTP and LMTP clients.
|
||||
|
||||
<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> (all)</b>
|
||||
The network interface addresses that this mail system receives
|
||||
The network interface addresses that this mail system receives
|
||||
mail on.
|
||||
|
||||
<b><a href="postconf.5.html#inet_protocols">inet_protocols</a> (see 'postconf -d output')</b>
|
||||
The Internet protocols Postfix will attempt to use when making
|
||||
The Internet protocols Postfix will attempt to use when making
|
||||
or accepting connections.
|
||||
|
||||
<b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
|
||||
The time limit for sending or receiving information over an
|
||||
The time limit for sending or receiving information over an
|
||||
internal communication channel.
|
||||
|
||||
<b><a href="postconf.5.html#lmtp_assume_final">lmtp_assume_final</a> (no)</b>
|
||||
When a remote LMTP server announces no DSN support, assume that
|
||||
the server performs final delivery, and send "delivered" deliv-
|
||||
When a remote LMTP server announces no DSN support, assume that
|
||||
the server performs final delivery, and send "delivered" deliv-
|
||||
ery status notifications instead of "relayed".
|
||||
|
||||
<b><a href="postconf.5.html#lmtp_tcp_port">lmtp_tcp_port</a> (24)</b>
|
||||
The default TCP port that the Postfix LMTP client connects to.
|
||||
|
||||
<b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
|
||||
The maximum amount of time that an idle Postfix daemon process
|
||||
The maximum amount of time that an idle Postfix daemon process
|
||||
waits for an incoming connection before terminating voluntarily.
|
||||
|
||||
<b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
|
||||
@ -911,20 +916,20 @@ SMTP(8) SMTP(8)
|
||||
The process name of a Postfix command or daemon process.
|
||||
|
||||
<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> (empty)</b>
|
||||
The network interface addresses that this mail system receives
|
||||
The network interface addresses that this mail system receives
|
||||
mail on by way of a proxy or network address translation unit.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_address_preference">smtp_address_preference</a> (any)</b>
|
||||
The address type ("ipv6", "ipv4" or "any") that the Postfix SMTP
|
||||
client will try first, when a destination has IPv6 and IPv4
|
||||
client will try first, when a destination has IPv6 and IPv4
|
||||
addresses with equal MX preference.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_bind_address">smtp_bind_address</a> (empty)</b>
|
||||
An optional numerical network address that the Postfix SMTP
|
||||
An optional numerical network address that the Postfix SMTP
|
||||
client should bind to when making an IPv4 connection.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_bind_address6">smtp_bind_address6</a> (empty)</b>
|
||||
An optional numerical network address that the Postfix SMTP
|
||||
An optional numerical network address that the Postfix SMTP
|
||||
client should bind to when making an IPv6 connection.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_helo_name">smtp_helo_name</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
|
||||
@ -944,7 +949,7 @@ SMTP(8) SMTP(8)
|
||||
The syslog facility of Postfix logging.
|
||||
|
||||
<b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
|
||||
A prefix that is prepended to the process name in syslog
|
||||
A prefix that is prepended to the process name in syslog
|
||||
records, so that, for example, "smtpd" becomes "prefix/smtpd".
|
||||
|
||||
Available with Postfix 2.2 and earlier:
|
||||
@ -962,7 +967,7 @@ SMTP(8) SMTP(8)
|
||||
Available with Postfix 3.0 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_address_verify_target">smtp_address_verify_target</a> (rcpt)</b>
|
||||
In the context of email address verification, the SMTP protocol
|
||||
In the context of email address verification, the SMTP protocol
|
||||
stage that determines whether an email address is deliverable.
|
||||
|
||||
Available with Postfix 3.1 and later:
|
||||
|
@ -184,8 +184,15 @@ MASTER(8) MASTER(8)
|
||||
<b><a href="postconf.5.html#service_name">service_name</a> (read-only)</b>
|
||||
The <a href="master.5.html">master.cf</a> service name of a Postfix daemon process.
|
||||
|
||||
Available in Postfix 3.6 and later:
|
||||
|
||||
<b>known_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submis-</b>
|
||||
<b>sion=587)</b>
|
||||
Optional setting that avoids lookups in the <b>services</b>(5) data-
|
||||
base.
|
||||
|
||||
<b>FILES</b>
|
||||
To expand the directory names below into their actual values, use the
|
||||
To expand the directory names below into their actual values, use the
|
||||
command "<b>postconf <a href="postconf.5.html#config_directory">config_directory</a></b>" etc.
|
||||
|
||||
$<a href="postconf.5.html#config_directory">config_directory</a>/<a href="postconf.5.html">main.cf</a>, global configuration file.
|
||||
|
@ -4327,6 +4327,29 @@ This feature is available in Postfix 2.1 and later.
|
||||
</p>
|
||||
|
||||
|
||||
</DD>
|
||||
|
||||
<DT><b><a name="known_tcp_ports">known_tcp_ports</a>
|
||||
(default: lmtp=24, smtp=25, smtps=submissions=465, submission=587)</b></DT><DD>
|
||||
|
||||
<p> Optional setting that avoids lookups in the services(5) database.
|
||||
This feature was implemented to address inconsistencies in the name
|
||||
of the port "465" service. The ABNF is:
|
||||
</p>
|
||||
|
||||
<blockquote>
|
||||
<p>
|
||||
known_tcp_ports = empty | name-to-port *("," name-to-port) <br>
|
||||
name-to-port = 1*(service-name "=') port-number
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
<p> Whitespace is optional but it cannot appear inside a service
|
||||
name or port number. </p>
|
||||
|
||||
<p> This feature is available in Postfix 3.6 and later. </p>
|
||||
|
||||
|
||||
</DD>
|
||||
|
||||
<DT><b><a name="line_length_limit">line_length_limit</a>
|
||||
|
@ -372,6 +372,11 @@ SMTP(8) SMTP(8)
|
||||
".") that Postfix may use to determine whether DNSSEC validation
|
||||
is available.
|
||||
|
||||
<b>known_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submis-</b>
|
||||
<b>sion=587)</b>
|
||||
Optional setting that avoids lookups in the <b>services</b>(5) data-
|
||||
base.
|
||||
|
||||
<b>MIME PROCESSING CONTROLS</b>
|
||||
Available in Postfix version 2.0 and later:
|
||||
|
||||
@ -388,7 +393,7 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 2.1 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_send_xforward_command">smtp_send_xforward_command</a> (no)</b>
|
||||
Send the non-standard XFORWARD command when the Postfix SMTP
|
||||
Send the non-standard XFORWARD command when the Postfix SMTP
|
||||
server EHLO response announces XFORWARD support.
|
||||
|
||||
<b>SASL AUTHENTICATION CONTROLS</b>
|
||||
@ -396,62 +401,62 @@ SMTP(8) SMTP(8)
|
||||
Enable SASL authentication in the Postfix SMTP client.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_password_maps">smtp_sasl_password_maps</a> (empty)</b>
|
||||
Optional Postfix SMTP client lookup tables with one user-
|
||||
name:password entry per sender, remote hostname or next-hop
|
||||
Optional Postfix SMTP client lookup tables with one user-
|
||||
name:password entry per sender, remote hostname or next-hop
|
||||
domain.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_security_options">smtp_sasl_security_options</a> (noplaintext, noanonymous)</b>
|
||||
Postfix SMTP client SASL security options; as of Postfix 2.3 the
|
||||
list of available features depends on the SASL client implemen-
|
||||
list of available features depends on the SASL client implemen-
|
||||
tation that is selected with <b><a href="postconf.5.html#smtp_sasl_type">smtp_sasl_type</a></b>.
|
||||
|
||||
Available in Postfix version 2.2 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_mechanism_filter">smtp_sasl_mechanism_filter</a> (empty)</b>
|
||||
If non-empty, a Postfix SMTP client filter for the remote SMTP
|
||||
If non-empty, a Postfix SMTP client filter for the remote SMTP
|
||||
server's list of offered SASL mechanisms.
|
||||
|
||||
Available in Postfix version 2.3 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sender_dependent_authentication">smtp_sender_dependent_authentication</a> (no)</b>
|
||||
Enable sender-dependent authentication in the Postfix SMTP
|
||||
client; this is available only with SASL authentication, and
|
||||
disables SMTP connection caching to ensure that mail from dif-
|
||||
client; this is available only with SASL authentication, and
|
||||
disables SMTP connection caching to ensure that mail from dif-
|
||||
ferent senders will use the appropriate credentials.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_path">smtp_sasl_path</a> (empty)</b>
|
||||
Implementation-specific information that the Postfix SMTP client
|
||||
passes through to the SASL plug-in implementation that is
|
||||
passes through to the SASL plug-in implementation that is
|
||||
selected with <b><a href="postconf.5.html#smtp_sasl_type">smtp_sasl_type</a></b>.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_type">smtp_sasl_type</a> (cyrus)</b>
|
||||
The SASL plug-in type that the Postfix SMTP client should use
|
||||
The SASL plug-in type that the Postfix SMTP client should use
|
||||
for authentication.
|
||||
|
||||
Available in Postfix version 2.5 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_auth_cache_name">smtp_sasl_auth_cache_name</a> (empty)</b>
|
||||
An optional table to prevent repeated SASL authentication fail-
|
||||
ures with the same remote SMTP server hostname, username and
|
||||
An optional table to prevent repeated SASL authentication fail-
|
||||
ures with the same remote SMTP server hostname, username and
|
||||
password.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_auth_cache_time">smtp_sasl_auth_cache_time</a> (90d)</b>
|
||||
The maximal age of an <a href="postconf.5.html#smtp_sasl_auth_cache_name">smtp_sasl_auth_cache_name</a> entry before it
|
||||
The maximal age of an <a href="postconf.5.html#smtp_sasl_auth_cache_name">smtp_sasl_auth_cache_name</a> entry before it
|
||||
is removed.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_auth_soft_bounce">smtp_sasl_auth_soft_bounce</a> (yes)</b>
|
||||
When a remote SMTP server rejects a SASL authentication request
|
||||
with a 535 reply code, defer mail delivery instead of returning
|
||||
When a remote SMTP server rejects a SASL authentication request
|
||||
with a 535 reply code, defer mail delivery instead of returning
|
||||
mail as undeliverable.
|
||||
|
||||
Available in Postfix version 2.9 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_send_dummy_mail_auth">smtp_send_dummy_mail_auth</a> (no)</b>
|
||||
Whether or not to append the "AUTH=<>" option to the MAIL FROM
|
||||
Whether or not to append the "AUTH=<>" option to the MAIL FROM
|
||||
command in SASL-authenticated SMTP sessions.
|
||||
|
||||
<b>STARTTLS SUPPORT CONTROLS</b>
|
||||
Detailed information about STARTTLS configuration may be found in the
|
||||
Detailed information about STARTTLS configuration may be found in the
|
||||
<a href="TLS_README.html">TLS_README</a> document.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_security_level">smtp_tls_security_level</a> (empty)</b>
|
||||
@ -461,20 +466,20 @@ SMTP(8) SMTP(8)
|
||||
<a href="postconf.5.html#smtp_tls_enforce_peername">smtp_tls_enforce_peername</a>.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_tls_security_options">smtp_sasl_tls_security_options</a> ($<a href="postconf.5.html#smtp_sasl_security_options">smtp_sasl_security_options</a>)</b>
|
||||
The SASL authentication security options that the Postfix SMTP
|
||||
The SASL authentication security options that the Postfix SMTP
|
||||
client uses for TLS encrypted SMTP sessions.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_starttls_timeout">smtp_starttls_timeout</a> (300s)</b>
|
||||
Time limit for Postfix SMTP client write and read operations
|
||||
Time limit for Postfix SMTP client write and read operations
|
||||
during TLS startup and shutdown handshake procedures.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_CAfile">smtp_tls_CAfile</a> (empty)</b>
|
||||
A file containing CA certificates of root CAs trusted to sign
|
||||
either remote SMTP server certificates or intermediate CA cer-
|
||||
A file containing CA certificates of root CAs trusted to sign
|
||||
either remote SMTP server certificates or intermediate CA cer-
|
||||
tificates.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_CApath">smtp_tls_CApath</a> (empty)</b>
|
||||
Directory with PEM format Certification Authority certificates
|
||||
Directory with PEM format Certification Authority certificates
|
||||
that the Postfix SMTP client uses to verify a remote SMTP server
|
||||
certificate.
|
||||
|
||||
@ -482,7 +487,7 @@ SMTP(8) SMTP(8)
|
||||
File with the Postfix SMTP client RSA certificate in PEM format.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_mandatory_ciphers">smtp_tls_mandatory_ciphers</a> (medium)</b>
|
||||
The minimum TLS cipher grade that the Postfix SMTP client will
|
||||
The minimum TLS cipher grade that the Postfix SMTP client will
|
||||
use with mandatory TLS encryption.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_exclude_ciphers">smtp_tls_exclude_ciphers</a> (empty)</b>
|
||||
@ -490,8 +495,8 @@ SMTP(8) SMTP(8)
|
||||
client cipher list at all TLS security levels.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_mandatory_exclude_ciphers">smtp_tls_mandatory_exclude_ciphers</a> (empty)</b>
|
||||
Additional list of ciphers or cipher types to exclude from the
|
||||
Postfix SMTP client cipher list at mandatory TLS security lev-
|
||||
Additional list of ciphers or cipher types to exclude from the
|
||||
Postfix SMTP client cipher list at mandatory TLS security lev-
|
||||
els.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_dcert_file">smtp_tls_dcert_file</a> (empty)</b>
|
||||
@ -507,7 +512,7 @@ SMTP(8) SMTP(8)
|
||||
Enable additional Postfix SMTP client logging of TLS activity.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_note_starttls_offer">smtp_tls_note_starttls_offer</a> (no)</b>
|
||||
Log the hostname of a remote SMTP server that offers STARTTLS,
|
||||
Log the hostname of a remote SMTP server that offers STARTTLS,
|
||||
when TLS is not already enabled for that server.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_policy_maps">smtp_tls_policy_maps</a> (empty)</b>
|
||||
@ -516,14 +521,14 @@ SMTP(8) SMTP(8)
|
||||
fied, this overrides the obsolete <a href="postconf.5.html#smtp_tls_per_site">smtp_tls_per_site</a> parameter.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_mandatory_protocols">smtp_tls_mandatory_protocols</a> (see 'postconf -d' output)</b>
|
||||
TLS protocols that the Postfix SMTP client will use with manda-
|
||||
TLS protocols that the Postfix SMTP client will use with manda-
|
||||
tory TLS encryption.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_scert_verifydepth">smtp_tls_scert_verifydepth</a> (9)</b>
|
||||
The verification depth for remote SMTP server certificates.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_secure_cert_match">smtp_tls_secure_cert_match</a> (nexthop, dot-nexthop)</b>
|
||||
How the Postfix SMTP client verifies the server certificate
|
||||
How the Postfix SMTP client verifies the server certificate
|
||||
peername for the "secure" TLS security level.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_session_cache_database">smtp_tls_session_cache_database</a> (empty)</b>
|
||||
@ -531,16 +536,16 @@ SMTP(8) SMTP(8)
|
||||
session cache.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_session_cache_timeout">smtp_tls_session_cache_timeout</a> (3600s)</b>
|
||||
The expiration time of Postfix SMTP client TLS session cache
|
||||
The expiration time of Postfix SMTP client TLS session cache
|
||||
information.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_verify_cert_match">smtp_tls_verify_cert_match</a> (hostname)</b>
|
||||
How the Postfix SMTP client verifies the server certificate
|
||||
How the Postfix SMTP client verifies the server certificate
|
||||
peername for the "verify" TLS security level.
|
||||
|
||||
<b><a href="postconf.5.html#tls_daemon_random_bytes">tls_daemon_random_bytes</a> (32)</b>
|
||||
The number of pseudo-random bytes that an <a href="smtp.8.html"><b>smtp</b>(8)</a> or <a href="smtpd.8.html"><b>smtpd</b>(8)</a>
|
||||
process requests from the <a href="tlsmgr.8.html"><b>tlsmgr</b>(8)</a> server in order to seed its
|
||||
The number of pseudo-random bytes that an <a href="smtp.8.html"><b>smtp</b>(8)</a> or <a href="smtpd.8.html"><b>smtpd</b>(8)</a>
|
||||
process requests from the <a href="tlsmgr.8.html"><b>tlsmgr</b>(8)</a> server in order to seed its
|
||||
internal pseudo random number generator (PRNG).
|
||||
|
||||
<b><a href="postconf.5.html#tls_high_cipherlist">tls_high_cipherlist</a> (see 'postconf -d' output)</b>
|
||||
@ -556,52 +561,52 @@ SMTP(8) SMTP(8)
|
||||
The OpenSSL cipherlist for "export" or higher grade ciphers.
|
||||
|
||||
<b><a href="postconf.5.html#tls_null_cipherlist">tls_null_cipherlist</a> (eNULL:!aNULL)</b>
|
||||
The OpenSSL cipherlist for "NULL" grade ciphers that provide
|
||||
The OpenSSL cipherlist for "NULL" grade ciphers that provide
|
||||
authentication without encryption.
|
||||
|
||||
Available in Postfix version 2.4 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_sasl_tls_verified_security_options">smtp_sasl_tls_verified_security_options</a> ($<a href="postconf.5.html#smtp_sasl_tls_security_options">smtp_sasl_tls_secu</a>-</b>
|
||||
<b><a href="postconf.5.html#smtp_sasl_tls_security_options">rity_options</a>)</b>
|
||||
The SASL authentication security options that the Postfix SMTP
|
||||
client uses for TLS encrypted SMTP sessions with a verified
|
||||
The SASL authentication security options that the Postfix SMTP
|
||||
client uses for TLS encrypted SMTP sessions with a verified
|
||||
server certificate.
|
||||
|
||||
Available in Postfix version 2.5 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_fingerprint_cert_match">smtp_tls_fingerprint_cert_match</a> (empty)</b>
|
||||
List of acceptable remote SMTP server certificate fingerprints
|
||||
for the "fingerprint" TLS security level (<b><a href="postconf.5.html#smtp_tls_security_level">smtp_tls_secu</a>-</b>
|
||||
List of acceptable remote SMTP server certificate fingerprints
|
||||
for the "fingerprint" TLS security level (<b><a href="postconf.5.html#smtp_tls_security_level">smtp_tls_secu</a>-</b>
|
||||
<b><a href="postconf.5.html#smtp_tls_security_level">rity_level</a></b> = fingerprint).
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_fingerprint_digest">smtp_tls_fingerprint_digest</a> (see 'postconf -d' output)</b>
|
||||
The message digest algorithm used to construct remote SMTP
|
||||
The message digest algorithm used to construct remote SMTP
|
||||
server certificate fingerprints.
|
||||
|
||||
Available in Postfix version 2.6 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_protocols">smtp_tls_protocols</a> (see postconf -d output)</b>
|
||||
TLS protocols that the Postfix SMTP client will use with oppor-
|
||||
TLS protocols that the Postfix SMTP client will use with oppor-
|
||||
tunistic TLS encryption.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_ciphers">smtp_tls_ciphers</a> (medium)</b>
|
||||
The minimum TLS cipher grade that the Postfix SMTP client will
|
||||
The minimum TLS cipher grade that the Postfix SMTP client will
|
||||
use with opportunistic TLS encryption.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_eccert_file">smtp_tls_eccert_file</a> (empty)</b>
|
||||
File with the Postfix SMTP client ECDSA certificate in PEM for-
|
||||
File with the Postfix SMTP client ECDSA certificate in PEM for-
|
||||
mat.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_eckey_file">smtp_tls_eckey_file</a> ($<a href="postconf.5.html#smtp_tls_eccert_file">smtp_tls_eccert_file</a>)</b>
|
||||
File with the Postfix SMTP client ECDSA private key in PEM for-
|
||||
File with the Postfix SMTP client ECDSA private key in PEM for-
|
||||
mat.
|
||||
|
||||
Available in Postfix version 2.7 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_block_early_mail_reply">smtp_tls_block_early_mail_reply</a> (no)</b>
|
||||
Try to detect a mail hijacking attack based on a TLS protocol
|
||||
vulnerability (CVE-2009-3555), where an attacker prepends mali-
|
||||
cious HELO, MAIL, RCPT, DATA commands to a Postfix SMTP client
|
||||
Try to detect a mail hijacking attack based on a TLS protocol
|
||||
vulnerability (CVE-2009-3555), where an attacker prepends mali-
|
||||
cious HELO, MAIL, RCPT, DATA commands to a Postfix SMTP client
|
||||
TLS session.
|
||||
|
||||
Available in Postfix version 2.8 and later:
|
||||
@ -621,11 +626,11 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 2.11 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_trust_anchor_file">smtp_tls_trust_anchor_file</a> (empty)</b>
|
||||
Zero or more PEM-format files with trust-anchor certificates
|
||||
Zero or more PEM-format files with trust-anchor certificates
|
||||
and/or public keys.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_force_insecure_host_tlsa_lookup">smtp_tls_force_insecure_host_tlsa_lookup</a> (no)</b>
|
||||
Lookup the associated DANE TLSA RRset even when a hostname is
|
||||
Lookup the associated DANE TLSA RRset even when a hostname is
|
||||
not an alias and its address records lie in an unsigned zone.
|
||||
|
||||
<b><a href="postconf.5.html#tlsmgr_service_name">tlsmgr_service_name</a> (tlsmgr)</b>
|
||||
@ -634,14 +639,14 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 3.0 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_wrappermode">smtp_tls_wrappermode</a> (no)</b>
|
||||
Request that the Postfix SMTP client connects using the legacy
|
||||
Request that the Postfix SMTP client connects using the legacy
|
||||
SMTPS protocol instead of using the STARTTLS command.
|
||||
|
||||
Available in Postfix version 3.1 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_dane_insecure_mx_policy">smtp_tls_dane_insecure_mx_policy</a> (see 'postconf -d' output)</b>
|
||||
The TLS policy for MX hosts with "secure" TLSA records when the
|
||||
nexthop destination security level is <b>dane</b>, but the MX record
|
||||
The TLS policy for MX hosts with "secure" TLSA records when the
|
||||
nexthop destination security level is <b>dane</b>, but the MX record
|
||||
was found via an "insecure" MX lookup.
|
||||
|
||||
Available in Postfix version 3.4 and later:
|
||||
@ -650,54 +655,54 @@ SMTP(8) SMTP(8)
|
||||
Try to make multiple deliveries per TLS-encrypted connection.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_chain_files">smtp_tls_chain_files</a> (empty)</b>
|
||||
List of one or more PEM files, each holding one or more private
|
||||
List of one or more PEM files, each holding one or more private
|
||||
keys directly followed by a corresponding certificate chain.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_servername">smtp_tls_servername</a> (empty)</b>
|
||||
Optional name to send to the remote SMTP server in the TLS
|
||||
Optional name to send to the remote SMTP server in the TLS
|
||||
Server Name Indication (SNI) extension.
|
||||
|
||||
Available in Postfix 3.5, 3.4.6, 3.3.5, 3.2.10, 3.1.13 and later:
|
||||
|
||||
<b><a href="postconf.5.html#tls_fast_shutdown_enable">tls_fast_shutdown_enable</a> (yes)</b>
|
||||
A workaround for implementations that hang Postfix while shut-
|
||||
A workaround for implementations that hang Postfix while shut-
|
||||
ting down a TLS session, until Postfix times out.
|
||||
|
||||
<b>OBSOLETE STARTTLS CONTROLS</b>
|
||||
The following configuration parameters exist for compatibility with
|
||||
Postfix versions before 2.3. Support for these will be removed in a
|
||||
The following configuration parameters exist for compatibility with
|
||||
Postfix versions before 2.3. Support for these will be removed in a
|
||||
future release.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_use_tls">smtp_use_tls</a> (no)</b>
|
||||
Opportunistic mode: use TLS when a remote SMTP server announces
|
||||
Opportunistic mode: use TLS when a remote SMTP server announces
|
||||
STARTTLS support, otherwise send the mail in the clear.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_enforce_tls">smtp_enforce_tls</a> (no)</b>
|
||||
Enforcement mode: require that remote SMTP servers use TLS
|
||||
Enforcement mode: require that remote SMTP servers use TLS
|
||||
encryption, and never send mail in the clear.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_enforce_peername">smtp_tls_enforce_peername</a> (yes)</b>
|
||||
With mandatory TLS encryption, require that the remote SMTP
|
||||
server hostname matches the information in the remote SMTP
|
||||
With mandatory TLS encryption, require that the remote SMTP
|
||||
server hostname matches the information in the remote SMTP
|
||||
server certificate.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_per_site">smtp_tls_per_site</a> (empty)</b>
|
||||
Optional lookup tables with the Postfix SMTP client TLS usage
|
||||
policy by next-hop destination and by remote SMTP server host-
|
||||
Optional lookup tables with the Postfix SMTP client TLS usage
|
||||
policy by next-hop destination and by remote SMTP server host-
|
||||
name.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_tls_cipherlist">smtp_tls_cipherlist</a> (empty)</b>
|
||||
Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS
|
||||
Obsolete Postfix < 2.3 control for the Postfix SMTP client TLS
|
||||
cipher list.
|
||||
|
||||
<b>RESOURCE AND RATE CONTROLS</b>
|
||||
<b><a href="postconf.5.html#smtp_connect_timeout">smtp_connect_timeout</a> (30s)</b>
|
||||
The Postfix SMTP client time limit for completing a TCP connec-
|
||||
The Postfix SMTP client time limit for completing a TCP connec-
|
||||
tion, or zero (use the operating system built-in time limit).
|
||||
|
||||
<b><a href="postconf.5.html#smtp_helo_timeout">smtp_helo_timeout</a> (300s)</b>
|
||||
The Postfix SMTP client time limit for sending the HELO or EHLO
|
||||
command, and for receiving the initial remote SMTP server
|
||||
The Postfix SMTP client time limit for sending the HELO or EHLO
|
||||
command, and for receiving the initial remote SMTP server
|
||||
response.
|
||||
|
||||
<b><a href="postconf.5.html#lmtp_lhlo_timeout">lmtp_lhlo_timeout</a> (300s)</b>
|
||||
@ -709,19 +714,19 @@ SMTP(8) SMTP(8)
|
||||
mand, and for receiving the remote SMTP server response.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_mail_timeout">smtp_mail_timeout</a> (300s)</b>
|
||||
The Postfix SMTP client time limit for sending the MAIL FROM
|
||||
The Postfix SMTP client time limit for sending the MAIL FROM
|
||||
command, and for receiving the remote SMTP server response.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_rcpt_timeout">smtp_rcpt_timeout</a> (300s)</b>
|
||||
The Postfix SMTP client time limit for sending the SMTP RCPT TO
|
||||
The Postfix SMTP client time limit for sending the SMTP RCPT TO
|
||||
command, and for receiving the remote SMTP server response.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_data_init_timeout">smtp_data_init_timeout</a> (120s)</b>
|
||||
The Postfix SMTP client time limit for sending the SMTP DATA
|
||||
The Postfix SMTP client time limit for sending the SMTP DATA
|
||||
command, and for receiving the remote SMTP server response.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_data_xfer_timeout">smtp_data_xfer_timeout</a> (180s)</b>
|
||||
The Postfix SMTP client time limit for sending the SMTP message
|
||||
The Postfix SMTP client time limit for sending the SMTP message
|
||||
content.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_data_done_timeout">smtp_data_done_timeout</a> (600s)</b>
|
||||
@ -735,13 +740,13 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 2.1 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_mx_address_limit">smtp_mx_address_limit</a> (5)</b>
|
||||
The maximal number of MX (mail exchanger) IP addresses that can
|
||||
result from Postfix SMTP client mail exchanger lookups, or zero
|
||||
The maximal number of MX (mail exchanger) IP addresses that can
|
||||
result from Postfix SMTP client mail exchanger lookups, or zero
|
||||
(no limit).
|
||||
|
||||
<b><a href="postconf.5.html#smtp_mx_session_limit">smtp_mx_session_limit</a> (2)</b>
|
||||
The maximal number of SMTP sessions per delivery request before
|
||||
the Postfix SMTP client gives up or delivers to a fall-back
|
||||
The maximal number of SMTP sessions per delivery request before
|
||||
the Postfix SMTP client gives up or delivers to a fall-back
|
||||
<a href="postconf.5.html#relayhost">relay host</a>, or zero (no limit).
|
||||
|
||||
<b><a href="postconf.5.html#smtp_rset_timeout">smtp_rset_timeout</a> (20s)</b>
|
||||
@ -751,17 +756,17 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 2.2 and earlier:
|
||||
|
||||
<b><a href="postconf.5.html#lmtp_cache_connection">lmtp_cache_connection</a> (yes)</b>
|
||||
Keep Postfix LMTP client connections open for up to $<a href="postconf.5.html#max_idle">max_idle</a>
|
||||
Keep Postfix LMTP client connections open for up to $<a href="postconf.5.html#max_idle">max_idle</a>
|
||||
seconds.
|
||||
|
||||
Available in Postfix version 2.2 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_connection_cache_destinations">smtp_connection_cache_destinations</a> (empty)</b>
|
||||
Permanently enable SMTP connection caching for the specified
|
||||
Permanently enable SMTP connection caching for the specified
|
||||
destinations.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_connection_cache_on_demand">smtp_connection_cache_on_demand</a> (yes)</b>
|
||||
Temporarily enable SMTP connection caching while a destination
|
||||
Temporarily enable SMTP connection caching while a destination
|
||||
has a high volume of mail in the <a href="QSHAPE_README.html#active_queue">active queue</a>.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a> (300s)</b>
|
||||
@ -775,23 +780,23 @@ SMTP(8) SMTP(8)
|
||||
Available in Postfix version 2.3 and later:
|
||||
|
||||
<b><a href="postconf.5.html#connection_cache_protocol_timeout">connection_cache_protocol_timeout</a> (5s)</b>
|
||||
Time limit for connection cache connect, send or receive opera-
|
||||
Time limit for connection cache connect, send or receive opera-
|
||||
tions.
|
||||
|
||||
Available in Postfix version 2.9 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_per_record_deadline">smtp_per_record_deadline</a> (no)</b>
|
||||
Change the behavior of the smtp_*_timeout time limits, from a
|
||||
time limit per read or write system call, to a time limit to
|
||||
send or receive a complete record (an SMTP command line, SMTP
|
||||
response line, SMTP message content line, or TLS protocol mes-
|
||||
Change the behavior of the smtp_*_timeout time limits, from a
|
||||
time limit per read or write system call, to a time limit to
|
||||
send or receive a complete record (an SMTP command line, SMTP
|
||||
response line, SMTP message content line, or TLS protocol mes-
|
||||
sage).
|
||||
|
||||
Available in Postfix version 2.11 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_connection_reuse_count_limit">smtp_connection_reuse_count_limit</a> (0)</b>
|
||||
When SMTP connection caching is enabled, the number of times
|
||||
that an SMTP session may be reused before it is closed, or zero
|
||||
When SMTP connection caching is enabled, the number of times
|
||||
that an SMTP session may be reused before it is closed, or zero
|
||||
(no limit).
|
||||
|
||||
Available in Postfix version 3.4 and later:
|
||||
@ -803,54 +808,54 @@ SMTP(8) SMTP(8)
|
||||
|
||||
<b>transport_destination_concurrency_limit ($<a href="postconf.5.html#default_destination_concurrency_limit">default_destination_concur</a>-</b>
|
||||
<b><a href="postconf.5.html#default_destination_concurrency_limit">rency_limit</a>)</b>
|
||||
A transport-specific override for the default_destination_con-
|
||||
A transport-specific override for the default_destination_con-
|
||||
currency_limit parameter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a>
|
||||
name of the message delivery transport.
|
||||
|
||||
<b>transport_destination_recipient_limit ($<a href="postconf.5.html#default_destination_recipient_limit">default_destination_recipi</a>-</b>
|
||||
<b><a href="postconf.5.html#default_destination_recipient_limit">ent_limit</a>)</b>
|
||||
A transport-specific override for the <a href="postconf.5.html#default_destination_recipient_limit">default_destination_recip</a>-
|
||||
<a href="postconf.5.html#default_destination_recipient_limit">ient_limit</a> parameter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a>
|
||||
<a href="postconf.5.html#default_destination_recipient_limit">ient_limit</a> parameter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a>
|
||||
name of the message delivery transport.
|
||||
|
||||
<b>SMTPUTF8 CONTROLS</b>
|
||||
Preliminary SMTPUTF8 support is introduced with Postfix 3.0.
|
||||
|
||||
<b><a href="postconf.5.html#smtputf8_enable">smtputf8_enable</a> (yes)</b>
|
||||
Enable preliminary SMTPUTF8 support for the protocols described
|
||||
Enable preliminary SMTPUTF8 support for the protocols described
|
||||
in <a href="http://tools.ietf.org/html/rfc6531">RFC 6531</a>..6533.
|
||||
|
||||
<b><a href="postconf.5.html#smtputf8_autodetect_classes">smtputf8_autodetect_classes</a> (sendmail, verify)</b>
|
||||
Detect that a message requires SMTPUTF8 support for the speci-
|
||||
Detect that a message requires SMTPUTF8 support for the speci-
|
||||
fied mail origin classes.
|
||||
|
||||
Available in Postfix version 3.2 and later:
|
||||
|
||||
<b><a href="postconf.5.html#enable_idna2003_compatibility">enable_idna2003_compatibility</a> (no)</b>
|
||||
Enable 'transitional' compatibility between IDNA2003 and
|
||||
IDNA2008, when converting UTF-8 domain names to/from the ASCII
|
||||
Enable 'transitional' compatibility between IDNA2003 and
|
||||
IDNA2008, when converting UTF-8 domain names to/from the ASCII
|
||||
form that is used for DNS lookups.
|
||||
|
||||
<b>TROUBLE SHOOTING CONTROLS</b>
|
||||
<b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
|
||||
The increment in verbose logging level when a nexthop destina-
|
||||
tion, remote client or server name or network address matches a
|
||||
The increment in verbose logging level when a nexthop destina-
|
||||
tion, remote client or server name or network address matches a
|
||||
pattern given with the <a href="postconf.5.html#debug_peer_list">debug_peer_list</a> parameter.
|
||||
|
||||
<b><a href="postconf.5.html#debug_peer_list">debug_peer_list</a> (empty)</b>
|
||||
Optional list of nexthop destination, remote client or server
|
||||
name or network address patterns that, if matched, cause the
|
||||
verbose logging level to increase by the amount specified in
|
||||
Optional list of nexthop destination, remote client or server
|
||||
name or network address patterns that, if matched, cause the
|
||||
verbose logging level to increase by the amount specified in
|
||||
$<a href="postconf.5.html#debug_peer_level">debug_peer_level</a>.
|
||||
|
||||
<b><a href="postconf.5.html#error_notice_recipient">error_notice_recipient</a> (postmaster)</b>
|
||||
The recipient of postmaster notifications about mail delivery
|
||||
The recipient of postmaster notifications about mail delivery
|
||||
problems that are caused by policy, resource, software or proto-
|
||||
col errors.
|
||||
|
||||
<b><a href="postconf.5.html#internal_mail_filter_classes">internal_mail_filter_classes</a> (empty)</b>
|
||||
What categories of Postfix-generated mail are subject to
|
||||
before-queue content inspection by <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
|
||||
What categories of Postfix-generated mail are subject to
|
||||
before-queue content inspection by <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>,
|
||||
<a href="postconf.5.html#header_checks">header_checks</a> and <a href="postconf.5.html#body_checks">body_checks</a>.
|
||||
|
||||
<b><a href="postconf.5.html#notify_classes">notify_classes</a> (resource, software)</b>
|
||||
@ -858,46 +863,46 @@ SMTP(8) SMTP(8)
|
||||
|
||||
<b>MISCELLANEOUS CONTROLS</b>
|
||||
<b><a href="postconf.5.html#best_mx_transport">best_mx_transport</a> (empty)</b>
|
||||
Where the Postfix SMTP client should deliver mail when it
|
||||
Where the Postfix SMTP client should deliver mail when it
|
||||
detects a "mail loops back to myself" error condition.
|
||||
|
||||
<b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
|
||||
The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
|
||||
The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
|
||||
figuration files.
|
||||
|
||||
<b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b>
|
||||
How much time a Postfix daemon process may take to handle a
|
||||
How much time a Postfix daemon process may take to handle a
|
||||
request before it is terminated by a built-in watchdog timer.
|
||||
|
||||
<b><a href="postconf.5.html#delay_logging_resolution_limit">delay_logging_resolution_limit</a> (2)</b>
|
||||
The maximal number of digits after the decimal point when log-
|
||||
The maximal number of digits after the decimal point when log-
|
||||
ging sub-second delay values.
|
||||
|
||||
<b><a href="postconf.5.html#disable_dns_lookups">disable_dns_lookups</a> (no)</b>
|
||||
Disable DNS lookups in the Postfix SMTP and LMTP clients.
|
||||
|
||||
<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a> (all)</b>
|
||||
The network interface addresses that this mail system receives
|
||||
The network interface addresses that this mail system receives
|
||||
mail on.
|
||||
|
||||
<b><a href="postconf.5.html#inet_protocols">inet_protocols</a> (see 'postconf -d output')</b>
|
||||
The Internet protocols Postfix will attempt to use when making
|
||||
The Internet protocols Postfix will attempt to use when making
|
||||
or accepting connections.
|
||||
|
||||
<b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
|
||||
The time limit for sending or receiving information over an
|
||||
The time limit for sending or receiving information over an
|
||||
internal communication channel.
|
||||
|
||||
<b><a href="postconf.5.html#lmtp_assume_final">lmtp_assume_final</a> (no)</b>
|
||||
When a remote LMTP server announces no DSN support, assume that
|
||||
the server performs final delivery, and send "delivered" deliv-
|
||||
When a remote LMTP server announces no DSN support, assume that
|
||||
the server performs final delivery, and send "delivered" deliv-
|
||||
ery status notifications instead of "relayed".
|
||||
|
||||
<b><a href="postconf.5.html#lmtp_tcp_port">lmtp_tcp_port</a> (24)</b>
|
||||
The default TCP port that the Postfix LMTP client connects to.
|
||||
|
||||
<b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
|
||||
The maximum amount of time that an idle Postfix daemon process
|
||||
The maximum amount of time that an idle Postfix daemon process
|
||||
waits for an incoming connection before terminating voluntarily.
|
||||
|
||||
<b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
|
||||
@ -911,20 +916,20 @@ SMTP(8) SMTP(8)
|
||||
The process name of a Postfix command or daemon process.
|
||||
|
||||
<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a> (empty)</b>
|
||||
The network interface addresses that this mail system receives
|
||||
The network interface addresses that this mail system receives
|
||||
mail on by way of a proxy or network address translation unit.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_address_preference">smtp_address_preference</a> (any)</b>
|
||||
The address type ("ipv6", "ipv4" or "any") that the Postfix SMTP
|
||||
client will try first, when a destination has IPv6 and IPv4
|
||||
client will try first, when a destination has IPv6 and IPv4
|
||||
addresses with equal MX preference.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_bind_address">smtp_bind_address</a> (empty)</b>
|
||||
An optional numerical network address that the Postfix SMTP
|
||||
An optional numerical network address that the Postfix SMTP
|
||||
client should bind to when making an IPv4 connection.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_bind_address6">smtp_bind_address6</a> (empty)</b>
|
||||
An optional numerical network address that the Postfix SMTP
|
||||
An optional numerical network address that the Postfix SMTP
|
||||
client should bind to when making an IPv6 connection.
|
||||
|
||||
<b><a href="postconf.5.html#smtp_helo_name">smtp_helo_name</a> ($<a href="postconf.5.html#myhostname">myhostname</a>)</b>
|
||||
@ -944,7 +949,7 @@ SMTP(8) SMTP(8)
|
||||
The syslog facility of Postfix logging.
|
||||
|
||||
<b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
|
||||
A prefix that is prepended to the process name in syslog
|
||||
A prefix that is prepended to the process name in syslog
|
||||
records, so that, for example, "smtpd" becomes "prefix/smtpd".
|
||||
|
||||
Available with Postfix 2.2 and earlier:
|
||||
@ -962,7 +967,7 @@ SMTP(8) SMTP(8)
|
||||
Available with Postfix 3.0 and later:
|
||||
|
||||
<b><a href="postconf.5.html#smtp_address_verify_target">smtp_address_verify_target</a> (rcpt)</b>
|
||||
In the context of email address verification, the SMTP protocol
|
||||
In the context of email address verification, the SMTP protocol
|
||||
stage that determines whether an email address is deliverable.
|
||||
|
||||
Available with Postfix 3.1 and later:
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2741,6 +2741,21 @@ Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
|
||||
The default time unit is s (seconds).
|
||||
.PP
|
||||
This feature is available in Postfix 2.1 and later.
|
||||
.SH known_tcp_ports (default: lmtp=24, smtp=25, smtps=submissions=465, submission=587)
|
||||
Optional setting that avoids lookups in the \fBservices\fR(5) database.
|
||||
This feature was implemented to address inconsistencies in the name
|
||||
of the port "465" service. The ABNF is:
|
||||
.sp
|
||||
.in +4
|
||||
known_tcp_ports = empty | name\-to\-port *("," name\-to\-port)
|
||||
.br
|
||||
name\-to\-port = 1*(service\-name "=') port\-number
|
||||
.in -4
|
||||
.PP
|
||||
Whitespace is optional but it cannot appear inside a service
|
||||
name or port number.
|
||||
.PP
|
||||
This feature is available in Postfix 3.6 and later.
|
||||
.SH line_length_limit (default: 2048)
|
||||
Upon input, long lines are chopped up into pieces of at most
|
||||
this length; upon delivery, long lines are reconstructed.
|
||||
|
@ -178,6 +178,10 @@ records, so that, for example, "smtpd" becomes "prefix/smtpd".
|
||||
Available in Postfix 3.3 and later:
|
||||
.IP "\fBservice_name (read\-only)\fR"
|
||||
The master.cf service name of a Postfix daemon process.
|
||||
.PP
|
||||
Available in Postfix 3.6 and later:
|
||||
.IP "\fBknown_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submission=587)\fR"
|
||||
Optional setting that avoids lookups in the \fBservices\fR(5) database.
|
||||
.SH "FILES"
|
||||
.na
|
||||
.nf
|
||||
|
@ -362,6 +362,8 @@ Available in Postfix 3.6 and later:
|
||||
The DNS query type (default: "ns") and DNS query name (default:
|
||||
".") that Postfix may use to determine whether DNSSEC validation
|
||||
is available.
|
||||
.IP "\fBknown_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submission=587)\fR"
|
||||
Optional setting that avoids lookups in the \fBservices\fR(5) database.
|
||||
.SH "MIME PROCESSING CONTROLS"
|
||||
.na
|
||||
.nf
|
||||
|
@ -164,6 +164,8 @@ Optional filter for Postfix SMTP server DNS lookup results.
|
||||
Available in Postfix version 3.6 and later:
|
||||
.IP "\fBsmtpd_relay_before_recipient_restrictions (see 'postconf -d' output)\fR"
|
||||
Evaluate smtpd_relay_restrictions before smtpd_recipient_restrictions.
|
||||
.IP "\fBknown_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submission=587)\fR"
|
||||
Optional setting that avoids lookups in the \fBservices\fR(5) database.
|
||||
.SH "ADDRESS REWRITING CONTROLS"
|
||||
.na
|
||||
.nf
|
||||
|
@ -18039,3 +18039,22 @@ command, and both support the same features. </p>
|
||||
use 'allowlist', 'denylist', and variations of those words. </p>
|
||||
|
||||
<p> This feature is available in Postfix 3.6 and later. </p>
|
||||
|
||||
%PARAM known_tcp_ports lmtp=24, smtp=25, smtps=submissions=465, submission=587
|
||||
|
||||
<p> Optional setting that avoids lookups in the services(5) database.
|
||||
This feature was implemented to address inconsistencies in the name
|
||||
of the port "465" service. The ABNF is:
|
||||
</p>
|
||||
|
||||
<blockquote>
|
||||
<p>
|
||||
known_tcp_ports = empty | name-to-port *("," name-to-port) <br>
|
||||
name-to-port = 1*(service-name "=') port-number
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
<p> Whitespace is optional but it cannot appear inside a service
|
||||
name or port number. </p>
|
||||
|
||||
<p> This feature is available in Postfix 3.6 and later. </p>
|
||||
|
@ -37,7 +37,7 @@ SRCS = abounce.c anvil_clnt.c been_here.c bounce.c bounce_log.c \
|
||||
mail_addr_form.c quote_flags.c maillog_client.c \
|
||||
normalize_mailhost_addr.c map_search.c reject_deliver_request.c \
|
||||
info_log_addr_form.c sasl_mech_filter.c login_sender_match.c \
|
||||
test_main.c compat_level.c
|
||||
test_main.c compat_level.c config_known_tcp_ports.c
|
||||
OBJS = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
|
||||
canon_addr.o cfg_parser.o cleanup_strerror.o cleanup_strflags.o \
|
||||
clnt_stream.o conv_time.o db_common.o debug_peer.o debug_process.o \
|
||||
@ -76,7 +76,7 @@ OBJS = abounce.o anvil_clnt.o been_here.o bounce.o bounce_log.o \
|
||||
$(NON_PLUGIN_MAP_OBJ) mail_addr_form.o quote_flags.o maillog_client.o \
|
||||
normalize_mailhost_addr.o map_search.o reject_deliver_request.o \
|
||||
info_log_addr_form.o sasl_mech_filter.o login_sender_match.o \
|
||||
test_main.o compat_level.o
|
||||
test_main.o compat_level.o config_known_tcp_ports.o
|
||||
# MAP_OBJ is for maps that may be dynamically loaded with dynamicmaps.cf.
|
||||
# When hard-linking these maps, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ),
|
||||
# otherwise it sets the PLUGIN_* macros.
|
||||
@ -112,7 +112,7 @@ HDRS = abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h \
|
||||
attr_override.h mail_parm_split.h midna_adomain.h mail_addr_form.h \
|
||||
maillog_client.h normalize_mailhost_addr.h map_search.h \
|
||||
info_log_addr_form.h sasl_mech_filter.h login_sender_match.h \
|
||||
test_main.h compat_level.h
|
||||
test_main.h compat_level.h config_known_tcp_ports.h
|
||||
TESTSRC = rec2stream.c stream2rec.c recdump.c
|
||||
DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE)
|
||||
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
|
||||
@ -129,7 +129,7 @@ TESTPROG= domain_list dot_lockfile mail_addr_crunch mail_addr_find \
|
||||
mail_version mail_dict server_acl uxtext mail_parm_split \
|
||||
fold_addr smtp_reply_footer mail_addr_map normalize_mailhost_addr \
|
||||
haproxy_srvr map_search delivered_hdr login_sender_match \
|
||||
compat_level
|
||||
compat_level config_known_tcp_ports
|
||||
|
||||
LIBS = ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
|
||||
LIB_DIR = ../../lib
|
||||
@ -406,6 +406,9 @@ login_sender_match: login_sender_match.c $(LIB) $(LIBS)
|
||||
compat_level: compat_level.c $(LIB) $(LIBS)
|
||||
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
|
||||
|
||||
config_known_tcp_ports: config_known_tcp_ports.c $(LIB) $(LIBS)
|
||||
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(LIBS) $(SYSLIBS)
|
||||
|
||||
tests: tok822_test mime_tests strip_addr_test tok822_limit_test \
|
||||
xtext_test scache_multi_test ehlo_mask_test \
|
||||
namadr_list_test mail_conf_time_test header_body_checks_tests \
|
||||
@ -414,7 +417,8 @@ tests: tok822_test mime_tests strip_addr_test tok822_limit_test \
|
||||
smtp_reply_footer_test off_cvt_test mail_addr_crunch_test \
|
||||
mail_addr_find_test mail_addr_map_test quote_822_local_test \
|
||||
normalize_mailhost_addr_test haproxy_srvr_test map_search_test \
|
||||
delivered_hdr_test login_sender_match_test compat_level_test
|
||||
delivered_hdr_test login_sender_match_test compat_level_test \
|
||||
config_known_tcp_ports_test
|
||||
|
||||
mime_tests: mime_test mime_nest mime_8bit mime_dom mime_trunc mime_cvt \
|
||||
mime_cvt2 mime_cvt3 mime_garb1 mime_garb2 mime_garb3 mime_garb4
|
||||
@ -766,6 +770,13 @@ compat_level_convert_test: update compat_level compat_level_convert.in \
|
||||
diff compat_level_convert.ref compat_level_convert.tmp
|
||||
rm -f compat_level_convert.tmp
|
||||
|
||||
config_known_tcp_ports_test: update config_known_tcp_ports \
|
||||
config_known_tcp_ports.ref
|
||||
-$(SHLIB_ENV) $(VALGRIND) ./config_known_tcp_ports \
|
||||
>config_known_tcp_ports.tmp 2>&1
|
||||
diff config_known_tcp_ports.ref config_known_tcp_ports.tmp
|
||||
rm -f config_known_tcp_ports.tmp
|
||||
|
||||
printfck: $(OBJS) $(PROG)
|
||||
rm -rf printfck
|
||||
mkdir printfck
|
||||
@ -977,6 +988,17 @@ compat_level.o: ../../include/vbuf.h
|
||||
compat_level.o: ../../include/vstring.h
|
||||
compat_level.o: compat_level.c
|
||||
compat_level.o: compat_level.h
|
||||
config_known_tcp_ports.o: ../../include/argv.h
|
||||
config_known_tcp_ports.o: ../../include/check_arg.h
|
||||
config_known_tcp_ports.o: ../../include/known_tcp_ports.h
|
||||
config_known_tcp_ports.o: ../../include/msg.h
|
||||
config_known_tcp_ports.o: ../../include/mymalloc.h
|
||||
config_known_tcp_ports.o: ../../include/stringops.h
|
||||
config_known_tcp_ports.o: ../../include/sys_defs.h
|
||||
config_known_tcp_ports.o: ../../include/vbuf.h
|
||||
config_known_tcp_ports.o: ../../include/vstring.h
|
||||
config_known_tcp_ports.o: config_known_tcp_ports.c
|
||||
config_known_tcp_ports.o: config_known_tcp_ports.h
|
||||
conv_time.o: ../../include/msg.h
|
||||
conv_time.o: ../../include/sys_defs.h
|
||||
conv_time.o: conv_time.c
|
||||
@ -1989,7 +2011,6 @@ mail_stream.o: mail_stream.c
|
||||
mail_stream.o: mail_stream.h
|
||||
mail_stream.o: opened.h
|
||||
mail_task.o: ../../include/check_arg.h
|
||||
mail_task.o: ../../include/msg.h
|
||||
mail_task.o: ../../include/safe.h
|
||||
mail_task.o: ../../include/sys_defs.h
|
||||
mail_task.o: ../../include/vbuf.h
|
||||
|
248
postfix/src/global/config_known_tcp_ports.c
Normal file
248
postfix/src/global/config_known_tcp_ports.c
Normal file
@ -0,0 +1,248 @@
|
||||
/*++
|
||||
/* NAME
|
||||
/* config_known_tcp_ports 3
|
||||
/* SUMMARY
|
||||
/* parse and store known TCP port configuration
|
||||
/* SYNOPSIS
|
||||
/* #include <config_known_tcp_ports.h>
|
||||
/*
|
||||
/* void config_known_tcp_ports(
|
||||
/* const char *source,
|
||||
/* const char *settings);
|
||||
/* DESCRIPTION
|
||||
/* config_known_tcp_ports() parses the known TCP port information
|
||||
/* in the settings argument, and reports any warnings to the standard
|
||||
/* error stream. The source argument is used to provide warning
|
||||
/* context. It typically is a configuration parameter name.
|
||||
/* .SH EXPECTED SYNTAX (ABNF)
|
||||
/* configuration = empty | name-to-port *("," name-to-port)
|
||||
/* name-to-port = 1*(name "=") port
|
||||
/* SH EXAMPLES
|
||||
/* In the example below, the whitespace is optional.
|
||||
/* smtp = 25, smtps = submissions = 465, submission = 587
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
/* .fi
|
||||
/* The Secure Mailer license must be distributed with this software.
|
||||
/* AUTHOR(S)
|
||||
/* Wietse Venema
|
||||
/* Google, Inc.
|
||||
/* 111 8th Avenue
|
||||
/* New York, NY 10011, USA
|
||||
/*--*/
|
||||
|
||||
/*
|
||||
* System library.
|
||||
*/
|
||||
#include <sys_defs.h>
|
||||
|
||||
/*
|
||||
* Utility library.
|
||||
*/
|
||||
#include <argv.h>
|
||||
#include <known_tcp_ports.h>
|
||||
#include <msg.h>
|
||||
#include <mymalloc.h>
|
||||
#include <stringops.h>
|
||||
|
||||
/*
|
||||
* Application-specific.
|
||||
*/
|
||||
#include <config_known_tcp_ports.h>
|
||||
|
||||
/* config_known_tcp_ports - parse configuration and store associations */
|
||||
|
||||
void config_known_tcp_ports(const char *source, const char *settings)
|
||||
{
|
||||
ARGV *associations;
|
||||
ARGV *association;
|
||||
char **cpp;
|
||||
|
||||
/*
|
||||
* The settings is in the form of associations separated by comma. Split
|
||||
* it into separate associations.
|
||||
*/
|
||||
associations = argv_split(settings, ",");
|
||||
if (associations->argc == 0) {
|
||||
argv_free(associations);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Each association is in the form of "1*(name =) port". We use
|
||||
* argv_split() to carve this up, then we use mystrtok() to validate the
|
||||
* individual fragments. But first we prepend and append space so that we
|
||||
* get sensible results when an association starts or ends in "=".
|
||||
*/
|
||||
for (cpp = associations->argv; *cpp != 0; cpp++) {
|
||||
char *temp = concatenate(" ", *cpp, " ", (char *) 0);
|
||||
|
||||
association = argv_split(temp, "=");
|
||||
myfree(temp);
|
||||
|
||||
if (association->argc == 0) {
|
||||
/* empty, ignore */ ;
|
||||
} else if (association->argc == 1) {
|
||||
msg_warn("%s: in \"%s\" is not in \"name = value\" form",
|
||||
source, *cpp);
|
||||
} else {
|
||||
char *bp;
|
||||
char *lhs;
|
||||
char *rhs;
|
||||
const char *err = 0;
|
||||
int n;
|
||||
|
||||
bp = association->argv[association->argc - 1];
|
||||
if ((rhs = mystrtok(&bp, CHARS_SPACE)) == 0) {
|
||||
err = "missing port value after \"=\"";
|
||||
} else if (mystrtok(&bp, CHARS_SPACE) != 0) {
|
||||
err = "whitespace in port number";
|
||||
} else {
|
||||
for (n = 0; n < association->argc - 1; n++) {
|
||||
const char *new_err;
|
||||
|
||||
bp = association->argv[n];
|
||||
if ((lhs = mystrtok(&bp, CHARS_SPACE)) == 0) {
|
||||
new_err = "missing service name before \"=\"";
|
||||
} else if (mystrtok(&bp, CHARS_SPACE) != 0) {
|
||||
new_err = "whitespace in service name";
|
||||
} else {
|
||||
new_err = add_known_tcp_port(lhs, rhs);
|
||||
}
|
||||
if (new_err != 0 && err == 0)
|
||||
err = new_err;
|
||||
}
|
||||
}
|
||||
if (err != 0) {
|
||||
msg_warn("%s: in \"%s\": %s", source, *cpp, err);
|
||||
}
|
||||
}
|
||||
argv_free(association);
|
||||
}
|
||||
argv_free(associations);
|
||||
}
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <msg_vstream.h>
|
||||
|
||||
#define STR(x) vstring_str(x)
|
||||
|
||||
/* TODO(wietse) make this a proper VSTREAM interface */
|
||||
|
||||
/* vstream_swap - kludge to capture output for testing */
|
||||
|
||||
static void vstream_swap(VSTREAM *one, VSTREAM *two)
|
||||
{
|
||||
VSTREAM save;
|
||||
|
||||
save = *one;
|
||||
*one = *two;
|
||||
*two = save;
|
||||
}
|
||||
|
||||
struct test_case {
|
||||
const char *label; /* identifies test case */
|
||||
const char *config; /* configuration under test */
|
||||
const char *exp_warning; /* expected warning or null */
|
||||
const char *exp_export; /* expected export or null */
|
||||
};
|
||||
|
||||
static struct test_case test_cases[] = {
|
||||
{"good",
|
||||
/* config */ "smtp = 25, smtps = submissions = 465, lmtp = 24",
|
||||
/* warning */ "",
|
||||
/* export */ "lmtp=24 smtp=25 smtps=465 submissions=465"
|
||||
},
|
||||
{"port test 1",
|
||||
/* config */ "smtps = submission =",
|
||||
/* warning */ "config_known_tcp_ports: warning: port test 1: "
|
||||
"in \"smtps = submission =\": missing port value after \"=\"\n",
|
||||
/* export */ ""
|
||||
},
|
||||
{"port test 2",
|
||||
/* config */ "smtps = submission = 4 65",
|
||||
/* warning */ "config_known_tcp_ports: warning: port test 2: "
|
||||
"in \"smtps = submission = 4 65\": whitespace in port number\n",
|
||||
/* export */ ""
|
||||
},
|
||||
{"port test 3",
|
||||
/* config */ "lmtp = 24, smtps = submission = foo",
|
||||
/* warning */ "config_known_tcp_ports: warning: port test 3: "
|
||||
"in \" smtps = submission = foo\": non-numerical service port\n",
|
||||
/* export */ "lmtp=24"
|
||||
},
|
||||
{"service name test 1",
|
||||
/* config */ "smtps = sub mission = 465",
|
||||
/* warning */ "config_known_tcp_ports: warning: service name test 1: "
|
||||
"in \"smtps = sub mission = 465\": whitespace in service name\n",
|
||||
/* export */ "smtps=465"
|
||||
},
|
||||
{"service name test 2",
|
||||
/* config */ "lmtp = 24, smtps = 1234 = submissions = 465",
|
||||
/* warning */ "config_known_tcp_ports: warning: service name test 2: "
|
||||
"in \" smtps = 1234 = submissions = 465\": numerical service name\n",
|
||||
/* export */ "lmtp=24 smtps=465 submissions=465"
|
||||
},
|
||||
0,
|
||||
};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
VSTRING *export_buf;
|
||||
struct test_case *tp;
|
||||
int pass = 0;
|
||||
int fail = 0;
|
||||
int test_failed;
|
||||
const char *export;
|
||||
VSTRING *msg_buf;
|
||||
VSTREAM *memory_stream;
|
||||
|
||||
#define STRING_OR_NULL(s) ((s) ? (s) : "(null)")
|
||||
|
||||
msg_vstream_init("config_known_tcp_ports", VSTREAM_ERR);
|
||||
|
||||
export_buf = vstring_alloc(100);
|
||||
msg_buf = vstring_alloc(100);
|
||||
for (tp = test_cases; tp->label != 0; tp++) {
|
||||
test_failed = 0;
|
||||
if ((memory_stream = vstream_memopen(msg_buf, O_WRONLY)) == 0)
|
||||
msg_fatal("open memory stream: %m");
|
||||
vstream_swap(VSTREAM_ERR, memory_stream);
|
||||
config_known_tcp_ports(tp->label, tp->config);
|
||||
vstream_swap(memory_stream, VSTREAM_ERR);
|
||||
if (vstream_fclose(memory_stream))
|
||||
msg_fatal("close memory stream: %m");
|
||||
if (strcmp(STR(msg_buf), tp->exp_warning) != 0) {
|
||||
msg_warn("test case %s: got error: \"%s\", want: \"%s\"",
|
||||
tp->label, STR(msg_buf),
|
||||
STRING_OR_NULL(tp->exp_warning));
|
||||
test_failed = 1;
|
||||
} else {
|
||||
export = export_known_tcp_ports(export_buf);
|
||||
if (strcmp(export, tp->exp_export) != 0) {
|
||||
msg_warn("test case %s: got export: \"%s\", want: \"%s\"",
|
||||
tp->label, export, tp->exp_export);
|
||||
test_failed = 1;
|
||||
}
|
||||
clear_known_tcp_ports();
|
||||
VSTRING_RESET(msg_buf);
|
||||
VSTRING_TERMINATE(msg_buf);
|
||||
}
|
||||
if (test_failed) {
|
||||
msg_info("%s: FAIL", tp->label);
|
||||
fail++;
|
||||
} else {
|
||||
msg_info("%s: PASS", tp->label);
|
||||
pass++;
|
||||
}
|
||||
}
|
||||
msg_info("PASS=%d FAIL=%d", pass, fail);
|
||||
vstring_free(msg_buf);
|
||||
vstring_free(export_buf);
|
||||
exit(fail != 0);
|
||||
}
|
||||
|
||||
#endif
|
30
postfix/src/global/config_known_tcp_ports.h
Normal file
30
postfix/src/global/config_known_tcp_ports.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef _CONFIG_KNOWN_TCP_PORTS_H_INCLUDED_
|
||||
#define _CONFIG_KNOWN_TCP_PORTS_H_INCLUDED_
|
||||
|
||||
/*++
|
||||
/* NAME
|
||||
/* config_known_tcp_ports 3h
|
||||
/* SUMMARY
|
||||
/* parse and store known TCP port configuration
|
||||
/* SYNOPSIS
|
||||
/* #include <config_known_tcp_ports.h>
|
||||
/* DESCRIPTION
|
||||
/* .nf
|
||||
|
||||
/*
|
||||
* External interface.
|
||||
*/
|
||||
extern void config_known_tcp_ports(const char *source, const char *settings);
|
||||
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
/* .fi
|
||||
/* The Secure Mailer license must be distributed with this software.
|
||||
/* AUTHOR(S)
|
||||
/* Wietse Venema
|
||||
/* Google, Inc.
|
||||
/* 111 8th Avenue
|
||||
/* New York, NY 10011, USA
|
||||
/*--*/
|
||||
|
||||
#endif
|
7
postfix/src/global/config_known_tcp_ports.ref
Normal file
7
postfix/src/global/config_known_tcp_ports.ref
Normal file
@ -0,0 +1,7 @@
|
||||
config_known_tcp_ports: good: PASS
|
||||
config_known_tcp_ports: port test 1: PASS
|
||||
config_known_tcp_ports: port test 2: PASS
|
||||
config_known_tcp_ports: port test 3: PASS
|
||||
config_known_tcp_ports: service name test 1: PASS
|
||||
config_known_tcp_ports: service name test 2: PASS
|
||||
config_known_tcp_ports: PASS=6 FAIL=0
|
@ -164,6 +164,7 @@
|
||||
/* char *var_dnssec_probe;
|
||||
/* bool var_relay_before_rcpt_checks;
|
||||
/* bool var_respectful_logging;
|
||||
/* char *var_known_tcp_ports;
|
||||
/* DESCRIPTION
|
||||
/* This module (actually the associated include file) defines
|
||||
/* the names and defaults of all mail configuration parameters.
|
||||
@ -377,6 +378,7 @@ char *var_postlog_service;
|
||||
|
||||
char *var_dnssec_probe;
|
||||
bool var_respectful_logging;
|
||||
char *var_known_tcp_ports;
|
||||
|
||||
const char null_format_string[1] = "";
|
||||
|
||||
@ -728,6 +730,7 @@ void mail_params_init()
|
||||
VAR_MAILLOG_FILE_STAMP, DEF_MAILLOG_FILE_STAMP, &var_maillog_file_stamp, 1, 0,
|
||||
VAR_POSTLOG_SERVICE, DEF_POSTLOG_SERVICE, &var_postlog_service, 1, 0,
|
||||
VAR_DNSSEC_PROBE, DEF_DNSSEC_PROBE, &var_dnssec_probe, 0, 0,
|
||||
VAR_KNOWN_TCP_PORTS, DEF_KNOWN_TCP_PORTS, &var_known_tcp_ports, 0, 0,
|
||||
0,
|
||||
};
|
||||
static const CONFIG_BOOL_TABLE first_bool_defaults[] = {
|
||||
|
@ -4275,6 +4275,14 @@ extern char *var_info_log_addr_form;
|
||||
#define DEF_DNSSEC_PROBE "ns:."
|
||||
extern char *var_dnssec_probe;
|
||||
|
||||
/*
|
||||
* Pre-empt services(5) lookups.
|
||||
*/
|
||||
#define VAR_KNOWN_TCP_PORTS "known_tcp_ports"
|
||||
#define DEF_KNOWN_TCP_PORTS \
|
||||
"lmtp=24, smtp=25, smtps=submissions=465, submission=587"
|
||||
extern char *var_known_tcp_ports;
|
||||
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
/* .fi
|
||||
|
@ -20,7 +20,7 @@
|
||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||
* patchlevel; they change the release date only.
|
||||
*/
|
||||
#define MAIL_RELEASE_DATE "20210411"
|
||||
#define MAIL_RELEASE_DATE "20210418"
|
||||
#define MAIL_VERSION_NUMBER "3.6"
|
||||
|
||||
#ifdef SNAPSHOT
|
||||
|
@ -2,9 +2,9 @@ dummy/168.100.3.2: YES
|
||||
dummy/168.100.3.2: NO
|
||||
dummy/168.100.3.3: YES
|
||||
dummy/168.100.3.16: NO
|
||||
./namadr_list: warning: command line: bad net/mask pattern: "168.100.3.0/98"
|
||||
./namadr_list: warning: command line: bad mask length in "168.100.3.0/98"
|
||||
dummy/168.100.3.16: ERROR
|
||||
./namadr_list: warning: command line: bad net/mask pattern: "168.100.589.0/28"
|
||||
./namadr_list: warning: command line: bad network value in "168.100.589.0/28"
|
||||
dummy/168.100.3.16: ERROR
|
||||
dummy/168.100.989.16: NO
|
||||
./namadr_list: error: unsupported dictionary type: 2001
|
||||
@ -32,7 +32,7 @@ foo/168.100.3.3: YES
|
||||
bar/168.100.3.3: NO
|
||||
baz/168.100.3.3: YES
|
||||
x.x.x/127.0.0.1: NO
|
||||
./namadr_list: warning: command line: bad net/mask pattern: "be/be"
|
||||
./namadr_list: warning: command line: bad mask value in "be/be"
|
||||
x.x.x/127.0.0.1: ERROR
|
||||
x.x.x/127.0.0.1: NO
|
||||
./namadr_list: warning: command line: bad address pattern: "be:be"
|
||||
|
@ -162,6 +162,10 @@
|
||||
/* Available in Postfix 3.3 and later:
|
||||
/* .IP "\fBservice_name (read-only)\fR"
|
||||
/* The master.cf service name of a Postfix daemon process.
|
||||
/* .PP
|
||||
/* Available in Postfix 3.6 and later:
|
||||
/* .IP "\fBknown_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submission=587)\fR"
|
||||
/* Optional setting that avoids lookups in the \fBservices\fR(5) database.
|
||||
/* FILES
|
||||
/* .ad
|
||||
/* .fi
|
||||
|
@ -74,6 +74,7 @@ posttls-finger.o: ../../include/host_port.h
|
||||
posttls-finger.o: ../../include/htable.h
|
||||
posttls-finger.o: ../../include/inet_proto.h
|
||||
posttls-finger.o: ../../include/iostuff.h
|
||||
posttls-finger.o: ../../include/known_tcp_ports.h
|
||||
posttls-finger.o: ../../include/mail_conf.h
|
||||
posttls-finger.o: ../../include/mail_params.h
|
||||
posttls-finger.o: ../../include/mail_parm_split.h
|
||||
|
@ -371,6 +371,7 @@
|
||||
#include <sock_addr.h>
|
||||
#include <midna_domain.h>
|
||||
#include <clean_env.h>
|
||||
#include <known_tcp_ports.h>
|
||||
|
||||
#define STR(x) vstring_str(x)
|
||||
|
||||
@ -1492,7 +1493,7 @@ static char *parse_destination(char *destination, char *def_service,
|
||||
msg_fatal("bad network port in destination: %s", destination);
|
||||
*portp = htons(port);
|
||||
} else {
|
||||
if ((sp = getservbyname(service, protocol)) != 0)
|
||||
if ((sp = getservbyname(filter_known_tcp_port(service), protocol)) != 0)
|
||||
*portp = sp->s_port;
|
||||
else if (strcmp(service, "smtp") == 0)
|
||||
*portp = htons(25);
|
||||
|
@ -247,6 +247,7 @@ smtp_connect.o: ../../include/htable.h
|
||||
smtp_connect.o: ../../include/inet_addr_list.h
|
||||
smtp_connect.o: ../../include/inet_proto.h
|
||||
smtp_connect.o: ../../include/iostuff.h
|
||||
smtp_connect.o: ../../include/known_tcp_ports.h
|
||||
smtp_connect.o: ../../include/mail_addr.h
|
||||
smtp_connect.o: ../../include/mail_error.h
|
||||
smtp_connect.o: ../../include/mail_params.h
|
||||
|
@ -336,6 +336,8 @@
|
||||
/* The DNS query type (default: "ns") and DNS query name (default:
|
||||
/* ".") that Postfix may use to determine whether DNSSEC validation
|
||||
/* is available.
|
||||
/* .IP "\fBknown_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submission=587)\fR"
|
||||
/* Optional setting that avoids lookups in the \fBservices\fR(5) database.
|
||||
/* MIME PROCESSING CONTROLS
|
||||
/* .ad
|
||||
/* .fi
|
||||
|
@ -93,6 +93,7 @@
|
||||
#include <myaddrinfo.h>
|
||||
#include <sock_addr.h>
|
||||
#include <inet_proto.h>
|
||||
#include <known_tcp_ports.h>
|
||||
|
||||
/* Global library. */
|
||||
|
||||
@ -360,7 +361,7 @@ static char *smtp_parse_destination(char *destination, char *def_service,
|
||||
msg_fatal("bad network port in destination: %s", destination);
|
||||
*portp = htons(port);
|
||||
} else {
|
||||
if ((sp = getservbyname(service, protocol)) == 0)
|
||||
if ((sp = getservbyname(filter_known_tcp_port(service), protocol)) == 0)
|
||||
msg_fatal("unknown service: %s/%s", service, protocol);
|
||||
*portp = sp->s_port;
|
||||
}
|
||||
|
@ -148,6 +148,8 @@
|
||||
/* Available in Postfix version 3.6 and later:
|
||||
/* .IP "\fBsmtpd_relay_before_recipient_restrictions (see 'postconf -d' output)\fR"
|
||||
/* Evaluate smtpd_relay_restrictions before smtpd_recipient_restrictions.
|
||||
/* .IP "\fBknown_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submission=587)\fR"
|
||||
/* Optional setting that avoids lookups in the \fBservices\fR(5) database.
|
||||
/* ADDRESS REWRITING CONTROLS
|
||||
/* .ad
|
||||
/* .fi
|
||||
|
@ -42,7 +42,7 @@ SRCS = alldig.c allprint.c argv.c argv_split.c attr_clnt.c attr_print0.c \
|
||||
extpar.c dict_inline.c casefold.c dict_utf8.c strcasecmp_utf8.c \
|
||||
split_qnameval.c argv_attr_print.c argv_attr_scan.c dict_file.c \
|
||||
msg_logger.c logwriter.c unix_dgram_connect.c unix_dgram_listen.c \
|
||||
byte_mask.c
|
||||
byte_mask.c known_tcp_ports.c
|
||||
OBJS = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
|
||||
attr_print64.o attr_print_plain.o attr_scan0.o attr_scan64.o \
|
||||
attr_scan_plain.o auto_clnt.o base64_code.o basename.o binhash.o \
|
||||
@ -86,7 +86,7 @@ OBJS = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \
|
||||
extpar.o dict_inline.o casefold.o dict_utf8.o strcasecmp_utf8.o \
|
||||
split_qnameval.o argv_attr_print.o argv_attr_scan.o dict_file.o \
|
||||
msg_logger.o logwriter.o unix_dgram_connect.o unix_dgram_listen.o \
|
||||
byte_mask.o
|
||||
byte_mask.o known_tcp_ports.o
|
||||
# MAP_OBJ is for maps that may be dynamically loaded with dynamicmaps.cf.
|
||||
# When hard-linking these, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ),
|
||||
# otherwise it sets the PLUGIN_* macros.
|
||||
@ -116,7 +116,8 @@ HDRS = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \
|
||||
dict_fail.h warn_stat.h dict_sockmap.h line_number.h timecmp.h \
|
||||
slmdb.h compat_va_copy.h dict_pipe.h dict_random.h \
|
||||
valid_utf8_hostname.h midna_domain.h dict_union.h dict_inline.h \
|
||||
check_arg.h argv_attr.h msg_logger.h logwriter.h byte_mask.h
|
||||
check_arg.h argv_attr.h msg_logger.h logwriter.h byte_mask.h \
|
||||
known_tcp_ports.h
|
||||
TESTSRC = fifo_open.c fifo_rdwr_bug.c fifo_rdonly_bug.c select_bug.c \
|
||||
stream_test.c dup2_pass_on_exec.c
|
||||
DEFS = -I. -D$(SYSTYPE)
|
||||
@ -136,7 +137,8 @@ TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
|
||||
myaddrinfo myaddrinfo4 inet_proto sane_basename format_tv \
|
||||
valid_utf8_string ip_match base32_code msg_rate_delay netstring \
|
||||
vstream timecmp dict_cache midna_domain casefold strcasecmp_utf8 \
|
||||
vbuf_print split_qnameval vstream msg_logger byte_mask
|
||||
vbuf_print split_qnameval vstream msg_logger byte_mask \
|
||||
known_tcp_ports
|
||||
PLUGIN_MAP_SO = $(LIB_PREFIX)pcre$(LIB_SUFFIX)
|
||||
|
||||
LIB_DIR = ../../lib
|
||||
@ -547,6 +549,11 @@ split_qnameval: $(LIB)
|
||||
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
|
||||
mv junk $@.o
|
||||
|
||||
known_tcp_ports: $(LIB)
|
||||
mv $@.o junk
|
||||
$(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIB) $(SYSLIBS)
|
||||
mv junk $@.o
|
||||
|
||||
tests: all valid_hostname_test mac_expand_test dict_test unescape_test \
|
||||
hex_quote_test ctable_test inet_addr_list_test base64_code_test \
|
||||
attr_scan64_test attr_scan0_test dict_pcre_test host_port_test \
|
||||
@ -560,7 +567,7 @@ tests: all valid_hostname_test mac_expand_test dict_test unescape_test \
|
||||
vstring_test vstream_test dict_pcre_file_test dict_regexp_file_test \
|
||||
dict_cidr_file_test dict_static_file_test dict_random_test \
|
||||
dict_random_file_test dict_inline_file_test byte_mask_tests \
|
||||
mystrtok_test
|
||||
mystrtok_test known_tcp_ports_test
|
||||
|
||||
root_tests:
|
||||
|
||||
@ -963,6 +970,11 @@ mystrtok_test: mystrtok mystrtok.ref
|
||||
diff mystrtok.ref mystrtok.tmp
|
||||
rm -f mystrtok.tmp
|
||||
|
||||
known_tcp_ports_test: known_tcp_ports known_tcp_ports.ref
|
||||
$(SHLIB_ENV) ${VALGRIND} ./known_tcp_ports >known_tcp_ports.tmp 2>&1
|
||||
diff known_tcp_ports.ref known_tcp_ports.tmp
|
||||
rm -f known_tcp_ports.tmp
|
||||
|
||||
depend: $(MAKES)
|
||||
(sed '1,/^# do not edit/!d' Makefile.in; \
|
||||
set -e; for i in [a-z][a-z0-9]*.c; do \
|
||||
@ -1784,6 +1796,7 @@ file_limit.o: sys_defs.h
|
||||
find_inet.o: check_arg.h
|
||||
find_inet.o: find_inet.c
|
||||
find_inet.o: find_inet.h
|
||||
find_inet.o: known_tcp_ports.h
|
||||
find_inet.o: msg.h
|
||||
find_inet.o: stringops.h
|
||||
find_inet.o: sys_defs.h
|
||||
@ -1936,6 +1949,15 @@ ip_match.o: vstring.h
|
||||
killme_after.o: killme_after.c
|
||||
killme_after.o: killme_after.h
|
||||
killme_after.o: sys_defs.h
|
||||
known_tcp_ports.o: check_arg.h
|
||||
known_tcp_ports.o: htable.h
|
||||
known_tcp_ports.o: known_tcp_ports.c
|
||||
known_tcp_ports.o: known_tcp_ports.h
|
||||
known_tcp_ports.o: mymalloc.h
|
||||
known_tcp_ports.o: stringops.h
|
||||
known_tcp_ports.o: sys_defs.h
|
||||
known_tcp_ports.o: vbuf.h
|
||||
known_tcp_ports.o: vstring.h
|
||||
line_number.o: check_arg.h
|
||||
line_number.o: line_number.c
|
||||
line_number.o: line_number.h
|
||||
@ -1955,8 +1977,6 @@ load_file.o: vbuf.h
|
||||
load_file.o: vstream.h
|
||||
load_file.o: warn_stat.h
|
||||
load_lib.o: load_lib.c
|
||||
load_lib.o: load_lib.h
|
||||
load_lib.o: msg.h
|
||||
load_lib.o: sys_defs.h
|
||||
logwriter.o: check_arg.h
|
||||
logwriter.o: iostuff.h
|
||||
@ -2116,6 +2136,7 @@ mvect.o: mymalloc.h
|
||||
mvect.o: sys_defs.h
|
||||
myaddrinfo.o: check_arg.h
|
||||
myaddrinfo.o: inet_proto.h
|
||||
myaddrinfo.o: known_tcp_ports.h
|
||||
myaddrinfo.o: msg.h
|
||||
myaddrinfo.o: myaddrinfo.c
|
||||
myaddrinfo.o: myaddrinfo.h
|
||||
|
@ -52,6 +52,7 @@
|
||||
#include "msg.h"
|
||||
#include "stringops.h"
|
||||
#include "find_inet.h"
|
||||
#include "known_tcp_ports.h"
|
||||
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE 0xffffffff
|
||||
@ -89,7 +90,7 @@ int find_inet_port(const char *service, const char *protocol)
|
||||
msg_fatal("bad port number: %s", service);
|
||||
return (htons(port));
|
||||
} else {
|
||||
if ((sp = getservbyname(service, protocol)) == 0)
|
||||
if ((sp = getservbyname(filter_known_tcp_port(service), protocol)) == 0)
|
||||
msg_fatal("unknown service: %s/%s", service, protocol);
|
||||
return (sp->s_port);
|
||||
}
|
||||
|
253
postfix/src/util/known_tcp_ports.c
Normal file
253
postfix/src/util/known_tcp_ports.c
Normal file
@ -0,0 +1,253 @@
|
||||
/*++
|
||||
/* NAME
|
||||
/* known_tcp_ports 3
|
||||
/* SUMMARY
|
||||
/* reduce dependency on the services(5) database
|
||||
/* SYNOPSIS
|
||||
/* #include <known_tcp_ports.h>
|
||||
/*
|
||||
/* const char *add_known_tcp_port(
|
||||
/* const char *name)
|
||||
/* const char *port)
|
||||
/*
|
||||
/* const char *filter_known_tcp_port(
|
||||
/* const char *name_or_port)
|
||||
/*
|
||||
/* void clear_known_tcp_ports(void)
|
||||
/* AUXILIARY FUNCTIONS
|
||||
/* char *export_known_tcp_ports(
|
||||
/* VSTRING *result)
|
||||
/* DESCRIPTION
|
||||
/* This module reduces dependency on the services(5) database.
|
||||
/*
|
||||
/* add_known_tcp_port() associates a symbolic name with a numerical
|
||||
/* port. The function returns a pointer to error text if the
|
||||
/* arguments are malformed or if the symbolic name already has
|
||||
/* an association.
|
||||
/*
|
||||
/* filter_known_tcp_port() returns the argument if it does not
|
||||
/* specify a symbolic name, or if the argument specifies a symbolic
|
||||
/* name that is not associated with a numerical port. Otherwise,
|
||||
/* it returns the associated numerical port.
|
||||
/*
|
||||
/* clear_known_tcp_ports() destroys all name-number associations.
|
||||
/* string.
|
||||
/*
|
||||
/* export_known_tcp_ports() overwrites a VSTRING with all known
|
||||
/* name=port associations, sorted by service name, and separated
|
||||
/* by whitespace. The result is pointer to the VSTRING payload.
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
/* .fi
|
||||
/* The Secure Mailer license must be distributed with this software.
|
||||
/* AUTHOR(S)
|
||||
/* Wietse Venema
|
||||
/* Google, Inc.
|
||||
/* 111 8th Avenue
|
||||
/* New York, NY 10011, USA
|
||||
/*--*/
|
||||
|
||||
/*
|
||||
* System library
|
||||
*/
|
||||
#include <sys_defs.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* Utility library
|
||||
*/
|
||||
#include <htable.h>
|
||||
#include <mymalloc.h>
|
||||
#include <stringops.h>
|
||||
|
||||
/*
|
||||
* Application-specific.
|
||||
*/
|
||||
#include <known_tcp_ports.h>
|
||||
|
||||
#define STR(x) vstring_str(x)
|
||||
|
||||
static HTABLE *known_tcp_ports;
|
||||
|
||||
/* add_known_tcp_port - associate symbolic name with numerical port */
|
||||
|
||||
const char *add_known_tcp_port(const char *name, const char *port)
|
||||
{
|
||||
if (alldig(name))
|
||||
return ("numerical service name");
|
||||
if (!alldig(port))
|
||||
return ("non-numerical service port");
|
||||
if (known_tcp_ports == 0)
|
||||
known_tcp_ports = htable_create(10);
|
||||
if (htable_locate(known_tcp_ports, name) != 0)
|
||||
return ("duplicate service name");
|
||||
(void) htable_enter(known_tcp_ports, name, mystrdup(port));
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* filter_known_tcp_port - replace argument if associated with known port */
|
||||
|
||||
const char *filter_known_tcp_port(const char *name_or_port)
|
||||
{
|
||||
HTABLE_INFO *ht;
|
||||
|
||||
if (name_or_port == 0 || known_tcp_ports == 0 || alldig(name_or_port)) {
|
||||
return (name_or_port);
|
||||
} else if ((ht = htable_locate(known_tcp_ports, name_or_port)) != 0) {
|
||||
return (ht->value);
|
||||
} else {
|
||||
return (name_or_port);
|
||||
}
|
||||
}
|
||||
|
||||
/* clear_known_tcp_ports - destroy all name-port associations */
|
||||
|
||||
void clear_known_tcp_ports(void)
|
||||
{
|
||||
htable_free(known_tcp_ports, myfree);
|
||||
known_tcp_ports = 0;
|
||||
}
|
||||
|
||||
/* compare_ht_keys - compare table keys */
|
||||
|
||||
static int compare_ht_keys(const void *a, const void *b)
|
||||
{
|
||||
HTABLE_INFO **ap = (HTABLE_INFO **) a;
|
||||
HTABLE_INFO **bp = (HTABLE_INFO **) b;
|
||||
|
||||
return (strcmp((const char *) ap[0]->key, (const char *) bp[0]->key));
|
||||
}
|
||||
|
||||
/* export_known_tcp_ports - sorted dump */
|
||||
|
||||
char *export_known_tcp_ports(VSTRING *out)
|
||||
{
|
||||
HTABLE_INFO **list;
|
||||
HTABLE_INFO **ht;
|
||||
|
||||
VSTRING_RESET(out);
|
||||
if (known_tcp_ports) {
|
||||
list = htable_list(known_tcp_ports);
|
||||
qsort((void *) list, known_tcp_ports->used, sizeof(*list),
|
||||
compare_ht_keys);
|
||||
for (ht = list; *ht; ht++)
|
||||
vstring_sprintf_append(out, "%s%s=%s", ht > list ? " " : "",
|
||||
ht[0]->key, (const char *) ht[0]->value);
|
||||
myfree((void *) list);
|
||||
}
|
||||
VSTRING_TERMINATE(out);
|
||||
return (STR(out));
|
||||
}
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
#include <msg.h>
|
||||
|
||||
struct association {
|
||||
const char *lhs; /* service name */
|
||||
const char *rhs; /* service port */
|
||||
};
|
||||
|
||||
struct probe {
|
||||
const char *query; /* query */
|
||||
const char *exp_reply; /* expected reply */
|
||||
};
|
||||
|
||||
struct test_case {
|
||||
const char *label; /* identifies test case */
|
||||
struct association associations[10];
|
||||
const char *exp_err; /* expected error */
|
||||
const char *exp_export; /* expected export output */
|
||||
struct probe probes[10];
|
||||
};
|
||||
|
||||
struct test_case test_cases[] = {
|
||||
{"good",
|
||||
/* association */ {{"smtp", "25"}, {"lmtp", "24"}, 0},
|
||||
/* error */ 0,
|
||||
/* export */ "lmtp=24 smtp=25",
|
||||
/* probe */ {{"smtp", "25"}, {"1", "1"}, {"x", "x"}, {"lmtp", "24"}, 0}
|
||||
},
|
||||
{"duplicate lhs",
|
||||
/* association */ {{"smtp", "25"}, {"smtp", "100"}, 0},
|
||||
/* error */ "duplicate service name"
|
||||
},
|
||||
{"numerical lhs",
|
||||
/* association */ {{"100", "100"}, 0},
|
||||
/* error */ "numerical service name"
|
||||
},
|
||||
{"symbolic rhs",
|
||||
/* association */ {{"smtp", "lmtp"}, 0},
|
||||
/* error */ "non-numerical service port"
|
||||
},
|
||||
{"uninitialized",
|
||||
/* association */ {0},
|
||||
/* error */ 0,
|
||||
/* export */ "",
|
||||
/* probe */ {{"smtp", "smtp"}, {"1", "1"}, {"x", "x"}, 0}
|
||||
},
|
||||
0,
|
||||
};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
VSTRING *export_buf;
|
||||
struct test_case *tp;
|
||||
struct association *ap;
|
||||
struct probe *pp;
|
||||
int pass = 0;
|
||||
int fail = 0;
|
||||
const char *err;
|
||||
int test_failed;
|
||||
const char *reply;
|
||||
const char *export;
|
||||
|
||||
#define STRING_OR_NULL(s) ((s) ? (s) : "(null)")
|
||||
|
||||
export_buf = vstring_alloc(100);
|
||||
for (tp = test_cases; tp->label != 0; tp++) {
|
||||
test_failed = 0;
|
||||
for (err = 0, ap = tp->associations; err == 0 && ap->lhs != 0; ap++)
|
||||
err = add_known_tcp_port(ap->lhs, ap->rhs);
|
||||
if (!err != !tp->exp_err) {
|
||||
msg_warn("test case %s: got error: \"%s\", want: \"%s\"",
|
||||
tp->label, STRING_OR_NULL(err), STRING_OR_NULL(tp->exp_err));
|
||||
test_failed = 1;
|
||||
} else if (err != 0) {
|
||||
if (strcmp(err, tp->exp_err) != 0) {
|
||||
msg_warn("test case %s: got err: \"%s\", want: \"%s\"",
|
||||
tp->label, err, tp->exp_err);
|
||||
test_failed = 1;
|
||||
}
|
||||
} else {
|
||||
export = export_known_tcp_ports(export_buf);
|
||||
if (strcmp(export, tp->exp_export) != 0) {
|
||||
msg_warn("test case %s: got export: \"%s\", want: \"%s\"",
|
||||
tp->label, export, tp->exp_export);
|
||||
test_failed = 1;
|
||||
}
|
||||
for (pp = tp->probes; test_failed == 0 && pp->query != 0; pp++) {
|
||||
reply = filter_known_tcp_port(pp->query);
|
||||
if (strcmp(reply, pp->exp_reply) != 0) {
|
||||
msg_warn("test case %s: got reply: \"%s\", want: \"%s\"",
|
||||
tp->label, reply, pp->exp_reply);
|
||||
test_failed = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
clear_known_tcp_ports();
|
||||
if (test_failed) {
|
||||
msg_info("%s: FAIL", tp->label);
|
||||
fail++;
|
||||
} else {
|
||||
msg_info("%s: PASS", tp->label);
|
||||
pass++;
|
||||
}
|
||||
}
|
||||
msg_info("PASS=%d FAIL=%d", pass, fail);
|
||||
vstring_free(export_buf);
|
||||
exit(fail != 0);
|
||||
}
|
||||
|
||||
#endif
|
38
postfix/src/util/known_tcp_ports.h
Normal file
38
postfix/src/util/known_tcp_ports.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef _KNOWN_TCP_PORTS_H_INCLUDED_
|
||||
#define _KNOWN_TCP_PORTS_H_INCLUDED_
|
||||
|
||||
/*++
|
||||
/* NAME
|
||||
/* known_tcp_port 3h
|
||||
/* SUMMARY
|
||||
/* reduce dependency on the services(5) database
|
||||
/* SYNOPSIS
|
||||
/* #include <known_tcp_ports.h>
|
||||
/* DESCRIPTION
|
||||
/* .nf
|
||||
|
||||
/*
|
||||
* Utility library.
|
||||
*/
|
||||
#include <vstring.h>
|
||||
|
||||
/*
|
||||
* External interface.
|
||||
*/
|
||||
extern const char *add_known_tcp_port(const char *name, const char *port);
|
||||
extern const char *filter_known_tcp_port(const char *name_or_port);
|
||||
extern void clear_known_tcp_ports(void);
|
||||
extern char *export_known_tcp_ports(VSTRING *out);
|
||||
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
/* .fi
|
||||
/* The Secure Mailer license must be distributed with this software.
|
||||
/* AUTHOR(S)
|
||||
/* Wietse Venema
|
||||
/* Google, Inc.
|
||||
/* 111 8th Avenue
|
||||
/* New York, NY 10011, USA
|
||||
/*--*/
|
||||
|
||||
#endif
|
6
postfix/src/util/known_tcp_ports.ref
Normal file
6
postfix/src/util/known_tcp_ports.ref
Normal file
@ -0,0 +1,6 @@
|
||||
unknown: good: PASS
|
||||
unknown: duplicate lhs: PASS
|
||||
unknown: numerical lhs: PASS
|
||||
unknown: symbolic rhs: PASS
|
||||
unknown: uninitialized: PASS
|
||||
unknown: PASS=5 FAIL=0
|
@ -204,6 +204,7 @@
|
||||
#include <inet_proto.h>
|
||||
#include <myaddrinfo.h>
|
||||
#include <split_at.h>
|
||||
#include <known_tcp_ports.h>
|
||||
|
||||
/* Application-specific. */
|
||||
|
||||
@ -281,7 +282,7 @@ static int find_service(const char *service, int socktype)
|
||||
} else {
|
||||
return (-1);
|
||||
}
|
||||
if ((sp = getservbyname(service, proto)) != 0) {
|
||||
if ((sp = getservbyname(filter_known_tcp_port(service), proto)) != 0) {
|
||||
return (sp->s_port);
|
||||
} else {
|
||||
return (-1);
|
||||
@ -444,7 +445,7 @@ int hostname_to_sockaddr_pf(const char *hostname, int pf,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
err = getaddrinfo(hostname, service, &hints, res);
|
||||
err = getaddrinfo(hostname, filter_known_tcp_port(service), &hints, res);
|
||||
#if defined(BROKEN_AI_NULL_SERVICE)
|
||||
if (service == 0 && err == 0) {
|
||||
struct addrinfo *r;
|
||||
@ -560,7 +561,7 @@ int hostaddr_to_sockaddr(const char *hostaddr, const char *service,
|
||||
}
|
||||
#endif
|
||||
}
|
||||
err = getaddrinfo(hostaddr, service, &hints, res);
|
||||
err = getaddrinfo(hostaddr, filter_known_tcp_port(service), &hints, res);
|
||||
#if defined(BROKEN_AI_NULL_SERVICE)
|
||||
if (service == 0 && err == 0) {
|
||||
struct addrinfo *r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user