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:
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].
๐ 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: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.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, thetransport_destination_recipient_limitmust be1(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, 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".
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 ๐
- 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 (SMTP REQUIRETLS extension, TLS-Required header)
๐ฉบ 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 throwEHLOat the start of an SMTP session. no skipping. ๐smtp_never_send_ehlo(no) โ The opposite vibe: never sendEHLOat 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 clientMAIL FROMandRCPT TOcommands 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 SMTPQUITcommand. 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 ofEHLOkeywords (pipelining,starttls,auth, etc.) that the Postfix SMTP client will ignore in theEHLOresponse from a remote SMTP server. ๐งนsmtp_discard_ehlo_keywords(empty) โ A case insensitive list ofEHLOkeywords (pipelining,starttls,auth, etc.) that the Postfix SMTP client will ignore in theEHLOresponse 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 ofLHLOkeywords (pipelining,starttls,auth, etc.) that the Postfix LMTP client will ignore in theLHLOresponse from a remote LMTP server. ๐lmtp_discard_lhlo_keywords(empty) โ A case insensitive list ofLHLOkeywords (pipelining,starttls,auth, etc.) that the Postfix LMTP client will ignore in theLHLOresponse 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) โ Restrictedheader_checks(5)tables for the Postfix SMTP client. ๐smtp_mime_header_checks(empty) โ Restrictedmime_header_checks(5)tables for the Postfix SMTP client. ๐งผsmtp_nested_header_checks(empty) โ Restrictednested_header_checks(5)tables for the Postfix SMTP client. ๐ชsmtp_body_checks(empty) โ Restrictedbody_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 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). โฑ๏ธ
โจ Available in Postfix version 2.9 and later โจ
smtp_send_dummy_mail_auth(no) โ Whether or not to append the"AUTH=<>"option to theMAIL FROMcommand 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 thesmtp(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 thesmtp_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 theservices(5)database. skip the line. ๐
โจ Available in Postfix version 3.7 and later โจ
smtp_per_request_deadline(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. โณsmtp_min_data_rate(500) โ The minimum plaintext data transfer rate in bytes/second forDATArequests, when deadlines are enabled withsmtp_per_request_deadline. speed check. ๐๏ธheader_from_format(standard) โ The format of the Postfix-generatedFrom: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 of8BITMIMEformat to7BITformat. 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-standardXFORWARDcommand when the Postfix SMTP serverEHLOresponse announcesXFORWARDsupport. 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 oneusername:passwordentry 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 withsmtp_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 withsmtp_sasl_type๐งsmtp_sasl_type (cyrus)โ the SASL plug-in type the Postfix SMTP client should use for authentication. default vibe iscyrusโจ
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 ansmtp_sasl_auth_cache_nameentry 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 a535reply 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 theMAIL FROMcommand 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 insasl_passwd_mapslookup 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 offersSTARTTLS, 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 obsoletesmtp_tls_per_siteparameter. ๐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 ansmtp(8)orsmtpd(8)process requests from thetlsmgr(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 maliciousHELO,MAIL,RCPT,DATAcommands 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 thetlsmgr(8)service entry inmaster.cf. ๐
โจ Available in Postfix version 3.0 and later:
smtp_tls_wrappermode(no) โ request that the Postfix SMTP client connects using theSUBMISSIONS(formerly calledSMTPS) protocol 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(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 announcesSTARTTLSsupport, 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 theHELOorEHLOcommand, and for receiving the initial remote SMTP server response.lmtp_lhlo_timeout(default:300s) โ the Postfix LMTP client's time limit for sending theLHLOcommand, 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 theXFORWARDcommand, and for receiving the remote SMTP server response.smtp_mail_timeout(default:300s) โ Postfix SMTP client time limit for sending theMAIL FROMcommand, and for receiving the remote SMTP server response.smtp_rcpt_timeout(default:300s) โ Postfix SMTP client time limit for sending the SMTPRCPT TOcommand, and for receiving the remote SMTP server response.smtp_data_init_timeout(default:120s) โ Postfix SMTP client time limit for sending the SMTPDATAcommand, 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 theQUITcommand, 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 theRSETcommand, 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_idleseconds.
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 thesmtp_*_timeouttime 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 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.smtp_min_data_rate(default:500) โ the minimum plaintext data transfer rate in bytes/second forDATArequests, when deadlines are enabled withsmtp_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 thedefault_destination_concurrency_limitparameter value, where transport is themaster.cfname of the message delivery transport.transport_destination_recipient_limit(default:$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 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 thedebug_peer_listparameter.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 bynon_smtpd_milters,header_checksandbody_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 Postfixmain.cfandmaster.cfconfiguration 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) โ themaster.cfservice 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 thesmtp_bind_addressorsmtp_bind_address6setting. ๐
๐ SEE ALSO ๐
bestie, go read these too โ they're the supporting cast ๐
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. ๐บ๏ธ
SASL_READMEโ Postfix SASL howtoTLS_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
- alpine 3.24: postfix-doc 3.11.7-r0 ยท IPL-1.0 EPL-2.0
- arch rolling: postfix 3.11.7-1 ยท EPL-2.0 OR IPL-1.0 AND BSD-4-Clause-UC
- nixos 26.05: postfix 3.11.7
- nixpkgs unstable: postfix 3.11.7
- ubuntu stonking: postfix 3.11.7-1ubuntu2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms