Postfix 3.11 is the 2026 stable series of the Postfix mail server. It turns on outbound TLS by default, prepares for a world without Berkeley DB and, with OpenSSL 3.5, offers post-quantum key exchange out of the box. This article explains those changes and how our Postfix package and eilandert/postfix image use them.
In short: on OpenSSL 3.5 or later, Postfix 3.11 already offers the hybrid post-quantum group X25519MLKEM768. Leave tls_eecdh_auto_curves at its default unless you have a reason not to. The default sends the large post-quantum key share only when the other server asks for it, which avoids trouble with old SMTP servers and middleboxes.
Correction (23 November 2026): we rewrote this article against the Postfix 3.11.7 source and our packaging. The earlier version had these errors:
- It told you to list the post-quantum groups first in
tls_eecdh_auto_curves. On OpenSSL 3.5 the default already includes them, in a form that is safer for interoperability. - It said 3.11 deletes
smtpd_tls_eecdh_grade. That parameter has been deprecated since Postfix 3.9 and still exists. - It said
smtp_tlsrpt_skip_reused_handshakesdefaults toyes. From compatibility level 3.11 the default isno. - Its Berkeley DB answer used
postmap -F, which stores base64-encoded file contents. Plainpostmapis the right command. - Its repository line used
[trusted=yes], which turns off signature checks. Use the signed setup on the how-to-use page instead. - We dropped figures we could not source: market share, the share of post-quantum mail traffic, the share of spam stopped before DATA, and the image’s start time and size. We also dropped the FAQ, which repeated the body.
Why Postfix is built the way it is
Wietse Venema released the first public version of Postfix in 1998, while at IBM Research. It was a reply to Sendmail, which ran as one large setuid-root program with a configuration generated from m4 macros. Sendmail bugs often meant root on the mail server.
Postfix splits the work into small daemons under one master process. Most run as the unprivileged postfix user and can run chrooted. The SMTP server (smtpd) accepts mail, cleanup fixes headers, the queue manager (qmgr) schedules delivery and the SMTP client (smtp) sends mail out.
A bug in one daemon only gives an attacker that daemon’s small set of privileges. The cost is that one message passes through several processes. On modern hardware that cost is hard to notice.
What is new in Postfix 3.11
Postfix ships one stable series a year. Our repository builds 3.11.7 as of November 2026. The changes that matter most to operators:
- Outbound TLS by default. With
compatibility_levelset to 3.11 or higher,smtp_tls_security_levelnow defaults tomaywhen Postfix is built with TLS. Outgoing mail tries TLS without extra configuration. The server side is unchanged, because it needs a certificate first. - Post-quantum key exchange. Built against OpenSSL 3.5 or later, the default
tls_eecdh_auto_curvesbecomes?X25519MLKEM768:DEFAULT. The next section explains what that does. - Leaving Berkeley DB. Some distributions are removing Berkeley DB. The default for
alias_mapsandalias_databasenow follows$default_database_type, a newdefault_cache_db_typeparameter covers the cache tables, andnon_bdb_migration_levelcan redirect or rebuild oldhash:andbtree:tables. - SQLite quoting warning. The SQLite client logs a warning when a query uses double quotes. Only single-quoted strings get Postfix’s protection against SQL injection.
- TLSRPT change. TLS reporting arrived in 3.10. In 3.11,
smtp_tlsrpt_skip_reused_handshakesdefaults tono, so reused TLS sessions are reported too. - More deprecation warnings. Twelve renamed parameters, such as
virtual_mapsandfallback_relay, now log a warning. Old settings such assmtpd_tls_eecdh_gradehave warned since 3.9: remove them and keep the default.
One detail in the 3.11 history file stands out: several bug fixes in 2026 credit an AI model, Claude Opus 4.6, as the finder. Each entry names the file it fixed, such as proxymap/proxymap.c.
Post-quantum TLS in SMTP
The threat is “harvest now, decrypt later”. Someone records encrypted mail traffic today and decrypts it once a large enough quantum computer exists. Shor’s algorithm on such a machine would break the elliptic-curve key exchange that TLS uses now.
NIST standardised ML-KEM, formerly Kyber, in FIPS 203 in August 2024. Lattice cryptography is still young, so deployments combine it with classical X25519. The session key comes from both, and an attacker has to break both.
In TLS 1.3 this hybrid is the group X25519MLKEM768 (code point 0x11EC). A related group, SecP256r1MLKEM768 (0x11EB), pairs ML-KEM with P-256. OpenSSL 3.5, released in April 2025, was the first OpenSSL release to support them.
Debian 13 ships OpenSSL 3.5 and so does Ubuntu 26.04. Our Postfix package uses the distribution’s OpenSSL, so it gets these groups without extra work.
What the 3.11 default does
Postfix 3.11 built against OpenSSL 3.5 sets tls_eecdh_auto_curves to ?X25519MLKEM768:DEFAULT. The upstream documentation calls this a small change to OpenSSL’s own default. It still supports X25519MLKEM768, but it does not send that group’s key share in the first message of the handshake.
That matters because the hybrid key share is large: the ML-KEM-768 part alone is 1,184 bytes. Some SMTP servers and network devices fail when a TLS Client Hello does not fit in one TCP segment. With the default, Postfix sends a small classical key share first. A server that supports the hybrid group asks for it, and the handshake costs one extra round trip.

