SMTP(8)
๐ SMTP(8) โ the Postfix SMTP+LMTP client, bestie edition
okay so first thing, the manual name is SMTP(8) and it lives in the System Manager's Manual section of the Postfix docs. Welcome to the group chat. Sit down, hydrate, we're talking mail delivery. ๐ซถ
โจ NAME โจ
smtp, lmtp โ the Postfix SMTP+LMTP client. that's the whole name. two icons, one program. ๐
๐ SYNOPSIS ๐
smtp [generic Postfix daemon options] [flags=DORX]
lmtp [generic Postfix daemon options] [flags=DORX]
so it's smtp or lmtp, you take the generic Postfix daemon options, and then optionally you can throw in flags=DORX. that's it. that's the whole summoning ritual. โจ
๐ธ DESCRIPTION ๐ธ
The Postfix SMTP+LMTP client is the thing that actually speaks the SMTP and LMTP mail delivery protocols. It takes message delivery requests handed to it by the queue manager. And like, every single request comes with: a queue file, a sender address, a domain or host to deliver to, and the recipient info. ๐จ
This program expects to be launched by the master(8) process manager โ do not just run it yourself, that's not the vibe. The process name decides everything: call it smtp or call it lmtp, and that name controls which protocol it speaks and which configuration parameter names get used. literally one word changes the whole personality. ๐ญ
So after it does its thing, the SMTP+LMTP client either updates the queue file and marks recipients as finished, or it tells the queue manager "hey we should try this again later." And delivery status reports get sent off to the right daemon โ bounce(8), defer(8) or trace(8), whichever one is appropriate for the situation. no cap. ๐
Oh and the server lookup strategy is different for SMTP vs LMTP, so there are whole separate sections for that below: "SMTP SERVER LOOKUP" and "LMTP SERVER LOOKUP". Don't mix them up bestie. ๐ฆ
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. recycling era. โป๏ธ
And by default, connection caching is enabled temporarily for destinations that have a high volume of mail sitting in the active queue. You can also enable connection caching permanently for specific destinations if you're feeling committed. ๐
๐ SMTP SERVER LOOKUP ๐
The Postfix SMTP client supports multiple destinations separated by comma or whitespace (this is a Postfix 3.5 and later thing). Each destination gets tried in the order you specified. one by one, no skipping. ๐ซ
SMTP destinations take these forms:
domainnamedomainname: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]. don't forget the brackets, that's the whole thing ๐
๐ฆ LMTP SERVER LOOKUP ๐ฆ
The Postfix LMTP client supports multiple destinations separated by comma or whitespace (Postfix 3.5 and later, again). Each destination is tried in the specified order. same energy, different protocol. ๐
LMTP destinations take these forms:
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:domainnameinet: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:hostnameinet: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. forcing it. main character move. ๐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 ๐
okay so by default the Postfix SMTP+LMTP client delivers mail to multiple recipients per delivery request. Which is usually great! But it's undesirable when you're prepending a Delivered-to: or X-Original-To: message header. ๐
To stop Postfix from sending multiple recipients per delivery request, specify:
transport_destination_recipient_limit = 1
in the Postfix main.cf file โ where transport is the name sitting in the first column of the Postfix master.cf entry for this mail delivery service. get that name right or it won't work, fr fr.
๐ COMMAND ATTRIBUTE SYNTAX ๐
flags=DORX(optional) โ Optional message processing flags. four letters, four whole features, let's go:Dโ Prepend a"Delivered-To: recipient"message header with the envelope recipient address. Note: for this to work, thetransport_destination_recipient_limitmust be1(see SINGLE-RECIPIENT DELIVERY above for details, bestie).
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. caught in 4k. ๐
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, thetransport_destination_recipient_limitmust be1(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". glow up. โจ
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 out there on the network. And good news โ the SMTP+LMTP client can be run chrooted at fixed low privilege. safe queen behavior. ๐ซถ
๐ STANDARDS ๐
- RFC 821 (SMTP protocol)
- RFC 822 (ARPA Internet Text Messages)
- RFC 1651 (SMTP service extensions)
- RFC 1652 (8bit-MIME transport)
- RFC 1870 (Message Size Declaration)
- RFC 2033 (LMTP protocol)
- RFC 2034 (SMTP Enhanced Error Codes)
- RFC 2045 (MIME: Format of Internet Message Bodies)
- RFC 2046 (MIME: Media Types)
- RFC 2554 (AUTH command)
- RFC 2821 (SMTP protocol)
- RFC 2782 (SRV resource records)
- RFC 2920 (SMTP Pipelining)
- RFC 3207 (STARTTLS command)
- RFC 3461 (SMTP DSN Extension)
- RFC 3463 (Enhanced Status Codes)
- RFC 4954 (AUTH command)
- RFC 5321 (SMTP protocol)
- RFC 6531 (Internationalized SMTP)
- RFC 6533 (Internationalized Delivery Status Notifications)
- RFC 7672 (SMTP security via opportunistic DANE TLS)
- RFC 8689 (TLS-Required message header)
that's twenty-two RFCs. she read them all. she understood them all. periodt. ๐
๐ฉบ DIAGNOSTICS ๐ฉบ
Problems and transactions get logged to syslogd(8) or postlogd(8). Corrupted message files are marked so the queue manager can move them to the corrupt queue for further inspection. quarantine them, it's for their own good. ๐
And depending on the setting of the notify_classes parameter, the postmaster gets notified about bounces, protocol problems, and other trouble. someone's getting pinged about it, no cap. ๐
๐ BUGS ๐
- SMTP and LMTP connection reuse for TLS (without closing the SMTP or LMTP connection) is not supported before Postfix 3.4. old version, old problems. ๐ญ
- SMTP and LMTP connection reuse assumes that SASL credentials are valid for all destinations that map onto the same IP address and TCP port. that's the assumption. that's the risk. ๐ซ
โ๏ธ CONFIGURATION PARAMETERS โ๏ธ
Postfix versions 2.3 and later implement the SMTP and LMTP client with the same program, and they choose the protocol and configuration parameters based on the process name โ smtp or lmtp. one binary, two identities. ๐
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. (so if you're looking for the twin, it exists, go look at postconf(5), we're not repeating it here.) ๐
Changes to main.cf are picked up automatically, since smtp(8) processes run for only a limited amount of time. But if you're impatient (same), 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.
okay that's the setup, the lore, the whole first act. more parts coming, don't go anywhere bestie ๐
๐ COMPATIBILITY CONTROLS ๐
Okay bestie, these are the compatibility controls. They're giving "let's make Postfix play nice with weird servers" energy. Let's get into it. โจ
ignore_mx_lookup_error(default:no) โ Ignore DNS MX lookups that produce no response. Like, if the DNS is ghosting you, just move on. ๐smtp_always_send_ehlo(default:yes) โ Always send EHLO at the start of an SMTP session. Every single time. No cap.smtp_never_send_ehlo(default:no) โ Never send EHLO at the start of an SMTP session. The opposite vibe. ๐smtp_defer_if_no_mx_address_found(default:no) โ Defer mail delivery when no MX record resolves to an IP address. Like, hold up, no address? Defer it. โณsmtp_line_length_limit(default:998) โ The maximal length of message header and body lines that Postfix will send via SMTP. Keep it under998, bestie. ๐smtp_pix_workaround_delay_time(default:10s) โ How long the Postfix SMTP client pauses before sending.<CR><LF>in order to work around the PIX firewall<CR><LF>.<CR><LF>bug. Cisco PIX being messy, so we pause. ๐ญsmtp_pix_workaround_threshold_time(default: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. If it's been sitting for500s, we activate the workaround. ๐ฅsmtp_pix_workarounds(default:disable_esmtp, delay_dotcrlf) โ A list that specifies zero or more workarounds for CISCO PIX firewall bugs. Default is bothdisable_esmtpanddelay_dotcrlf. ๐ ๏ธsmtp_pix_workaround_maps(default:empty) โ Lookup tables, indexed by the remote SMTP server address, with per-destination workarounds for CISCO PIX firewall bugs. Per-destination PIX fixes. ๐บ๏ธsmtp_quote_rfc821_envelope(default:yes) โ Quote addresses in Postfix SMTP client MAIL FROM and RCPT TO commands as required by RFC 5321. RFC says quote, so we quote. ๐smtp_reply_filter(default:empty) โ A mechanism to transform replies from remote SMTP servers one line at a time. Line-by-line glow-up for replies. โจsmtp_skip_5xx_greeting(default:yes) โ Skip remote SMTP servers that greet with a 5XX status code. If they say 5XX, we skip. Bye. ๐smtp_skip_quit_response(default:yes) โ Do not wait for the response to the SMTP QUIT command. Just dip. No waiting. ๐จ
๐ฐ๏ธ Available in Postfix version 2.0 and earlier ๐ฐ๏ธ
smtp_skip_4xx_greeting(default:yes) โ Skip SMTP servers that greet with a 4XX status code (go away, try again later). 4XX means "go away, try again later" so we skip. ๐ช
๐ฐ๏ธ Available in Postfix version 2.2 and later ๐ฐ๏ธ
smtp_discard_ehlo_keyword_address_maps(default:empty) โ Lookup tables, indexed by the remote SMTP server address, with case insensitive lists of EHLO keywords (pipelining, starttls, auth, etc.) that the Postfix SMTP client will ignore in the EHLO response from a remote SMTP server. Per-address ignore list for EHLO keywords. ๐ โโ๏ธsmtp_discard_ehlo_keywords(default: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. Ignore these EHLO keywords. Periodt.smtp_generic_maps(default: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. Local address to global address glow-up. ๐
๐ฐ๏ธ Available in Postfix version 2.2.9 and later ๐ฐ๏ธ
smtp_cname_overrides_servername(default:version dependent) โ When the remote SMTP servername is a DNS CNAME, replace the servername with the result from CNAME expansion for the purpose of logging, SASL password lookup, TLS policy decisions, or TLS certificate verification. CNAME expansion for logging, SASL, TLS policy, and cert verification. Default isversion dependent. ๐
๐ฐ๏ธ Available in Postfix version 2.3 and later ๐ฐ๏ธ
lmtp_discard_lhlo_keyword_address_maps(default: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. Same vibe as the SMTP one but for LMTP. ๐ฌlmtp_discard_lhlo_keywords(default: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. Ignore these LHLO keywords. ๐ซ
๐ฐ๏ธ Available in Postfix version 2.4.4 and later ๐ฐ๏ธ
send_cyrus_sasl_authzid(default: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. Defaultnomeans no authzid, just authcid and password. ๐
๐ฐ๏ธ Available in Postfix version 2.5 and later ๐ฐ๏ธ
smtp_header_checks(default:empty) โ Restrictedheader_checks(5)tables for the Postfix SMTP client. Header checks, but restricted. ๐smtp_mime_header_checks(default:empty) โ Restrictedmime_header_checks(5)tables for the Postfix SMTP client. MIME header checks, restricted. ๐งsmtp_nested_header_checks(default:empty) โ Restrictednested_header_checks(5)tables for the Postfix SMTP client. Nested header checks, restricted. ๐ชsmtp_body_checks(default:empty) โ Restrictedbody_checks(5)tables for the Postfix SMTP client. Body checks, restricted. ๐
๐ฐ๏ธ Available in Postfix version 2.6 and later ๐ฐ๏ธ
tcp_windowsize(default:0) โ An optional workaround for routers that break TCP window scaling. For routers that are acting up. ๐
๐ฐ๏ธ Available in Postfix version 2.8 and later ๐ฐ๏ธ
smtp_dns_resolver_options(default:empty) โ DNS Resolver options for the Postfix SMTP client. DNS resolver options. ๐
๐ฐ๏ธ Available in Postfix version 2.9 - 3.6 ๐ฐ๏ธ
smtp_per_record_deadline(default:no) โ Change the behavior of thesmtp_*_timeouttime 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). Per-record deadline instead of per-read/write. โฐ
๐ฐ๏ธ Available in Postfix version 2.9 and later ๐ฐ๏ธ
smtp_send_dummy_mail_auth(default:no) โ Whether or not to append the "AUTH=<>" option to the MAIL FROM command in SASL-authenticated SMTP sessions. AppendAUTH=<>? Default isno. ๐ค
๐ฐ๏ธ Available in Postfix version 2.11 and later ๐ฐ๏ธ
smtp_dns_support_level(default:empty) โ Level of DNS support in the Postfix SMTP client. DNS support level. ๐ถ
๐ฐ๏ธ Available in Postfix version 3.0 and later ๐ฐ๏ธ
smtp_delivery_status_filter(default:$default_delivery_status_filter) โ Optional filter for thesmtp(8)delivery agent to change the delivery status code or explanatory text of successful or unsuccessful deliveries. Filter for delivery status codes/text. ๐๏ธsmtp_dns_reply_filter(default:empty) โ Optional filter for Postfix SMTP client DNS lookup results. Filter DNS lookup results. ๐งน
๐ฐ๏ธ Available in Postfix version 3.3 and later ๐ฐ๏ธ
smtp_balance_inet_protocols(default: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 thesmtp_mx_address_limit. Balance IPv4 and IPv6 before hitting the MX address limit. โ๏ธ
๐ฐ๏ธ Available in Postfix 3.5 and later ๐ฐ๏ธ
info_log_address_format(default:external) โ The email address form that will be used in non-debug logging (info, warning, etc.). Address format for non-debug logging. ๐
๐ฐ๏ธ Available in Postfix 3.6 and later ๐ฐ๏ธ
dnssec_probe(default:ns:.) โ The DNS query type (default: "ns") and DNS query name (default: ".") that Postfix may use to determine whether DNSSEC validation is available. DNSSEC probe query type and name. ๐known_tcp_ports(default:lmtp=24, smtp=25, smtps=submissions=465, submission=587) โ Optional setting that avoids lookups in theservices(5)database. Avoidservices(5)lookups. ๐
๐ฐ๏ธ Available in Postfix version 3.7 and later ๐ฐ๏ธ
smtp_per_request_deadline(default:no) โ Change the behavior of thesmtp_*_timeouttime 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. Combined time limit per request/response. โณsmtp_min_data_rate(default:500) โ The minimum plaintext data transfer rate in bytes/second for DATA requests, when deadlines are enabled withsmtp_per_request_deadline. Minimum data rate for DATA requests. ๐ขheader_from_format(default:standard) โ The format of the Postfix-generatedFrom:header. Format of theFrom:header. โ๏ธ
๐ฐ๏ธ Available in Postfix version 3.8 and later ๐ฐ๏ธ
use_srv_lookup(default:empty) โ Enables discovery for the specified service(s) using DNS SRV records. SRV record discovery. ๐ignore_srv_lookup_error(default:no) โ When SRV record lookup fails, fall back to MX or IP address lookup as if SRV record lookup was not enabled. If SRV fails, fall back to MX/IP. ๐allow_srv_lookup_fallback(default: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. Fallback when SRV fails or doesn't exist. ๐
๐ MIME PROCESSING CONTROLS ๐
Okay, MIME time. These are giving "we process MIME" energy. ๐งฌ
๐ฐ๏ธ Available in Postfix version 2.0 and later ๐ฐ๏ธ
disable_mime_output_conversion(default:no) โ Disable the conversion of 8BITMIME format to 7BIT format. Turn off 8BITMIME to 7BIT conversion. ๐ซmime_boundary_length_limit(default:2048) โ The maximal length of MIME multipart boundary strings. Max boundary length. ๐mime_nesting_limit(default:100) โ The maximal recursion level that the MIME processor will handle. Max MIME nesting recursion. ๐ช
๐ EXTERNAL CONTENT INSPECTION CONTROLS ๐
These controls are for when you're inspecting external content. So main character energy. ๐
๐ฐ๏ธ Available in Postfix version 2.1 and later ๐ฐ๏ธ
smtp_send_xforward_command(default:no) โ Send the non-standard XFORWARD command when the Postfix SMTP server EHLO response announces XFORWARD support. Send XFORWARD if EHLO says it's supported. ๐ค
โจ SASL AUTHENTICATION CONTROLS โจ
Okay bestie, this is the glow-up section ๐ โ the part where your SMTP client actually proves who it is to the remote server instead of just knocking on the door like a stranger. Buckle up ๐
smtp_sasl_auth_enable(default:no) โ turns SASL authentication on in the Postfix SMTP client. Off by default, so flip it if you want your client to actually log in ๐smtp_sasl_password_maps(default:empty) โ optional Postfix SMTP client lookup tables, with oneusername:passwordentry per sender, remote hostname or next-hop domain. Yes literally one per sender/host/domain, no cap ๐๏ธsmtp_sasl_security_options(default:noplaintext, noanonymous) โ the Postfix SMTP client's SASL security options. And here's the tea: as of Postfix 2.3, the list of available features depends on the SASL client implementation that is selected withsmtp_sasl_type. So it's giving "depends on your setup" energy ๐
๐ธ Available in Postfix version 2.2 and later ๐ธ
smtp_sasl_mechanism_filter(default:empty) โ if it's non-empty, this is 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(default:no) โ enables sender-dependent authentication in the Postfix SMTP client. This one is only available with SASL authentication, and heads up: it disables SMTP connection caching so that mail from different senders will use the appropriate credentials. Gotta keep the identities straight, fr fr ๐ญsmtp_sasl_path(default:empty) โ implementation-specific information that the Postfix SMTP client passes through to the SASL plug-in implementation that is selected withsmtp_sasl_type. Very "you know what this means for your plugin" of it ๐ซsmtp_sasl_type(default:cyrus) โ the SASL plug-in type that the Postfix SMTP client should use for authentication ๐
๐ Available in Postfix version 2.5 and later ๐
smtp_sasl_auth_cache_name(default:empty) โ an optional table to prevent repeated SASL authentication failures with the same remote SMTP server hostname, username and password. Basically it remembers the L's so you don't keep taking them ๐ฅsmtp_sasl_auth_cache_time(default:90d) โ the maximal age of ansmtp_sasl_auth_cache_nameentry before it gets removed. Ninety days and then it's out, periodt โณsmtp_sasl_auth_soft_bounce(default:yes) โ when a remote SMTP server rejects a SASL authentication request with a535reply code, this defers mail delivery instead of returning mail as undeliverable. Soft bounce, soft girlie behaviour ๐ซถ
๐ Available in Postfix version 2.9 and later ๐
smtp_send_dummy_mail_auth(default:no) โ whether or not to append the"AUTH=<>"option to theMAIL FROMcommand in SASL-authenticated SMTP sessions. Dummy mail, real auth, iconic combo ๐โจ
โญ Available in Postfix version 3.9 and later โญ
smtp_sasl_password_result_delimiter(default::) โ the delimiter between username and password insasl_passwd_mapslookup results. One little:doing so much heavy lifting ๐
โจ STARTTLS SUPPORT CONTROLS โจ
ok so before we dive in, bestie: if you want the full tea on STARTTLS config, it's all in the TLS_README document. go read it, i'll wait ๐
smtp_tls_security_level(empty) โ the default SMTP TLS security level for the Postfix SMTP client. yeah. that one. ๐smtp_sasl_tls_security_options($smtp_sasl_security_options) โ the SASL authentication security options the Postfix SMTP client uses for TLS-encrypted SMTP sessions.smtp_starttls_timeout(300s) โ the time limit for Postfix SMTP client write and read operations during the TLS startup and shutdown handshake procedures. clock's ticking, bestie โฐsmtp_tls_CAfile(empty) โ a file holding CA certificates of root CAs that are trusted to sign either remote SMTP server certificates or intermediate CA certificates.smtp_tls_CApath(empty) โ a 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) โ the file with the Postfix SMTP client RSA certificate in PEM format.smtp_tls_mandatory_ciphers(medium) โ the minimum TLS cipher grade the Postfix SMTP client will use with mandatory TLS encryption. no weak sauce allowed ๐ชsmtp_tls_exclude_ciphers(empty) โ a 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) โ an 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) โ the file with the Postfix SMTP client DSA certificate in PEM format.smtp_tls_dkey_file($smtp_tls_dcert_file) โ the file with the Postfix SMTP client DSA private key in PEM format.smtp_tls_key_file($smtp_tls_cert_file) โ the file with the Postfix SMTP client RSA private key in PEM format.smtp_tls_loglevel(0) โ enables extra Postfix SMTP client logging of TLS activity. turn it up if you're nosy, i support it ๐smtp_tls_note_starttls_offer(no) โ logs the hostname of a remote SMTP server that offers STARTTLS, but only 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. and heads up: when you set a non-empty value here, it overrides the obsoletesmtp_tls_per_siteparameter. girlboss move tbh.smtp_tls_mandatory_protocols(seepostconf -doutput) โ the TLS protocols 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) โ the 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 ansmtp(8)orsmtpd(8)process requests from thetlsmgr(8)server in order to seed its internal pseudo random number generator (PRNG). โจ entropy queen โจtls_high_cipherlist(seepostconf -doutput) โ the OpenSSL cipherlist for "high" grade ciphers.tls_medium_cipherlist(seepostconf -doutput) โ 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. authentication but no privacy, we've all been there ๐
๐๏ธ Available in in Postfix version 2.3..3.7
(yes the original says "in in", we don't gatekeep typos here ๐)
tls_low_cipherlist(seepostconf -doutput) โ the OpenSSL cipherlist for "low" or higher grade ciphers.tls_export_cipherlist(seepostconf -doutput) โ 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 the Postfix SMTP client uses for TLS-encrypted SMTP sessions with a verified server certificate. trust but verify, periodt.
๐๏ธ Available in Postfix version 2.5 and later
smtp_tls_fingerprint_cert_match(empty) โ a list of acceptable remote SMTP server certificate fingerprints for the "fingerprint" TLS security level (smtp_tls_security_level = fingerprint).smtp_tls_fingerprint_digest(seepostconf -doutput) โ the message digest algorithm used to construct remote SMTP server certificate fingerprints.
๐๏ธ Available in Postfix version 2.6 and later
smtp_tls_protocols(seepostconf -doutput) โ the TLS protocols the Postfix SMTP client will use with opportunistic TLS encryption.smtp_tls_ciphers(medium) โ the minimum TLS cipher grade the Postfix SMTP client will use with opportunistic TLS encryption.smtp_tls_eccert_file(empty) โ the file with the Postfix SMTP client ECDSA certificate in PEM format.smtp_tls_eckey_file($smtp_tls_eccert_file) โ the 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) โ tries to detect a mail hijacking attack based on a TLS protocol vulnerability (CVE-2009-3555), where an attacker prepends maliciousHELO,MAIL,RCPT,DATAcommands to a Postfix SMTP client TLS session. not cute, not slay, block it ๐
๐๏ธ Available in Postfix version 2.8 and later
tls_disable_workarounds(seepostconf -doutput) โ a 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) โ enables 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) โ look up 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 thetlsmgr(8)service entry inmaster.cf.
๐๏ธ Available in Postfix version 3.0 and later
smtp_tls_wrappermode(no) โ requests that the Postfix SMTP client connect using the SUBMISSIONS protocol (formerly called SMTPS) instead of using theSTARTTLScommand.
๐๏ธ 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 isdane, but the MX record was found via an "insecure" MX lookup.
๐๏ธ Available in Postfix version 3.2 and later
tls_eecdh_auto_curves(seepostconf -doutput) โ the prioritized list of elliptic curves that should be enabled in the Postfix SMTP client and server. curves, prioritized, iconic ๐ฆ
๐๏ธ 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) โ a list of one or more PEM files, each holding one or more private keys directly followed by a corresponding certificate chain. order matters bestie, don't mess it up ๐ญ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(seepostconf -doutput) โ 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) โ requests 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) โ enables 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(yes) โ don't report the TLSRPT status for TLS protocol handshakes that reuse a previously-negotiated TLS session. because there is literally no new information to report ๐tls_required_enable(yes) โ enables support for theTLS-Required: nomessage 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. strict? yes. correct? also yes ๐
โจ OBSOLETE STARTTLS CONTROLS โจ
Okay so these next ones are giving legacy, bestie. ๐ They exist purely so that Postfix can vibe with versions from before 2.3, and support for all of them is getting yeeted in a future release. So likeโฆ don't build your whole personality around them, mkay?
smtp_use_tls(no) โ Opportunistic mode, babes: use TLS whenever a remote SMTP server announces STARTTLS support, otherwise just send the mail in the clear. ๐smtp_enforce_tls(no) โ Enforcement mode: require that remote SMTP servers use TLS encryption, and never send mail in the clear. Periodt.smtp_tls_enforce_peername(yes) โ When TLS encryption is mandatory, require that the remote SMTP server hostname matches the info in the remote SMTP server certificate. ๐smtp_tls_per_site(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(empty) โ The obsolete Postfix < 2.3 control for the Postfix SMTP client TLS cipher list. Rip bozo ๐ชฆ
๐ฅ RESOURCE AND RATE CONTROLS ๐ฅ
This is the timeout section and honestly? It's giving patience issues. Every one of these is a little clock ticking down. โณ
smtp_connect_timeout(30s) โ The Postfix SMTP client's time limit for completing a TCP connection. Or zero, which means "use the operating system's built-in time limit" (letting the OS parent you, basically). ๐ซถsmtp_helo_timeout(300s) โ The Postfix SMTP client time limit for sending theHELOorEHLOcommand, and for receiving the initial remote SMTP server response. ๐lmtp_lhlo_timeout(300s) โ Same energy but for the Postfix LMTP client: time limit for sending theLHLOcommand, and for receiving the initial remote LMTP server response. ๐smtp_xforward_timeout(300s) โ The Postfix SMTP client time limit for sending theXFORWARDcommand, and for receiving the remote SMTP server response.smtp_mail_timeout(300s) โ The Postfix SMTP client time limit for sending theMAIL FROMcommand, and for receiving the remote SMTP server response. ๐ฎsmtp_rcpt_timeout(300s) โ The Postfix SMTP client time limit for sending the SMTPRCPT TOcommand, and for receiving the remote SMTP server response.smtp_data_init_timeout(120s) โ The Postfix SMTP client time limit for sending the SMTPDATAcommand, and for receiving the remote SMTP server response.smtp_data_xfer_timeout(180s) โ The Postfix SMTP client time limit for sending the SMTP message content. ๐จsmtp_data_done_timeout(600s) โ The Postfix SMTP client time limit for sending that final SMTP".", and for receiving the remote SMTP server response. Big moment, big timeout.smtp_quit_timeout(300s) โ The Postfix SMTP client time limit for sending theQUITcommand, and for receiving the remote SMTP server response. Byeee ๐โจ
Available in Postfix version 2.1 and later:
smtp_mx_address_limit(5) โ The max number of MX (mail exchanger) IP addresses that can come out of Postfix SMTP client mail exchanger lookups. Or zero, which means no limit at all โ chaotic, honestly. ๐smtp_mx_session_limit(2) โ The max number of SMTP sessions per delivery request before the Postfix SMTP client either gives up or delivers to a fall-back relay host. Or zero (no limit).smtp_rset_timeout(20s) โ The Postfix SMTP client time limit for sending theRSETcommand, and for receiving the remote SMTP server response. Reset queen ๐
Available in Postfix version 2.2 and earlier:
lmtp_cache_connection(yes) โ Keep Postfix LMTP client connections open for up to$max_idleseconds. โจ
Available in Postfix version 2.2 and later:
smtp_connection_cache_destinations(empty) โ Permanently enable SMTP connection caching for the destinations you name. ๐smtp_connection_cache_on_demand(yes) โ Temporarily enable SMTP connection caching while a destination has a high volume of mail sitting in the active queue. Busy bestie behavior.smtp_connection_reuse_time_limit(300s) โ The amount of time during which Postfix will use an SMTP connection repeatedly. โป๏ธsmtp_connection_cache_time_limit(2s) โ When SMTP connection caching is on, the amount of time an unused SMTP client socket is kept open before it gets closed. ๐ช
Available in Postfix version 2.3 and later:
connection_cache_protocol_timeout(5s) โ Time limit for connection cache connect, send or receive operations.
Available in Postfix version 2.9 - 3.6:
smtp_per_record_deadline(no) โ Changes the behavior of thesmtp_*_timeouttime limits: instead of a time limit per read or write system call, it becomes a time limit to send or receive a complete record (that's an SMTP command line, SMTP response line, SMTP message content line, or TLS protocol message). ๐ฏ
Available in Postfix version 2.11 and later:
smtp_connection_reuse_count_limit(0) โ When SMTP connection caching is enabled, the number of times an SMTP session may be reused before it's closed. Or zero (no limit). Go off, connection. ๐
Available in Postfix version 3.4 and later:
smtp_tls_connection_reuse(no) โ Try to make multiple deliveries per TLS-encrypted connection. Efficiency slay ๐
Available in Postfix version 3.7 and later:
smtp_per_request_deadline(no) โ Changes the behavior of thesmtp_*_timeouttime limits: instead of a time limit per plaintext or TLS read or write call, it's 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 forDATArequests, when deadlines are enabled withsmtp_per_request_deadline. ๐
๐ ๏ธ Implemented in the qmgr(8) daemon
These two live over in the queue manager, not the SMTP client, just so you know whose house you're in bestie:
transport_destination_concurrency_limit($default_destination_concurrency_limit) โ A transport-specific override for thedefault_destination_concurrency_limitparameter value, where transport is themaster.cfname of the message delivery transport.transport_destination_recipient_limit($default_destination_recipient_limit) โ A transport-specific override for thedefault_destination_recipient_limitparameter value, where transport is themaster.cfname of the message delivery transport.
๐ SMTPUTF8 CONTROLS ๐
Preliminary SMTPUTF8 support arrived with Postfix 3.0, and it's giving international icon energy. โจ
smtputf8_enable(yes) โ Enable preliminary SMTPUTF8 support for the protocols described in RFC 6531, RFC 6532, and RFC 6533. ๐smtputf8_autodetect_classes(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(no) โ Enable 'transitional' compatibility between IDNA2003 and IDNA2008 when converting UTF-8 domain names to/from the ASCII form used for DNS lookups. ๐ฆ
๐ TROUBLE SHOOTING CONTROLS ๐
For when something is not giving and you need to know why. ๐ญ
debug_peer_level(2) โ The increment in verbose logging level when a nexthop destination, remote client or server name, or network address matches a pattern given with thedebug_peer_listparameter. ๐ขdebug_peer_list(empty) โ An 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$debug_peer_level. ๐ต๏ธerror_notice_recipient(postmaster) โ The recipient of postmaster notifications about mail delivery problems caused by policy, resource, software or protocol errors. ๐ฌinternal_mail_filter_classes(empty) โ What categories of Postfix-generated mail are subject to before-queue content inspection bynon_smtpd_milters,header_checksandbody_checks. ๐งผnotify_classes(resource, software) โ The list of error classes that get reported to the postmaster. ๐
๐ MISCELLANEOUS CONTROLS ๐
okay bestie, this is the junk drawer section โ the everything-else pile, the random-but-iconic grab bag ๐ every one of these is a real setting, so no skimming, we're reading all of them together ๐ซถ
best_mx_transport(default:empty) โ where the Postfix SMTP client should drop the mail when it catches that legendary "mail loops back to myself" error condition ๐ the classic oopsie.config_directory(default: seepostconf -doutput) โ the default location of the Postfixmain.cfandmaster.cfconfiguration files. home base fr ๐daemon_timeout(default:18000s) โ how much time a Postfix daemon process may take to handle a request before a built-in watchdog timer straight-up terminates it. no dawdling โฐdelay_logging_resolution_limit(default:2) โ the maximal number of digits after the decimal point when logging delay values. precision, but make it cute โจdisable_dns_lookups(default:no) โ disable DNS lookups in the Postfix SMTP and LMTP clients.inet_interfaces(default:all) โ the local network interface addresses that this mail system receives mail on.inet_protocols(default: seepostconf -doutput) โ the Internet protocols Postfix will attempt to use when making or accepting connections.ipc_timeout(default:3600s) โ the time limit for sending or receiving information over an internal communication channel.lmtp_assume_final(default: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(default:24) โ the default TCP port that the Postfix LMTP client connects to.max_idle(default:100s) โ the maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily. it said "i'm out" ๐ชmax_use(default: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(default: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(default: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. pick your fighter ๐ฅsmtp_bind_address(default:empty) โ an optional numerical network address that the Postfix SMTP client should bind to when making an IPv4 connection.smtp_bind_address6(default:empty) โ an optional numerical network address that the Postfix SMTP client should bind to when making an IPv6 connection.smtp_helo_name(default:$myhostname) โ the hostname to send in the SMTPHELOorEHLOcommand. say hi, be polite ๐lmtp_lhlo_name(default:$myhostname) โ the hostname to send in the LMTPLHLOcommand.smtp_host_lookup(default:dns) โ what mechanisms the Postfix SMTP client uses to look up a host's IP address.smtp_randomize_addresses(default:yes) โ randomize the order of equal-preference MX host addresses. shuffle era ๐syslog_facility(default:mail) โ the syslog facility of Postfix logging.syslog_name(default: seepostconf -doutput) โ 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(default: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(default:$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(default: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(default: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(default:smtp) โ the default TCP port that the Postfix SMTP client connects to.
๐ Available in Postfix 3.3 and later:
service_name(read-only) โ themaster.cfservice name of a Postfix daemon process.
๐ Available in Postfix 3.7 and later:
smtp_bind_address_enforce(default:no) โ defer delivery when the Postfix SMTP client cannot apply thesmtp_bind_addressorsmtp_bind_address6setting.
๐ SEE ALSO ๐
the squad, the besties, the ones you go read next ๐
generic(5)โ output address rewritingheader_checks(5)โ message header content inspectionbody_checks(5)โ body parts content inspectionqmgr(8)โ queue managerbounce(8)โ delivery status reportsscache(8)โ connection cache serverpostconf(5)โ configuration parametersmaster(5)โ generic daemon optionsmaster(8)โ process managertlsmgr(8)โ TLS session and PRNG managementpostlogd(8)โ Postfix loggingsyslogd(8)โ system logging
๐ README FILES ๐
use "postconf readme_directory" or "postconf html_directory" to locate this information โ that's your treasure map bestie ๐บ๏ธโจ
SASL_READMEโ Postfix SASL howtoTLS_READMEโ Postfix STARTTLS howto
โ๏ธ LICENSE โ๏ธ
The Secure Mailer license must be distributed with this software. no exceptions, periodt ๐
๐ AUTHOR(S) ๐
the legends themselves, full credits, no skipping ๐ซถ
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 a wrap on the SMTP(8) page, bestie ๐ that was the whole thing โ the Postfix SMTP client manpage, source SMTP(8) in the Postfix manual set, dated as shown on the page footer, and we made it all the way to the end together ๐ go forth and deliver some mail, you absolute icon ๐โจ
๐ฆ where this page comes from
- fedora 43: postfix 2:3.10.14-1.fc43 ยท (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 44: postfix 2:3.10.14-1.fc44 ยท (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- fedora 44: postfix 2:3.10.7-2.fc44 ยท (IPL-1.0 OR EPL-2.0) AND GPL-2.0-or-later AND BSD-4-Clause-UC
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms