SMTP(8)

okay bestie, welcome to SMTP(8) from the System Manager's Manual โ€” this is the smtp / lmtp page, aka the Postfix SMTP+LMTP client. it's giving "very important mail delivery lore" and we're gonna get through all of it together, no skimming, no skipping. ๐Ÿซถ

๐ŸŽ€ NAME ๐ŸŽ€

smtp, lmtp โ€” Postfix SMTP+LMTP client


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

smtp [generic Postfix daemon options] [flags=DORX]

lmtp [generic Postfix daemon options] [flags=DORX]

โœจ DESCRIPTION โœจ

okay so the Postfix SMTP+LMTP client is the thing that actually implements the SMTP and LMTP mail delivery protocols. it takes message delivery requests from the queue manager. every single request tells it four things: a queue file, a sender address, a domain or host to deliver to, and recipient info. and listen โ€” this program expects to be run from the master(8) process manager, no freelancing. ๐Ÿ’…

the process name โ€” smtp or lmtp โ€” controls the protocol, and also controls the names of the configuration parameters that get used. so the name is literally doing the work, no cap.

then the client updates the queue file and marks recipients as finished, or it tells the queue manager "bestie we gotta try this again later." Delivery status reports get sent to the bounce(8), defer(8) or trace(8) daemon, whichever one is appropriate for the situation. ๐Ÿ“ฌ

the server lookup strategy is different for SMTP vs LMTP, and the details live in the sections "SMTP SERVER LOOKUP" and "LMTP SERVER LOOKUP" (they're both right below, don't worry).

after a successful mail transaction, a connection may be saved to the scache(8) connection cache server, so that any SMTP+LMTP client can reuse it for a subsequent transaction. iconic behavior honestly. ๐ŸŒˆ

by default, connection caching is enabled temporarily for destinations that have a high volume of mail in the active queue. but you can enable connection caching permanently for specific destinations. the more you know. โญ


๐ŸŒธ SMTP SERVER LOOKUP ๐ŸŒธ

The Postfix SMTP client supports multiple destinations separated by comma or whitespace (Postfix 3.5 and later). Each destination is tried in the specified order.

SMTP destinations have the following form:

  • domainname
  • domainname:service โ€” Look up the mail exchangers for the specified domain, and connect to the specified service (default: smtp). Optionally, mail exchangers may be looked up with SRV queries instead of MX; this requires that service is given in symbolic form.
  • [hostname]
  • [hostname]:service โ€” Look up the address(es) for the specified host, and connect to the specified service (default: smtp).
  • [address]
  • [address]:service โ€” Connect to the host at the specified address, and connect to the specified service (default: smtp). An IPv6 address must be formatted as [ipv6:address].
๐Ÿ’€ real talk: that IPv6 thing is not a suggestion, the brackets are load-bearing.

๐Ÿงš LMTP SERVER LOOKUP ๐Ÿงš

The Postfix LMTP client supports multiple destinations separated by comma or whitespace (Postfix 3.5 and later). Each destination is tried in the specified order.

LMTP destinations have the following form:

  • unix:pathname โ€” Connect to the local UNIX-domain server that is bound to the specified pathname. If the process runs chrooted, an absolute pathname is interpreted relative to the Postfix queue directory.
  • inet:domainname
  • inet:domainname:service โ€” Look up the LMTP servers for the specified domain and service (default: lmtp). This form is supported when SRV lookups are enabled, and requires that service is in symbolic form.
  • inet:hostname
  • inet:hostname:service โ€” Look up the address(es) for the specified host, and connect to the specified service (default: lmtp). When SRV lookups are enabled, use the form [hostname] to force address lookups.
  • inet:[address]
  • inet:[address]:service โ€” Connect to the specified local or remote host and service (default: lmtp). An IPv6 address must be formatted as [ipv6:address].

๐Ÿ’Œ SINGLE-RECIPIENT DELIVERY ๐Ÿ’Œ

lowkey important one. By default, the Postfix SMTP+LMTP client delivers mail to multiple recipients per delivery request. and that's a problem when you're prepending a Delivered-to: or X-Original-To: message header. like, it just is.

to stop Postfix from sending multiple recipients per delivery request, specify this:

transport_destination_recipient_limit = 1

in the Postfix main.cf file, where transport is the name in the first column of the Postfix master.cf entry for this mail delivery service. ๐ŸŽ€


๐Ÿ‘‘ COMMAND ATTRIBUTE SYNTAX ๐Ÿ‘‘

  • flags=DORX (optional) โ€” Optional message processing flags.
    • D โ€” Prepend a "Delivered-To: recipient" message header with the envelope recipient address. Note: for this to work, the transport_destination_recipient_limit must be 1 (see SINGLE-RECIPIENT DELIVERY above for details).

The D flag also enforces loop detection: if a message already contains a Delivered-To: header with the same recipient address, then the message is returned as undeliverable. The address comparison is case insensitive.

This feature is available as of Postfix 3.5.

  • O โ€” Prepend an "X-Original-To: recipient" message header with the recipient address as given to Postfix. Note: for this to work, the transport_destination_recipient_limit must be 1 (see SINGLE-RECIPIENT DELIVERY above for details).

This feature is available as of Postfix 3.5.

  • R โ€” Prepend a "Return-Path: <sender>" message header with the envelope sender address.

This feature is available as of Postfix 3.5.

  • X โ€” Indicates that the delivery is final. This flag affects the status reported in "success" DSN (delivery status notification) messages, and changes it from "relayed" into "delivered".

This feature is available as of Postfix 3.5.


๐Ÿ”’ SECURITY ๐Ÿ”’

The SMTP+LMTP client is moderately security-sensitive. It talks to SMTP or LMTP servers and to DNS servers on the network. The SMTP+LMTP client can be run chrooted at fixed low privilege. safe-ish queen ๐ŸŒฟ


๐Ÿ“œ STANDARDS ๐Ÿ“œ


๐Ÿฉบ DIAGNOSTICS ๐Ÿฉบ