The mistake in the old advice
The earlier version of this article told you to set this list:
tls_eecdh_auto_curves = X25519MLKEM768 SecP256r1MLKEM768 X25519 prime256v1 secp384r1 tls_ffdhe_auto_groups = ffdhe3072 ffdhe4096
On the client side, Postfix builds the first key share from the first group in the list. With X25519MLKEM768 first, every outgoing connection sends the large share straight away. That is the behaviour the upstream default avoids. It also skips the ? prefix and the rest of OpenSSL’s tuned default list.
The setting still works against most servers, and it saves the extra round trip with servers that support the hybrid group. If you set it yourself and see TLS failures to a few old servers, this is the first thing to undo.
Check and reset your setting
Compare the compiled-in default with your active value:
openssl version postconf -d tls_eecdh_auto_curves postconf tls_eecdh_auto_curves
If openssl version shows 3.5 or later and the two postconf lines differ, someone set the list in main.cf. To go back to the default, remove the line and reload:
postconf -X tls_eecdh_auto_curves postfix reload
Then test the handshake from another machine with OpenSSL 3.5. The -groups X25519MLKEM768 option offers only that group. A server that supports it prints Negotiated TLS1.3 group: X25519MLKEM768; one that does not fails the handshake, which is the clear signal you want:
openssl s_client -connect mail.example.com:25 -starttls smtp \ -groups X25519MLKEM768 2>&1 | grep Negotiated
Opportunistic TLS still has limits
SMTP TLS is opportunistic. If two servers share no post-quantum group, they agree on a classical one and the mail still flows. That is the right choice for mail, but it means post-quantum protection spreads only as more servers upgrade.
Opportunistic STARTTLS also does not stop an active attacker. Someone who can change the traffic can remove STARTTLS from the server’s reply, and the client falls back to plain text. DANE (TLSA records signed with DNSSEC) or MTA-STS (a policy file served over HTTPS) fixes that. Postfix supports both, and a public mail server should use at least one.
Anti-spam layers before the queue
Postfix can refuse a lot of spam before it writes anything to disk. It has three layers, and each one catches a different kind of sender.

