Postfix Configuration Guide: The Settings That Matter for Deliverability
Postfix ships with sensible defaults, which is both its strength and its trap. A freshly installed server will usually send and receive mail, so it is tempting to declare the job done. Yet deliverability, whether other servers accept your mail quickly, trust it and place it in the inbox, is shaped by a relatively small set of configuration choices: how the server introduces itself, who it will relay for, how it encrypts connections, how it treats its queue when a destination struggles, and how it limits abuse. This guide works through the settings that genuinely matter, grouped by job, and explains what each one does in plain language so you can review your own main configuration file with understanding rather than copying blocks of settings from the internet. You will not find a magic configuration here, because none exists. What you will find is a server that behaves predictably, identifies itself consistently, and gives receiving systems every reason to treat your mail as legitimate.
Identity Settings: How Your Server Introduces Itself
Every Postfix conversation begins with identification, and receivers compare what your server says with what DNS says about it. The hostname setting should be a fully qualified name such as mail.example.com, and it should match the name your IP address resolves back to through reverse DNS, and the name on your TLS certificate. When these three agree, a basic and widely used trust check passes silently. When they disagree, because the server still carries a default name from installation or a generic provider name, some receivers penalise the message before they look at anything else.
Closely related is the domain the server considers itself responsible for, and the origin it appends to incomplete addresses. Set these deliberately rather than accepting whatever the installer guessed from the system hostname. Sloppy identity settings produce mail that appears to come from odd subdomains, breaks alignment with your SPF and DKIM records, and confuses bounce handling. After any identity change, send test messages to an external account and read the headers: the names in the Received lines should be exactly the names you intended, every time, with no leftovers from the original install.
Relay Control: The Settings You Must Not Loosen
Relay control decides whose mail your server will forward. The safe model is simple: your server accepts mail from the internet for domains it hosts, accepts mail to anywhere only from authenticated users and trusted local processes, and refuses everything else. Postfix's default restrictions already lean this way, and the most dangerous configuration mistake is weakening them while following an old tutorial, for example by trusting an entire network range or permitting relaying based on a sender's domain. Any setting that lets strangers route mail through your server will be found, and the result is blocklisting and likely suspension.
Keep Trusted Networks Short
Review the networks your server trusts and keep that list as short as possible, ideally just the local machine itself. Require authentication for submission, as covered below, instead of trusting IP addresses for your users, because users roam onto networks you do not control. Then test from outside: connect as an unauthenticated stranger and confirm the server refuses to relay to an external address. Repeat the test after every significant configuration change, not just at setup. Relay policy is the one area where a regression can destroy your sending reputation in a single night, so it deserves this paranoia.
The Submission Service: Port 587 Done Properly
Server-to-server delivery happens on port 25, but your users and applications should send through the submission service on port 587. Enabling it in the master configuration file, with its own set of restrictions, separates the two kinds of traffic and lets you apply the right rules to each: authentication required, TLS required, and sender addresses restricted to domains and accounts the user actually owns. That last point matters more than it first appears. An authenticated user who can send as any address can impersonate colleagues or, if the account is compromised, forge mail that passes your own checks.
Configure submission to reject unauthenticated attempts cleanly and to log them distinctly, so your log reviews can separate user sending problems from inbound delivery problems at a glance. Tell users the exact settings once, in writing: server name, port 587, encryption on, authentication using their full address in most setups. Most user sending complaints trace back to a device still trying port 25 with no authentication, a habit inherited from older setups. A correctly configured submission service removes that whole class of support ticket while materially improving security.
TLS Settings for Postfix
For incoming and outgoing server-to-server mail, TLS in Postfix is normally opportunistic: the server offers encryption and uses it when the peer supports it, falling back to plain text rather than failing delivery. Enable it for both directions, supply your certificate and key, and set the security levels to may for general SMTP so you never refuse mail from older servers. For submission, be stricter: require encryption before authentication is even offered, so passwords never cross the network in the clear.
Protocols, Ciphers and Certificates
Keep the protocol settings current. Disable SSL versions and TLS 1.0 and 1.1, which exist now only as attack surface, and let the server prefer strong modern ciphers. Test with an external checking service after configuration, and read the result carefully: a common beginner error is a certificate that does not match the server hostname, or an incomplete chain that desktop software tolerates but other mail servers reject. Certificates obtained for the mail hostname, renewed automatically, and referenced correctly in the configuration remove TLS from your list of worries entirely. Note also that encryption protects mail in transit between servers; it does not make a badly authenticated message trustworthy, which is why TLS complements SPF, DKIM and DMARC rather than replacing them.
Recipient, Sender and Content Restrictions
Postfix evaluates a series of restriction lists as mail arrives, and their order is a configuration decision with real consequences. Sensible inbound lists reject, early and cheaply, mail that is obviously invalid: unknown recipients at your domains, senders whose domains do not resolve, and hosts listed on reputable DNS blocklists. Rejecting unknown recipients at the connection stage is especially important. Accepting mail for any address and bouncing it later makes your server a source of backscatter, spam sent to innocent third parties whose addresses were forged, and backscatter is itself a listing offence.
- Reject unknown local recipients during the SMTP conversation, never bounce afterwards
- Check sender domains resolve, and apply reputable blocklists at connection time
- Validate the greeting hostname with forgiving settings: strict checks reject real mail from misconfigured but legitimate servers
- Apply size limits that match your users' real needs so oversized mail fails fast with a clear error
Tune these restrictions with your logs open. Every rejection rule will eventually catch a legitimate sender with a broken setup, and the professional response is a considered exception for that sender, not disabling the rule. Keep a short record of exceptions and review it occasionally; stale exceptions have a way of outliving the problem they solved.
Queue and Retry Settings: Behaviour When Destinations Struggle
Sooner or later a major mailbox provider will defer your mail, perhaps because you sent a campaign quickly or because their systems are busy. Your queue settings decide how gracefully your server handles that. Postfix retries deferred mail on a schedule that backs off over time, keeps it for a maximum lifetime, and warns the sender after a delay you can configure. The defaults are reasonable for most servers; the mistakes are at the extremes. Very short queue lifetimes silently discard legitimate mail during a destination's bad weekend, while very aggressive retry settings hammer a struggling receiver and worsen your reputation with them.
Reading the Queue
Watch the queue as a routine health signal, using the queue listing tools to see what is waiting and why. A queue dominated by one destination with deferral messages is a reputation conversation to have with that provider's postmaster resources, not a tuning problem. A queue full of bounces to addresses you do not recognise suggests a compromised account or a bad list. Resist internet advice to set tiny connection caches or extreme concurrency to blast through deferrals; receivers set their limits deliberately, and a well-behaved queue that respects them recovers faster than an aggressive one.
Concurrency and Rate Limits: Protecting Yourself From Yourself
Postfix can open many simultaneous connections to a destination, and for a busy server that parallelism is useful. It is also a way to look like a flood. Set per-destination concurrency to modest values and an initial destination rate delay for large providers if you send campaigns, so a big send spreads over minutes rather than arriving as a burst. Receiving systems judge behaviour patterns as well as content, and a steady, predictable flow from a server they know is treated far better than the same volume arriving in spikes.
Apply limits in the other direction too. Restricting how much mail one authenticated account can send per hour, and alerting when an account approaches unusual volumes, is your early-warning system for compromised credentials. A normal user does not suddenly send thousands of messages at 3 a.m.; when your rate limits catch that, they convert a reputation disaster into a password reset. If you send legitimate campaigns, route them through a dedicated account or, better, a dedicated server, so these protective limits can stay tight on everyday mailboxes without blocking marketing. Our dedicated SMTP email server plans are configured with exactly this separation in mind.
Address Verification, Aliases and Canonical Maps
Small mapping features have outsized effects on daily life. Keep your alias file tidy so role addresses such as postmaster and abuse reach a real person; receivers and blocklist operators genuinely use these addresses, and a working abuse contact can be the difference between a warning and a listing. If you run several domains, decide deliberately which addresses exist on each, and use virtual alias maps to route them rather than creating accounts nobody monitors. Unmonitored mailboxes are where password reset requests, legal notices and customer complaints go to be discovered too late.
Be cautious with catch-all addresses, which accept mail to any name at a domain. They feel convenient and quietly collect enormous volumes of spam, dictionary attacks and misdirected confidential mail meant for similarly named strangers. Almost every organisation is better served by a considered list of real addresses and aliases. Similarly, if you rewrite or canonicalise addresses, test thoroughly with real messages in both directions: a map that fixes outbound addresses but breaks replies is a classic source of confusing, intermittent complaints.
Logging, Monitoring and Reading What Postfix Tells You
Postfix's logs are unusually honest, and learning to read them is the highest-value skill in this guide. Each message gets a queue ID you can follow from acceptance to delivery, and delivery lines record the receiving server's response, including the enhanced status codes that explain deferrals and rejections in standard terms. When a user reports missing mail, search by sender, recipient and queue ID before changing anything. In most cases the log already contains the answer, and changing configuration without that evidence just moves the problem.
Set log retention long enough to investigate slow-burning issues, summarise the logs daily so unusual volumes, deferral rates and top rejection reasons are visible at a glance, and alert on the few signals that always matter: queue growth, a sudden rise in bounces, and authentication failures for a single account. Postfix also exposes its configuration safely through its checking tools; use them after every edit, and keep your configuration files in version control or at least dated backups, so any change can be reversed in minutes. The administrators who sleep well are not the ones with perfect configurations, but the ones who can see and undo their mistakes quickly.
A Review Checklist for Your Own Configuration
- Hostname, reverse DNS and certificate name all match
- Relay restrictions tested from outside: strangers cannot relay
- Submission on 587 requires TLS and authentication, and users have the settings in writing
- Unknown recipients rejected in conversation; no after-the-fact bounces
- TLS enabled both directions, obsolete protocols disabled, certificate chain verified externally
- Queue lifetime and retry behaviour at sane values; queue reviewed weekly
- Per-account sending limits set, with alerts on unusual volume
- Postmaster and abuse aliases reach a monitored mailbox
- Configuration backed up and changes recorded
Work through this list against your live server rather than from memory. Every item you can verify is a deliverability or security problem you have eliminated; every item you cannot is your next small project. Configuration review is unglamorous, recurring work, and it is precisely what separates servers that deliver reliably for years from servers that lurch between crises.
Conclusion: Configuration Is Behaviour
Receiving servers cannot see your intentions; they can only see your server's behaviour, and your Postfix configuration is that behaviour written down. Consistent identity, strict relay control, encrypted and authenticated submission, patient queue handling and protective rate limits present a server that is easy to trust. If you would rather inherit a configuration built and maintained on those principles, our dedicated SMTP email server plans include the full setup, authentication records and monitoring, or you can run Postfix yourself on our VPS range and use this checklist as your review standard: either way, review the settings before they review you, in the form of a deferral, a listing or a lost customer message.