Problems and transactions are logged to syslogd(8) or postlogd(8). Corrupted message files are marked so that the queue manager can move them to the corrupt queue for further inspection. ๐Ÿ—‚๏ธ

Depending on the setting of the notify_classes parameter, the postmaster is notified of bounces, protocol problems, and of other trouble.


๐Ÿ’€ BUGS ๐Ÿ’€

  • SMTP and LMTP connection reuse for TLS (without closing the SMTP or LMTP connection) is not supported before Postfix 3.4. so if you're on something ancient, that's on you bestie.
  • SMTP and LMTP connection reuse assumes that SASL credentials are valid for all destinations that map onto the same IP address and TCP port.

โš™๏ธ CONFIGURATION PARAMETERS โš™๏ธ

Postfix versions 2.3 and later implement the SMTP and LMTP client with the same program, and choose the protocol and configuration parameters based on the process name, smtp or lmtp. one program, two vibes. ๐Ÿฆ‹

Most smtp_xxx configuration parameters have an lmtp_xxx "mirror" parameter for the equivalent LMTP feature. This document describes only those LMTP-related parameters that aren't simply "mirror" parameters.

Changes to main.cf are picked up automatically, as smtp(8) processes run for only a limited amount of time. Use the command "postfix reload" to speed up a change. โœจ

The text below provides only a parameter summary. See postconf(5) for more details including examples.