Postscreen
postscreen listens on port 25 in front of smtpd. It checks the client’s IP address against weighted DNS blocklists (DNSBLs) and watches for protocol abuse, such as talking before the greeting. Clients that pass are handed to a real smtpd process. A client whose score reaches postscreen_dnsbl_threshold is refused.
Pick blocklists that still work. SORBS shut down in 2024, and other lists have gone or now return a match for every query. A dead list costs a DNS lookup on every connection and catches nothing.
The original author’s short list of the worst offenders:
postscreen_dnsbl_threshold = 3 postscreen_dnsbl_sites = zen.spamhaus.org*3, dnsbl.dronebl.org*2, truncate.gbudb.net*2, z.mailspike.net=127.0.0.2*100, list.dnswl.org=127.0.[0..255].[1]*-4, list.dnswl.org=127.0.[0..255].[2]*-6, list.dnswl.org=127.0.[0..255].[3]*-9
Spamhaus ZEN combines SBL, XBL and PBL. DroneBL lists botnet hosts. The z.mailspike.net entry gets weight 100, so one hit is enough. The negative list.dnswl.org weights rescue senders that a whitelist vouches for.
If rspamd filters your mail, you can leave Spamhaus out of postscreen. The rspamd RBL module checks it later anyway, and you keep reputation policy in one place.
smtpd access restrictions
After postscreen, smtpd checks the SMTP envelope: the HELO name, MAIL FROM and RCPT TO. These checks reject obvious forgeries before the DATA phase, without reading any content:
reject_invalid_helo_hostnameandreject_non_fqdn_helo_hostnamerefuse clients that greet with a malformed or short name instead of a full hostname.reject_unknown_sender_domainrefuses a sender domain with no A, AAAA or MX record, because a bounce to it could never arrive.reject_non_fqdn_senderandreject_non_fqdn_recipientrefuse bare addresses such asMAIL FROM:<bob@local>.reject_unauth_destinationstops you from being an open relay. Mail for other domains is relayed only formynetworksor authenticated users.reject_unauth_pipeliningrefuses clients that send commands ahead of time without thePIPELININGextension, which spam bots often do.
Two related parameters close more gaps. disable_vrfy_command = yes stops address probing with VRFY, and strict_rfc821_envelopes = yes rejects addresses without angle brackets.
Milters
Milters (mail filters) are a plugin protocol that Sendmail introduced and Postfix has supported since version 2.3. Postfix streams the connection details, envelope, headers and body to each milter over a socket. The milter answers with accept, reject, tempfail or changes to the message, before Postfix accepts the mail.
Common milters:
- OpenDKIM signs outgoing mail and checks DKIM signatures on incoming mail.
- OpenDMARC applies the sender domain’s DMARC policy to incoming mail.
- rspamd runs its whole scoring pipeline through its milter interface on port 11332. See Rspamd explained for how it scores mail, and Rspamd DCC, Razor and Pyzor for the hash-sharing checks.
- ClamAV, through
clamav-milter, scans attachments for malware.
Postfix calls milters in the order you list them. Put the cheap header checks first and the heavy scanners last:
smtpd_milters = inet:127.0.0.1:8891, inet:127.0.0.1:8893, inet:rspamd:11332 non_smtpd_milters = $smtpd_milters milter_default_action = tempfail milter_protocol = 6
Keep milter_default_action = tempfail. If a milter is down, Postfix answers with a temporary 4xx error and the sender retries later. With accept, a crashed filter lets every message through unchecked.
TLSRPT
TLSRPT (TLS reporting, RFC 8460) tells a domain owner how other servers fared when they delivered mail to it over TLS. The domain publishes a TXT record at _smtp._tls.example.com with a reporting address. Sending servers then send daily JSON summaries of successful and failed TLS connections.
Postfix 3.10 added TLSRPT on the sending side, through the libtlsrpt library; our package is built with it. It reports for DANE on its own and for MTA-STS through a policy plugin. To read the reports for your own domain, use a tool such as parsedmarc. For a small personal server, the reports are mostly noise.
Moving off Berkeley DB
Older configurations use hash: and btree: tables, which need Berkeley DB. Our package already defaults to cdb for lookup tables and lmdb for caches, so a new install does not use Berkeley DB for them.
For an existing install, find the old tables and rebuild each one in the new format:
postconf -n | grep -E 'hash:|btree:' postmap cdb:/etc/postfix/transport
Then change the type prefix in main.cf from hash: to cdb: and reload. Do not add -F to postmap for this: that option reads each value as a list of file names and stores their contents base64-encoded. For a gradual move, 3.11’s non_bdb_migration_level parameter can redirect old table names or rebuild them automatically; the NON_BERKELEYDB_README explains both levels.
How our Postfix package is built
The postfix package on deb.myguard.nl is built from upstream 3.11.7 for Debian 13 (trixie) and Ubuntu 26.04 (resolute), on amd64 and arm64. These are the hardening and optimisation flags from its debian/rules:
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto future=+lfs
export DEB_CPPFLAGS_MAINT_APPEND = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
export DEB_CFLAGS_MAINT_APPEND = -O3 -fno-plt -fstack-clash-protection
export DEB_CXXFLAGS_MAINT_APPEND = -O3 -fno-plt -fstack-clash-protection
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Wl,-O1 -Wl,--as-needed
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
# Control-flow protection is CPU-specific: Intel CET (-fcf-protection=full)
# is x86-only ("not supported for this target" on aarch64); the arm64
# equivalent is pointer-auth/BTI via -mbranch-protection=standard.
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386))
export DEB_CFLAGS_MAINT_APPEND += -fcf-protection=full
export DEB_CXXFLAGS_MAINT_APPEND += -fcf-protection=full
endif
ifeq ($(DEB_HOST_ARCH),arm64)
export DEB_CFLAGS_MAINT_APPEND += -mbranch-protection=standard
export DEB_CXXFLAGS_MAINT_APPEND += -mbranch-protection=standard
endif
What they do:
_FORTIFY_SOURCE=3adds bounds checks around calls such asmemcpyandsprintf. Level 3 catches more cases than level 2.-fstack-clash-protectionstops large stack allocations from jumping past the guard page.-z now,-z relroand-z noexecstackresolve all symbols at start, make the relocation table read-only and forbid running code from the stack.-O3 -fno-pltand LTO trade build time for faster code.- On amd64,
-fcf-protection=fullmarks the binaries for Intel CET. On arm64,-mbranch-protection=standardadds the Arm equivalent, pointer authentication and BTI. Enforcement depends on the CPU, kernel and C library.
Three build traps we hit
These are from our own builds and are not in the upstream documentation:
- Do not add
-fno-semantic-interpositionwhile-Wl,-Bsymbolic-functionsis stripped. Together they madesmtpdcrash indict_unregisterandhtable_findon TLS connections. That is why the comment in our rules file forbids it. -fcf-protection=fullfails on arm64 with “not supported for this target”, because CET exists only on x86. The rules file gates it by architecture.- When cross-building for arm64, Postfix’s
makedefslooks for ICU with the build machine’spkg-configand runs a test program. That program cannot run on an amd64 build host, so ICU support drops out and the shared library ends up with undefined ICU symbols. We pass the arm64 ICU flags in explicitly.
Install the package
Add the repository with the signed setup on the how-to-use page, then install Postfix and the map modules you need:
apt update apt install postfix postfix-ldap postfix-mysql postfix-pcre postfix-pgsql postfix-sqlite
The package’s main.cf template sets TLS 1.2 as the minimum, a forward-secret cipher list, NO_COMPRESSION, NO_RENEGOTIATION and NO_TICKET, and the smtpd restrictions above. It also sets the explicit post-quantum list from the old advice. On OpenSSL 3.5 you can remove that line, as shown earlier, to get the upstream default.
The eilandert/postfix Docker image
If you would rather not install Postfix on the host, the eilandert/postfix image on Docker Hub wraps the same package, with Debian and Ubuntu tags. The image keeps its default configuration in /etc/postfix.orig. On first start, when /etc/postfix/main.cf is missing, bootstrap.sh copies those files into the mounted /etc/postfix. After that, your files win.
A minimal compose file:
services:
postfix:
image: eilandert/postfix:debian
container_name: postfix
restart: always
ports:
- 25:25/tcp
- 587:587/tcp
volumes:
- ./config/postfix:/etc/postfix:rw
- ./data/postfix:/var/lib/postfix:rw
- /etc/letsencrypt:/etc/letsencrypt:ro
environment:
- TZ=Europe/Amsterdam
Other details of the image:
- It preloads the hardened
mimallocallocator. SetMALLOC=jemallocorMALLOC=noneto change that. - It runs
postfix reloadonce a day, so renewed Let’s Encrypt certificates are picked up. - It logs to standard output, or to a remote syslog server when you set
SYSLOG_HOST.
The source is in the dockerized repository. For a hardened container, see Docker hardening: rootless, read-only, distroless.
Further reading
- Postfix and Dovecot mail server setup on Debian builds the full stack, with Dovecot, DKIM, SPF and DMARC.
- Rspamd explained covers what the rspamd milter does with each message.
- postconf(5) is the upstream reference for every parameter in this article.
- RFC 8460 defines TLSRPT, and FIPS 203 defines ML-KEM.