(and yes, the parameter list itself is coming in the next part โ€” we're not done, keep reading ๐Ÿ’–)

โœจ COMPATIBILITY CONTROLS โœจ

okay so these are the controls that make Postfix play nice with weird remote servers, old Postfix versions, and the occasional firewall acting up. defaults are in the parentheses, and yes bestie you should read them. ๐Ÿ’…

  • ignore_mx_lookup_error (no) โ€” If a DNS MX lookup just gives you silence with no response, ignore it like it never happened. ๐Ÿซฅ
  • smtp_always_send_ehlo (yes) โ€” Always throw EHLO at the start of an SMTP session. no skipping. ๐Ÿ‘‘
  • smtp_never_send_ehlo (no) โ€” The opposite vibe: never send EHLO at the start of an SMTP session. ๐Ÿšซ
  • smtp_defer_if_no_mx_address_found (no) โ€” If no MX record resolves to an IP address, defer the mail delivery instead of forcing it. โณ
  • smtp_line_length_limit (998) โ€” The maximal length of message header and body lines that Postfix will send via SMTP. keep it under the limit, bestie. ๐Ÿ“
  • smtp_pix_workaround_delay_time (10s) โ€” How long the Postfix SMTP client pauses before sending .<CR><LF>, all to work around the PIX firewall "<CR><LF>.<CR><LF>" bug. ๐Ÿ˜ญ
  • smtp_pix_workaround_threshold_time (500s) โ€” How long a message must be queued before the Postfix SMTP client turns on the PIX firewall "<CR><LF>.<CR><LF>" bug workaround for delivery through firewalls with "smtp fixup" mode turned on. ๐Ÿ•ฐ๏ธ
  • smtp_pix_workarounds (disable_esmtp, delay_dotcrlf) โ€” A list that specifies zero or more workarounds for CISCO PIX firewall bugs. pick your fighters. ๐ŸฅŠ
  • smtp_pix_workaround_maps (empty) โ€” Lookup tables, indexed by the remote SMTP server address, with per-destination workarounds for CISCO PIX firewall bugs. ๐Ÿ—บ๏ธ
  • smtp_quote_rfc821_envelope (yes) โ€” Quote addresses in Postfix SMTP client MAIL FROM and RCPT TO commands as required by RFC 5321. ๐Ÿ“ฌ
  • smtp_reply_filter (empty) โ€” A mechanism to transform replies from remote SMTP servers one line at a time. glow-up for server replies. โœจ
  • smtp_skip_5xx_greeting (yes) โ€” Skip remote SMTP servers that greet with a 5XX status code. bye. ๐Ÿ‘‹
  • smtp_skip_quit_response (yes) โ€” Do not wait for the response to the SMTP QUIT command. we're out. ๐Ÿšช

โœจ Available in Postfix version 2.0 and earlier โœจ

  • smtp_skip_4xx_greeting (yes) โ€” Skip SMTP servers that greet with a 4XX status code. it's giving "go away, try again later". ๐Ÿ™…โ€โ™€๏ธ

โœจ Available in Postfix version 2.2 and later โœจ

  • smtp_discard_ehlo_keyword_address_maps (empty) โ€” Lookup tables, indexed by the remote SMTP server address, with case insensitive lists of EHLO keywords (pipelining, starttls, auth, etc.) that the Postfix SMTP client will ignore in the EHLO response from a remote SMTP server. ๐Ÿงน
  • smtp_discard_ehlo_keywords (empty) โ€” A case insensitive list of EHLO keywords (pipelining, starttls, auth, etc.) that the Postfix SMTP client will ignore in the EHLO response from a remote SMTP server. selective hearing, but make it config. ๐Ÿ™‰
  • smtp_generic_maps (empty) โ€” Optional lookup tables that perform address rewriting in the Postfix SMTP client, typically to transform a locally valid address into a globally valid address when sending mail across the Internet. ๐ŸŒ

โœจ Available in Postfix version 2.2.9 and later โœจ

  • smtp_cname_overrides_servername (version dependent) โ€” When the remote SMTP servername is a DNS CNAME, replace the servername with the result from CNAME expansion for the purpose of logging, SASL password lookup, TLS policy decisions, or TLS certificate verification. it's complicated, okay? ๐Ÿ’…

โœจ Available in Postfix version 2.3 and later โœจ

  • lmtp_discard_lhlo_keyword_address_maps (empty) โ€” Lookup tables, indexed by the remote LMTP server address, with case insensitive lists of LHLO keywords (pipelining, starttls, auth, etc.) that the Postfix LMTP client will ignore in the LHLO response from a remote LMTP server. ๐ŸŽ€
  • lmtp_discard_lhlo_keywords (empty) โ€” A case insensitive list of LHLO keywords (pipelining, starttls, auth, etc.) that the Postfix LMTP client will ignore in the LHLO response from a remote LMTP server. LMTP version of "not today". ๐ŸŒธ

โœจ Available in Postfix version 2.4.4 and later โœจ

  • send_cyrus_sasl_authzid (no) โ€” When authenticating to a remote SMTP or LMTP server with the default setting "no", send no SASL authoriZation ID (authzid); send only the SASL authentiCation ID (authcid) plus the authcid's password. no extra ID, just vibes. ๐Ÿชช

โœจ Available in Postfix version 2.5 and later โœจ

  • smtp_header_checks (empty) โ€” Restricted header_checks(5) tables for the Postfix SMTP client. ๐Ÿ”
  • smtp_mime_header_checks (empty) โ€” Restricted mime_header_checks(5) tables for the Postfix SMTP client. ๐Ÿงผ
  • smtp_nested_header_checks (empty) โ€” Restricted nested_header_checks(5) tables for the Postfix SMTP client. ๐Ÿช†
  • smtp_body_checks (empty) โ€” Restricted body_checks(5) tables for the Postfix SMTP client. ๐Ÿซถ

โœจ Available in Postfix version 2.6 and later โœจ

  • tcp_windowsize (0) โ€” An optional workaround for routers that break TCP window scaling. routers behaving badly? not on our watch. ๐Ÿ› ๏ธ

โœจ Available in Postfix version 2.8 and later โœจ

  • smtp_dns_resolver_options (empty) โ€” DNS Resolver options for the Postfix SMTP client. ๐Ÿ”ฎ

โœจ Available in Postfix version 2.9 - 3.6 โœจ

  • smtp_per_record_deadline (no) โ€” Change the behavior of the smtp_*_timeout time limits, from a time limit per read or write system call, to a time limit to send or receive a complete record (an SMTP command line, SMTP response line, SMTP message content line, or TLS protocol message). โฑ๏ธ

โœจ Available in Postfix version 2.9 and later โœจ

  • smtp_send_dummy_mail_auth (no) โ€” Whether or not to append the "AUTH=<>" option to the MAIL FROM command in SASL-authenticated SMTP sessions. ๐ŸŽŸ๏ธ

โœจ Available in Postfix version 2.11 and later โœจ

  • smtp_dns_support_level (empty) โ€” Level of DNS support in the Postfix SMTP client. how much DNS do you want? yes. ๐ŸŒ

โœจ Available in Postfix version 3.0 and later โœจ

  • smtp_delivery_status_filter ($default_delivery_status_filter) โ€” Optional filter for the smtp(8) delivery agent to change the delivery status code or explanatory text of successful or unsuccessful deliveries. ๐Ÿ’Œ
  • smtp_dns_reply_filter (empty) โ€” Optional filter for Postfix SMTP client DNS lookup results. ๐Ÿงš

โœจ Available in Postfix version 3.3 and later โœจ

  • smtp_balance_inet_protocols (yes) โ€” When a remote destination resolves to a combination of IPv4 and IPv6 addresses, ensure that the Postfix SMTP client can try both address types before it runs into the smtp_mx_address_limit. balance, bestie. โš–๏ธ

โœจ Available in Postfix 3.5 and later โœจ

  • info_log_address_format (external) โ€” The email address form that will be used in non-debug logging (info, warning, etc.). ๐Ÿ“

โœจ Available in Postfix 3.6 and later โœจ

  • dnssec_probe (ns:.) โ€” The DNS query type (default: "ns") and DNS query name (default: ".") that Postfix may use to determine whether DNSSEC validation is available. ๐Ÿ›ก๏ธ
  • known_tcp_ports (lmtp=24, smtp=25, smtps=submissions=465, submission=587) โ€” Optional setting that avoids lookups in the services(5) database. skip the line. ๐Ÿš€

โœจ Available in Postfix version 3.7 and later โœจ

  • smtp_per_request_deadline (no) โ€” Change the behavior of the smtp_*_timeout time limits, from a time limit per plaintext or TLS read or write call, to a combined time limit for sending a complete SMTP request and for receiving a complete SMTP response. โณ
  • smtp_min_data_rate (500) โ€” The minimum plaintext data transfer rate in bytes/second for DATA requests, when deadlines are enabled with smtp_per_request_deadline. speed check. ๐ŸŽ๏ธ
  • header_from_format (standard) โ€” The format of the Postfix-generated From: header. ๐Ÿ’Œ

โœจ Available in Postfix version 3.8 and later โœจ

  • use_srv_lookup (empty) โ€” Enables discovery for the specified service(s) using DNS SRV records. โœจ
  • ignore_srv_lookup_error (no) โ€” When SRV record lookup fails, fall back to MX or IP address lookup as if SRV record lookup was not enabled. fallback era. ๐Ÿ‚
  • allow_srv_lookup_fallback (no) โ€” When SRV record lookup fails or no SRV record exists, fall back to MX or IP address lookup as if SRV record lookup was not enabled. another fallback button. ๐Ÿซถ

โœจ MIME PROCESSING CONTROLS โœจ

โœจ Available in Postfix version 2.0 and later โœจ

  • disable_mime_output_conversion (no) โ€” Disable the conversion of 8BITMIME format to 7BIT format. no downgrades. ๐Ÿ’…
  • mime_boundary_length_limit (2048) โ€” The maximal length of MIME multipart boundary strings. long boundaries are not the vibe. ๐Ÿ“
  • mime_nesting_limit (100) โ€” The maximal recursion level that the MIME processor will handle. don't go deeper. ๐ŸŒ€

โœจ EXTERNAL CONTENT INSPECTION CONTROLS โœจ

โœจ Available in Postfix version 2.1 and later โœจ

  • smtp_send_xforward_command (no) โ€” Send the non-standard XFORWARD command when the Postfix SMTP server EHLO response announces XFORWARD support. fancy. ๐ŸŽฉ

โœจ SASL AUTHENTICATION CONTROLS โœจ

okay bestie, this whole cluster is the Postfix SMTP client proving it's actually allowed to talk to the remote server ๐Ÿ’… every knob in here is about that little authentication moment, so let's go one by one, no skipping, we're thorough in this house ๐Ÿซถ

  • smtp_sasl_auth_enable (no) โ€” turn SASL authentication ON in the Postfix SMTP client. default is off, so if you want it, you actually have to say so ๐Ÿ™ˆ
  • smtp_sasl_password_maps (empty) โ€” optional Postfix SMTP client lookup tables, with one username:password entry per sender, per remote hostname, or per next-hop domain. your little credential stash ๐Ÿ“
  • smtp_sasl_security_options (noplaintext, noanonymous) โ€” the Postfix SMTP client's SASL security options. and heads up bestie: starting in Postfix 2.3, the list of features you can actually pick from depends on the SASL client implementation that got selected with smtp_sasl_type โœจ so it's giving "your mileage depends on your plugin" energy.

Available in Postfix version 2.2 and later:

  • smtp_sasl_mechanism_filter (empty) โ€” if it's non-empty, it's a Postfix SMTP client filter for the remote SMTP server's list of offered SASL mechanisms ๐ŸŽ€

Available in Postfix version 2.3 and later:

  • smtp_sender_dependent_authentication (no) โ€” turns on sender-dependent authentication in the Postfix SMTP client. important tho: this one is available only with SASL authentication, and it disables SMTP connection caching so that mail from different senders will use the appropriate credentials. no cutting corners, the right creds for the right sender, periodt ๐Ÿ’…
  • smtp_sasl_path (empty) โ€” implementation-specific information that the Postfix SMTP client passes through to the SASL plug-in implementation selected with smtp_sasl_type ๐Ÿงš
  • smtp_sasl_type (cyrus) โ€” the SASL plug-in type the Postfix SMTP client should use for authentication. default vibe is cyrus โœจ

Available in Postfix version 2.5 and later:

  • smtp_sasl_auth_cache_name (empty) โ€” an optional table whose whole job is to prevent repeated SASL authentication failures against the same remote SMTP server hostname, username and password. it's the "we already tried this, we're not doing it again" table ๐Ÿ™ˆ
  • smtp_sasl_auth_cache_time (90d) โ€” the maximal age of an smtp_sasl_auth_cache_name entry before it gets removed. so, ninety days and then it's deleted, bye ๐Ÿ‘‹
  • smtp_sasl_auth_soft_bounce (yes) โ€” when a remote SMTP server rejects a SASL authentication request with a 535 reply code, this makes delivery defer instead of returning the mail as undeliverable. soft bounce girlie behavior, real iconic of it ๐ŸŒธ

Available in Postfix version 2.9 and later:

  • smtp_send_dummy_mail_auth (no) โ€” whether or not to append the "AUTH=<>" option to the MAIL FROM command in SASL-authenticated SMTP sessions. yes or no, that's the whole question ๐Ÿ’€

Available in Postfix version 3.9 and later:

  • smtp_sasl_password_result_delimiter (:) โ€” the delimiter between username and password in sasl_passwd_maps lookup results. default is a good old colon : ๐ŸŽ€

โœจ TLS SUPPORT CONTROLS โœจ

okay bestie, if you want the detailed tea on STARTTLS configuration, it's all in the TLS_README document. go read it, it's giving essential โœจ

  • smtp_tls_security_level (Postfix >= 3.11: may; Postfix < 3.11: empty) โ€” the default SMTP TLS security level for the Postfix SMTP client. periodt ๐Ÿ”
  • smtp_sasl_tls_security_options ($smtp_sasl_security_options) โ€” the SASL authentication security options that the Postfix SMTP client uses for TLS-encrypted SMTP sessions. ๐Ÿ”ฅ
  • smtp_starttls_timeout (300s) โ€” time limit for Postfix SMTP client write and read operations during TLS startup and shutdown handshake procedures. don't ghost the handshake for too long โณ
  • smtp_tls_CAfile (empty) โ€” a file containing CA certificates of root CAs trusted to sign either remote SMTP server certificates or intermediate CA certificates. ๐ŸŽ€
  • smtp_tls_CApath (empty) โ€” directory with PEM format Certification Authority certificates that the Postfix SMTP client uses to verify a remote SMTP server certificate. ๐Ÿฆ‹
  • smtp_tls_cert_file (empty) โ€” file with the Postfix SMTP client RSA certificate in PEM format. ๐Ÿ’…
  • smtp_tls_mandatory_ciphers (medium) โ€” the minimum TLS cipher grade that the Postfix SMTP client will use with mandatory TLS encryption. โœจ
  • smtp_tls_exclude_ciphers (empty) โ€” list of ciphers or cipher types to exclude from the Postfix SMTP client cipher list at all TLS security levels. ๐Ÿšซ
  • smtp_tls_mandatory_exclude_ciphers (empty) โ€” additional list of ciphers or cipher types to exclude from the Postfix SMTP client cipher list at mandatory TLS security levels. ๐Ÿšซ
  • smtp_tls_dcert_file (empty) โ€” file with the Postfix SMTP client DSA certificate in PEM format. ๐Ÿ“
  • smtp_tls_dkey_file ($smtp_tls_dcert_file) โ€” file with the Postfix SMTP client DSA private key in PEM format. ๐Ÿ”‘
  • smtp_tls_key_file ($smtp_tls_cert_file) โ€” file with the Postfix SMTP client RSA private key in PEM format. ๐Ÿ”‘
  • smtp_tls_loglevel (0) โ€” enable additional Postfix SMTP client logging of TLS activity. ๐Ÿ‘€
  • smtp_tls_note_starttls_offer (no) โ€” log the hostname of a remote SMTP server that offers STARTTLS, when TLS is not already enabled for that server. ๐Ÿ“
  • smtp_tls_policy_maps (empty) โ€” optional lookup tables with the Postfix SMTP client TLS security policy by next-hop destination; when a non-empty value is specified, this overrides the obsolete smtp_tls_per_site parameter. ๐Ÿ‘‘
  • smtp_tls_mandatory_protocols (see 'postconf -d' output) โ€” TLS protocols that the Postfix SMTP client will use with mandatory TLS encryption. ๐Ÿ“ก
  • smtp_tls_scert_verifydepth (9) โ€” the verification depth for remote SMTP server certificates. ๐Ÿ”
  • smtp_tls_secure_cert_match (nexthop, dot-nexthop) โ€” how the Postfix SMTP client verifies the server certificate peername for the "secure" TLS security level. ๐Ÿ›ก๏ธ
  • smtp_tls_session_cache_database (empty) โ€” name of the file containing the optional Postfix SMTP client TLS session cache. ๐Ÿ’พ
  • smtp_tls_session_cache_timeout (3600s) โ€” the expiration time of Postfix SMTP client TLS session cache information. โฐ
  • smtp_tls_verify_cert_match (hostname) โ€” how the Postfix SMTP client verifies the server certificate peername for the "verify" TLS security level. โœ…
  • tls_daemon_random_bytes (32) โ€” the number of pseudo-random bytes that an smtp(8) or smtpd(8) process requests from the tlsmgr(8) server in order to seed its internal pseudo random number generator (PRNG). ๐ŸŽฒ
  • tls_high_cipherlist (see 'postconf -d' output) โ€” the OpenSSL cipherlist for "high" grade ciphers. ๐Ÿ’Ž
  • tls_medium_cipherlist (see 'postconf -d' output) โ€” the OpenSSL cipherlist for "medium" or higher grade ciphers. ๐Ÿ’Ž
  • tls_null_cipherlist (eNULL:!aNULL) โ€” the OpenSSL cipherlist for "NULL" grade ciphers that provide authentication without encryption. ๐Ÿ’€

โœจ Available in in Postfix version 2.3..3.7:

  • tls_low_cipherlist (see 'postconf -d' output) โ€” the OpenSSL cipherlist for "low" or higher grade ciphers. ๐Ÿงš
  • tls_export_cipherlist (see 'postconf -d' output) โ€” the OpenSSL cipherlist for "export" or higher grade ciphers. ๐ŸŒˆ

โœจ Available in Postfix version 2.4 and later:

  • smtp_sasl_tls_verified_security_options ($smtp_sasl_tls_security_options) โ€” the SASL authentication security options that the Postfix SMTP client uses for TLS encrypted SMTP sessions with a verified server certificate. ๐Ÿซถ

โœจ Available in Postfix version 2.5 and later:

  • smtp_tls_fingerprint_cert_match (empty) โ€” list of acceptable remote SMTP server certificate fingerprints for the "fingerprint" TLS security level (smtp_tls_security_level = fingerprint). ๐Ÿซ†
  • smtp_tls_fingerprint_digest (see 'postconf -d' output) โ€” the message digest algorithm used to construct remote SMTP server certificate fingerprints. ๐Ÿงฌ

โœจ Available in Postfix version 2.6 and later:

  • smtp_tls_protocols (see 'postconf -d' output) โ€” TLS protocols that the Postfix SMTP client will use with opportunistic TLS encryption. ๐ŸŒ
  • smtp_tls_ciphers (medium) โ€” the minimum TLS cipher grade that the Postfix SMTP client will use with opportunistic TLS encryption. โœจ
  • smtp_tls_eccert_file (empty) โ€” file with the Postfix SMTP client ECDSA certificate in PEM format. ๐Ÿ“
  • smtp_tls_eckey_file ($smtp_tls_eccert_file) โ€” file with the Postfix SMTP client ECDSA private key in PEM format. ๐Ÿ”‘

โœจ Available in Postfix version 2.7 and later:

  • smtp_tls_block_early_mail_reply (no) โ€” try to detect a mail hijacking attack based on a TLS protocol vulnerability (CVE-2009-3555), where an attacker prepends malicious HELO, MAIL, RCPT, DATA commands to a Postfix SMTP client TLS session. โš ๏ธ

โœจ Available in Postfix version 2.8 and later:

  • tls_disable_workarounds (see 'postconf -d' output) โ€” list or bit-mask of OpenSSL bug work-arounds to disable. ๐Ÿ”ง

โœจ Available in Postfix version 2.11-3.1:

  • tls_dane_digest_agility (on) โ€” configure RFC7671 DANE TLSA digest algorithm agility. ๐ŸŒช๏ธ
  • tls_dane_trust_anchor_digest_enable (yes) โ€” enable support for RFC 6698 (DANE TLSA) DNS records that contain digests of trust-anchors with certificate usage "2". ๐Ÿง™

โœจ Available in Postfix version 2.11 and later:

  • smtp_tls_trust_anchor_file (empty) โ€” zero or more PEM-format files with trust-anchor certificates and/or public keys. ๐Ÿ”
  • smtp_tls_force_insecure_host_tlsa_lookup (no) โ€” lookup the associated DANE TLSA RRset even when a hostname is not an alias and its address records lie in an unsigned zone. ๐Ÿ•ต๏ธ
  • tlsmgr_service_name (tlsmgr) โ€” the name of the tlsmgr(8) service entry in master.cf. ๐Ÿ“‹

โœจ Available in Postfix version 3.0 and later:

  • smtp_tls_wrappermode (no) โ€” request that the Postfix SMTP client connects using the SUBMISSIONS (formerly called SMTPS) protocol instead of using the STARTTLS command. ๐Ÿ“ฆ

โœจ Available in Postfix version 3.1 and later:

  • smtp_tls_dane_insecure_mx_policy (dane) โ€” the TLS policy for MX hosts with "secure" TLSA records when the nexthop destination security level is dane, but the MX record was found via an "insecure" MX lookup. ๐Ÿง

โœจ Available in Postfix version 3.2 and later:

  • tls_eecdh_auto_curves (see 'postconf -d' output) โ€” the prioritized list of elliptic curves, that should be enabled in the Postfix SMTP client and server. ๐ŸŒ€

โœจ Available in Postfix version 3.4 and later:

  • smtp_tls_connection_reuse (no) โ€” try to make multiple deliveries per TLS-encrypted connection. โ™ป๏ธ
  • smtp_tls_chain_files (empty) โ€” list of one or more PEM files, each holding one or more private keys directly followed by a corresponding certificate chain. โ›“๏ธ
  • smtp_tls_servername (empty) โ€” 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:

  • tls_fast_shutdown_enable (yes) โ€” a workaround for implementations that hang Postfix while shutting down a TLS session, until Postfix times out. ๐Ÿ›‘

โœจ Available in Postfix version 3.8 and later:

  • tls_ffdhe_auto_groups (see 'postconf -d' output) โ€” the prioritized list of finite-field Diffie-Hellman ephemeral (FFDHE) key exchange groups supported by the Postfix SMTP client and server. ๐Ÿ”ข

โœจ Available in Postfix 3.9, 3.8.1, 3.7.6, 3.6.10, 3.5.20 and later:

  • tls_config_file (default) โ€” optional configuration file with baseline OpenSSL settings. ๐Ÿ“„
  • tls_config_name (empty) โ€” the application name passed by Postfix to OpenSSL library initialization functions. ๐Ÿท๏ธ

โœจ Available in Postfix version 3.9 and later:

  • smtp_tls_enable_rpk (no) โ€” request that remote SMTP servers send an RFC7250 raw public key instead of an X.509 certificate. ๐Ÿ”‘

โœจ Available in Postfix version 3.10 and later:

  • smtp_tlsrpt_enable (no) โ€” enable support for RFC 8460 TLSRPT notifications. ๐Ÿ“ฌ
  • smtp_tlsrpt_socket_name (empty) โ€” the pathname of a UNIX-domain datagram socket that is managed by a local TLSRPT reporting service. ๐Ÿงฆ
  • smtp_tlsrpt_skip_reused_handshakes (Postfix >= 3.11: no, Postfix 3.10: yes) โ€” when set to "yes", report the TLSRPT status only for "new" TLS sessions. ๐Ÿ”
  • tls_required_enable (yes) โ€” enable support for the "TLS-Required: no" message header, defined in RFC 8689. ๐Ÿ“จ

โœจ Available in Postfix version 3.10.5 and later:

  • smtp_tls_enforce_sts_mx_patterns (yes) โ€” transform the TLS policy from an STS policy plugin: connect to an MX host only if its name matches any STS policy MX host pattern, and match the server certificate against the MX hostname. ๐Ÿ›ฐ๏ธ

โœจ Available in Postfix version 3.11 and later:

  • requiretls_enable (yes) โ€” enable support for the ESMTP verb "REQUIRETLS" in the "MAIL FROM" command. ๐Ÿ“ฎ
  • smtp_requiretls_policy (see 'postconf -d smtp_requiretls_policy' output) โ€” how the Postfix SMTP and LMTP client will enforce REQUIRETLS for messages received with the REQUIRETLS option. ๐Ÿšš
  • smtp_log_tls_feature_status (yes) โ€” enable logging of TLS feature information in delivery status logging. ๐Ÿ“Š

๐Ÿ’€ OBSOLETE TLS CONTROLS ๐Ÿ’€

Okay bestie, these next ones are literally vintage. They only exist so Postfix doesn't break on ya if you're running something older than 2.3, and they're getting yeeted in a future release, so don't get too attached. ๐Ÿซถ

  • smtp_use_tls (default: no) โ€” opportunistic mode, periodt. Slap on TLS whenever the remote SMTP server announces STARTTLS support, and if it doesn't? Whatever, send the mail in the clear. ๐Ÿ™ˆ
  • smtp_enforce_tls (default: no) โ€” enforcement mode, no cap. Remote SMTP servers must use TLS encryption, and mail is never sent in the clear. Strict queen energy. ๐Ÿ‘‘
  • smtp_tls_enforce_peername (default: yes) โ€” when you've got mandatory TLS encryption on, this requires that the remote SMTP server hostname actually matches the info in the remote SMTP server certificate. Like yes, prove it's really you. ๐Ÿ•ต๏ธโ€โ™€๏ธ
  • smtp_tls_per_site (default: empty) โ€” optional lookup tables holding the Postfix SMTP client TLS usage policy, sorted by next-hop destination and by remote SMTP server hostname.
  • smtp_tls_cipherlist (default: empty) โ€” the truly ancient Postfix < 2.3 control for the Postfix SMTP client TLS cipher list. It's giving fossil, ngl. ๐Ÿฆด

โฑ๏ธ RESOURCE AND RATE CONTROLS โฑ๏ธ

These are all about how long we wait and how much we do before we're like "okay bestie, I'm out." Timeouts everywhere. โœจ

  • smtp_connect_timeout (default: 30s) โ€” how long the Postfix SMTP client waits to complete a TCP connection. Set it to zero and you get the operating system's built-in time limit instead. ๐Ÿ•
  • smtp_helo_timeout (default: 300s) โ€” the Postfix SMTP client's time limit for sending the HELO or EHLO command, and for receiving the initial remote SMTP server response.
  • lmtp_lhlo_timeout (default: 300s) โ€” the Postfix LMTP client's time limit for sending the LHLO command, and for receiving the initial remote LMTP server response. (LMTP said "I want my own timeout too." ๐Ÿ’…)
  • smtp_xforward_timeout (default: 300s) โ€” Postfix SMTP client time limit for sending the XFORWARD command, and for receiving the remote SMTP server response.
  • smtp_mail_timeout (default: 300s) โ€” Postfix SMTP client time limit for sending the MAIL FROM command, and for receiving the remote SMTP server response.
  • smtp_rcpt_timeout (default: 300s) โ€” Postfix SMTP client time limit for sending the SMTP RCPT TO command, and for receiving the remote SMTP server response.
  • smtp_data_init_timeout (default: 120s) โ€” Postfix SMTP client time limit for sending the SMTP DATA command, and for receiving the remote SMTP server response.
  • smtp_data_xfer_timeout (default: 180s) โ€” Postfix SMTP client time limit for sending the SMTP message content. The actual email body, in all its glory. ๐Ÿ“จ
  • smtp_data_done_timeout (default: 600s) โ€” Postfix SMTP client time limit for sending the SMTP ., and for receiving the remote SMTP server response. That dot is doing a LOT of heavy lifting.
  • smtp_quit_timeout (default: 300s) โ€” Postfix SMTP client time limit for sending the QUIT command, and for receiving the remote SMTP server response. Say goodbye politely, bestie. ๐Ÿ‘‹

Available in Postfix version 2.1 and later:

  • smtp_mx_address_limit (default: 5) โ€” the max number of MX (mail exchanger) IP addresses that can come out of Postfix SMTP client mail exchanger lookups, or zero for no limit. Like a bouncer at the club door. ๐Ÿšช
  • smtp_mx_session_limit (default: 2) โ€” the max number of SMTP sessions per delivery request before the Postfix SMTP client gives up or delivers to a fall-back relay host, or zero for no limit.
  • smtp_rset_timeout (default: 20s) โ€” Postfix SMTP client time limit for sending the RSET command, and for receiving the remote SMTP server response.

Available in Postfix version 2.2 and earlier:

  • lmtp_cache_connection (default: yes) โ€” keeps Postfix LMTP client connections open for up to $max_idle seconds.

Available in Postfix version 2.2 and later:

  • smtp_connection_cache_destinations (default: empty) โ€” permanently turn on SMTP connection caching for the destinations you specify. Forever-on, no takebacks. ๐ŸŽ€
  • smtp_connection_cache_on_demand (default: yes) โ€” temporarily turn on SMTP connection caching while a destination has a high volume of mail chillin' in the active queue.
  • smtp_connection_reuse_time_limit (default: 300s) โ€” how long Postfix will use an SMTP connection over and over again. Recycle that connection, eco queen! โ™ป๏ธ
  • smtp_connection_cache_time_limit (default: 2s) โ€” when SMTP connection caching is enabled, how long an unused SMTP client socket stays open before it gets closed.

Available in Postfix version 2.3 and later:

  • connection_cache_protocol_timeout (default: 5s) โ€” time limit for connection cache connect, send or receive operations.

Available in Postfix version 2.9 - 3.6:

  • smtp_per_record_deadline (default: no) โ€” changes how the smtp_*_timeout time limits behave. Instead of a time limit per read or write system call, it becomes a time limit to send or receive a complete record (an SMTP command line, SMTP response line, SMTP message content line, or TLS protocol message). Big shift in vibe. ๐ŸŒ€
Heads up: this one only exists in Postfix 2.9 through 3.6. Don't come looking for it elsewhere. ๐Ÿ’€

Available in Postfix version 2.11 and later:

  • smtp_connection_reuse_count_limit (default: 0) โ€” when SMTP connection caching is enabled, how many times an SMTP session may be reused before it gets closed, or zero for no limit.

Available in Postfix version 3.4 and later:

  • smtp_tls_connection_reuse (default: no) โ€” try to make multiple deliveries per TLS-encrypted connection. Efficiency era. ๐Ÿ”ฅ

Available in Postfix version 3.7 and later:

  • smtp_per_request_deadline (default: no) โ€” changes the behavior of the smtp_*_timeout time limits, from a time limit per plaintext or TLS read or write call, to a combined time limit for sending a complete SMTP request and for receiving a complete SMTP response.
  • smtp_min_data_rate (default: 500) โ€” the minimum plaintext data transfer rate in bytes/second for DATA requests, when deadlines are enabled with smtp_per_request_deadline. Slow connection? We're out. ๐Ÿƒโ€โ™€๏ธ

Implemented in the qmgr(8) daemon:

  • transport_destination_concurrency_limit (default: $default_destination_concurrency_limit) โ€” a transport-specific override for the default_destination_concurrency_limit parameter value, where transport is the master.cf name of the message delivery transport.
  • transport_destination_recipient_limit (default: $default_destination_recipient_limit) โ€” a transport-specific override for the default_destination_recipient_limit parameter value, where transport is the master.cf name of the message delivery transport.

๐ŸŒˆ SMTPUTF8 CONTROLS ๐ŸŒˆ

Preliminary SMTPUTF8 support is introduced with Postfix 3.0. It's giving international, it's giving modern, we love to see it. ๐Ÿ’œ

  • smtputf8_enable (default: yes) โ€” turn on preliminary SMTPUTF8 support for the protocols described in RFC 6531, RFC 6532, and RFC 6533. ๐ŸŒ
  • smtputf8_autodetect_classes (default: sendmail, verify) โ€” detect that a message requires SMTPUTF8 support for the specified mail origin classes.

Available in Postfix version 3.2 and later:

  • enable_idna2003_compatibility (default: no) โ€” turn on 'transitional' compatibility between IDNA2003 and IDNA2008, when converting UTF-8 domain names to/from the ASCII form used for DNS lookups.

๐Ÿ” TROUBLE SHOOTING CONTROLS ๐Ÿ”

When things go sideways and you're like "bestie what is HAPPENING," these are your little detective tools. ๐Ÿ•ต๏ธโ€โ™€๏ธโœจ

  • debug_peer_level (default: 2) โ€” the increment in verbose logging level when a nexthop destination, remote client or server name or network address matches a pattern given with the debug_peer_list parameter.
  • debug_peer_list (default: empty) โ€” optional list of nexthop destination, remote client or server name or network address patterns that, if matched, bump the verbose logging level up by the amount specified in $debug_peer_level. Spicy detail incoming. ๐ŸŒถ๏ธ
  • error_notice_recipient (default: postmaster) โ€” the recipient of postmaster notifications about mail delivery problems caused by policy, resource, software or protocol errors. The person who finds out when things go wrong. ๐Ÿ˜ญ
  • internal_mail_filter_classes (default: empty) โ€” what categories of Postfix-generated mail are subject to before-queue content inspection by non_smtpd_milters, header_checks and body_checks.
  • notify_classes (default: resource, software) โ€” the list of error classes that get reported to the postmaster.

โœจ MISCELLANEOUS CONTROLS โœจ

okay bestie, this is the everything-else drawer โ€” the settings that didn't fit anywhere else but still keep the whole mail vibe alive. no skipping, fr fr. ๐Ÿ’…

  • best_mx_transport (empty) โ€” where the Postfix SMTP client should deliver mail when it detects a "mail loops back to myself" error condition. ๐Ÿ’€
  • config_directory (see 'postconf -d' output) โ€” the default location of the Postfix main.cf and master.cf configuration files. ๐Ÿ—‚๏ธ
  • daemon_timeout (18000s) โ€” how much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. โฐ
  • delay_logging_resolution_limit (2) โ€” the maximal number of digits after the decimal point when logging delay values. ๐Ÿ”ข
  • disable_dns_lookups (no) โ€” disable DNS lookups in the Postfix SMTP and LMTP clients. ๐Ÿšซ
  • inet_interfaces (all) โ€” the local network interface addresses that this mail system receives mail on. ๐ŸŒ
  • inet_protocols (see 'postconf -d' output) โ€” the Internet protocols Postfix will attempt to use when making or accepting connections. ๐Ÿ”Œ
  • ipc_timeout (3600s) โ€” the time limit for sending or receiving information over an internal communication channel. ๐Ÿ“ก
  • lmtp_assume_final (no) โ€” when a remote LMTP server announces no DSN support, assume that the server performs final delivery, and send "delivered" delivery status notifications instead of "relayed". ๐Ÿ“ฌ
  • lmtp_tcp_port (24) โ€” the default TCP port that the Postfix LMTP client connects to. ๐Ÿ”Œ
  • max_idle (100s) โ€” the maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily. ๐Ÿ’ค
  • max_use (100) โ€” the maximal number of incoming connections that a Postfix daemon process will service before terminating voluntarily. ๐Ÿ”
  • process_id (read-only) โ€” the process ID of a Postfix command or daemon process. ๐Ÿ†”
  • process_name (read-only) โ€” the process name of a Postfix command or daemon process. ๐Ÿท๏ธ
  • proxy_interfaces (empty) โ€” the remote network interface addresses that this mail system receives mail on by way of a proxy or network address translation unit. ๐Ÿ›ฐ๏ธ
  • smtp_address_preference (any) โ€” the address type ("ipv6", "ipv4" or "any") that the Postfix SMTP client will try first, when a destination has IPv6 and IPv4 addresses with equal MX preference. ๐Ÿ“ถ
  • smtp_bind_address (empty) โ€” an optional numerical network address that the Postfix SMTP client should bind to when making an IPv4 connection. ๐Ÿชข
  • smtp_bind_address6 (empty) โ€” an optional numerical network address that the Postfix SMTP client should bind to when making an IPv6 connection. ๐Ÿชข
  • smtp_helo_name ($myhostname) โ€” the hostname to send in the SMTP HELO or EHLO command. ๐Ÿ‘‹
  • lmtp_lhlo_name ($myhostname) โ€” the hostname to send in the LMTP LHLO command. ๐Ÿ‘‹
  • smtp_host_lookup (dns) โ€” what mechanisms the Postfix SMTP client uses to look up a host's IP address. ๐Ÿ”
  • smtp_randomize_addresses (yes) โ€” randomize the order of equal-preference MX host addresses. ๐ŸŽฒ
  • syslog_facility (mail) โ€” the syslog facility of Postfix logging. ๐Ÿ“
  • syslog_name (see 'postconf -d' output) โ€” 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:

  • fallback_relay (empty) โ€” optional list of relay hosts for SMTP destinations that can't be found or that are unreachable. ๐Ÿ›Ÿ

Available with Postfix 2.3 and later:

  • smtp_fallback_relay ($fallback_relay) โ€” optional list of relay destinations that will be used when an SMTP destination is not found, or when delivery fails due to a non-permanent error. ๐Ÿ›Ÿ

Available with Postfix 3.0 and later:

  • smtp_address_verify_target (rcpt) โ€” 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:

  • lmtp_fallback_relay (empty) โ€” optional list of relay hosts for LMTP destinations that can't be found or that are unreachable. ๐Ÿ›Ÿ

Available with Postfix 3.2 and later:

  • smtp_tcp_port (smtp) โ€” the default TCP port that the Postfix SMTP client connects to. ๐Ÿ”Œ

Available in Postfix 3.3 and later:

  • service_name (read-only) โ€” the master.cf service name of a Postfix daemon process. ๐Ÿท๏ธ

Available in Postfix 3.7 and later:

  • smtp_bind_address_enforce (no) โ€” defer delivery when the Postfix SMTP client cannot apply the smtp_bind_address or smtp_bind_address6 setting. ๐Ÿ›‘

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

bestie, go read these too โ€” they're the supporting cast ๐Ÿ’–


๐Ÿ“š README FILES ๐Ÿ“š

Use postconf readme_directory or postconf html_directory to locate this information. ๐Ÿ—บ๏ธ

  • SASL_README โ€” Postfix SASL howto
  • TLS_README โ€” Postfix STARTTLS howto

๐Ÿ“œ LICENSE ๐Ÿ“œ

The Secure Mailer license must be distributed with this software. ๐Ÿ’–


๐Ÿ‘‘ AUTHOR(S) ๐Ÿ‘‘

  • Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA
  • Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA
  • Command pipelining in cooperation with: Jon Ribbens Oaktree Internet Solutions Ltd., Internet House, Canal Basin, Coventry, CV1 4LY, United Kingdom.
  • SASL support originally by: Till Franke SuSE Rhein/Main AG 65760 Eschborn, Germany
  • TLS support originally by: Lutz Jaenicke BTU Cottbus Allgemeine Elektrotechnik Universitaetsplatz 3-4 D-03044 Cottbus, Germany
  • Revised TLS and SMTP connection cache support by: Victor Duchovni Morgan Stanley

and that's the whole SMTP(8) bestie โ€” source/version: SMTP(8), and the date is the one printed in your local manpage footer. no cap, you ate this whole manual ๐Ÿ’…โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from