Most guides to the catch-all email start at the mailbox. This one starts three layers earlier, at the DNS answer that decides whether an SMTP connection happens at all. A catch-all email address is a convenience that lives on the mail server, but the road to that server is paved by MX records, and the resolver’s reply is what tells a sending MTA where to knock, or whether to bother knocking. Get that answer wrong and no amount of Postfix tinkering will save you.
The catch-all email meaning is simple on paper: a catch-all domain accepts every message sent to it, including mail addressed to local parts that do not exist as real accounts. Behind that simplicity sits a pile of assumptions. People assume the catch-all is a DNS feature. It is not. A catch-all email is configured on the mail server, not in DNS. MX records route inbound mail to a mail server and nothing more; they do not know or care which local parts exist once the connection lands. SPF, DKIM and DMARC govern outbound mail only, which means a sender can pass every authentication check and still be talking to a host that will reject the envelope for an unknown recipient.
The confusion gets worse when you mix in null MX. RFC 7505 gave domain owners a way to say, in DNS, that a domain accepts no mail at all, using a single record with a preference of 0 and a target of a lone dot. That one record stops delivery before a single byte of SMTP is exchanged. A catch-all, by contrast, is a promise to accept almost anything after the connection is established. They are opposites, and they collide in the same zone file more often than anyone admits. What follows unpacks how the MX lookup actually resolves, what the null MX really signals to a sending MTA, how a catch-all mailbox behaves once the session opens, and where each approach wins. If you run a domain that receives automated sign-up traffic, or one that should receive nothing at all, this distinction is the difference between a clean 550 and a queue full of bounces nobody reads.
How MX Records Route Email Before SMTP Connects
Every SMTP session starts with a DNS query, not a greeting. Before a sending MTA opens port 25 to anyone, it asks the resolver for the recipient domain’s MX records. That answer, or its absence, decides whether a TCP connection happens at all. This is the layer where null MX and catch-all policy actually play out, and it is the layer most people skip when they debug “mail not delivered.”
The MX Lookup Sequence and Preference Values
An MX record is a two-field answer: a preference number (0 to 65535) and a hostname. Lower preference wins. A sender sorts the returned set ascending and tries the lowest first, falling through to the next host only when the connection fails or the host refuses with a 4xx temporary error. Ties are broken randomly, which is how providers spread load across equal-priority hosts.
The hostname in an MX record must resolve to an A or AAAA record; pointing an MX at a CNAME is a protocol violation that many resolvers tolerate and some strict senders reject. When a domain publishes no MX at all, RFC 5321 says the sender falls back to the domain’s A/AAAA record (the implicit MX). That fallback is why an empty MX set does not mean “no mail” in practice, it means “try the web server on port 25,” which usually times out or rejects.
A typical lookup looks like this:
- Sender extracts the domain from RCPT TO, for example user@example.com.
- Resolver returns MX records: 10 mx1.example.com, 20 mx2.example.com.
- Sender resolves mx1 to an IP, connects on port 25, and issues EHLO.
- Only now does the receiving server decide whether the local part exists, which is where the catch-all mailbox lives.
Where the Catch-All Actually Sits
Here is the myth worth killing: a catch-all email is configured on the mail server, not in DNS. MX records route inbound mail to a mail server. They say nothing about which recipients are valid. A catch-all email accepts every message sent to a domain only after the SMTP connection is established and the server’s recipient validation runs. Postfix does it with a virtual alias domain or a wildcard entry in virtual_mailbox_maps; Exim does it with a router that matches any local part for the domain. Either way, the decision happens after the MX lookup, after the TCP handshake, after EHLO.
That ordering matters because it defines two distinct failure modes. A standard mail server with no catch-all replies 550 no such user at RCPT TO for an unknown local part. A domain with broken or missing MX fails much earlier, often with a connection timeout or a 5xx from an unrelated host. Senders and spam filters treat these differently, and so should you when you troubleshoot.
It also explains why SPF, DKIM and DMARC are irrelevant to this whole sequence. Those records govern outbound mail only, authenticating what your server sends. Inbound routing is MX plus the server’s recipient logic. A catch-all domain with a perfect DMARC policy will still accept garbage addressed to invented local parts, because authentication and acceptance are separate questions answered at separate stages.
A working catch-all setup requires both halves: DNS pointing at the right host, and a server configured to accept unknown recipients. Get the DNS right and leave the server strict, and you get clean 550s. Get the server permissive and the DNS wrong, and mail never arrives to be accepted. The next sections deal with the third option, telling senders at the DNS layer that the domain takes no mail at all.
What a Null MX Record Is and Why RFC 7505 Matters
The record itself is almost insultingly small. A null MX is a single MX RR published at the zone apex with preference 0 and a target of the root label: example.com. IN MX 0 . In a BIND zone file that line reads @ IN MX 0 .; the trailing dot after the zero-space is mandatory because it names the root, not a host in your zone. In Cloudflare’s DNS panel you add an MX record with priority 0 and content “.” (some UIs want a single period, some accept an empty target with priority 0). There is no A record, no AAAA record, and no host to connect to. That is the point.
RFC 7505 (published April 2015, “A Null MX Resource Record for Domains That Accept No Mail”) defines the semantics. An MX RRset consisting of exactly one record whose target is the root label means the domain accepts no email at all. A sender that resolves this answer must not open an SMTP connection to port 25 for that domain. It should treat the message as permanently undeliverable and report it to the originating user, typically as a 5.1.10 or similar permanent failure, rather than queueing and retrying for days. The RFC also fixes the degenerate cases that used to confuse implementations: the null MX must be the only MX in the RRset, and it must have preference 0. Mixing “0 .” with a real MX such as “10 mail.example.com.” is a protocol error, and resolvers will return the whole set while senders do whatever their code path happens to do. Some will try the real host, some will bail out. Do not ship that configuration.
The distinction that trips people up is implicit versus explicit. A domain with no MX records at all is implicitly null only by the fallback rule in RFC 5321: if no MX exists, the sender may try an A or AAAA record at the apex and deliver to that host. That fallback is a legacy behavior, and it means a domain with an A record pointing at a web server can still receive (or attempt) mail. An explicit null MX removes that ambiguity. It is a positive, signed statement in DNS: this domain does not accept mail, do not knock. When the zone is DNSSEC-signed, the denial is authenticated, which is why null MX pairs well with DMARC p=reject on parked or non-sending domains. Note the split of responsibilities: MX records route inbound mail to a mail server, while SPF, DKIM and DMARC govern outbound mail only. A null MX says nothing about whether your domain sends mail, and a strict DMARC policy says nothing about whether it receives. Configure both when a domain is meant to be inert.
One more correction to the folklore: a null MX is not a firewall and not a spam filter. It stops standards-compliant senders at the DNS lookup, before the SMTP banner. Non-compliant bulk senders, badly written marketing platforms, and anything that ignores MX and dials the A record will still attempt a connection, so the mail server behind that address should still answer 550 no such user or refuse the session outright. The null MX is the cheap, cacheable first line: a TTL-bounded answer that says “no” in one packet instead of a TCP handshake, a TLS negotiation, and an accept-then-bounce cycle.
Catch-All Email Meaning: Wildcards, Domains, and Mailboxes
A catch-all email is a routing rule that accepts every message sent to a domain, regardless of whether the local part matches a real mailbox. The recipient can be anything@yourdomain.com: sales-2024, qa-team-berlin, or a random string a sign-up form invented. A standard mail server replies with 550 no such user when no mailbox matches; a catch-all tells it to deliver anyway. That is the catch-all email meaning in one sentence, and it is worth pinning down before the term gets muddled with aliases and forwarding.
Four related terms show up in documentation and support tickets, and they describe different layers of the same setup:
- Catch-all email is the behavior itself: acceptance of unknown local parts at a domain.
- Catch-all email address is the destination that receives the accepted mail, usually one designated mailbox or a script.
- Catch-all domain is a domain configured to accept all addresses, which is why automation and sign-up workflows use them for unlimited unpredictable addresses.
- Catch-all mailbox is the physical store, folder, or queue where the accepted messages land.
Note what is not on that list: DNS. A catch-all email is configured on the mail server, not in DNS. MX records route inbound mail to a mail server, and that is the whole job of DNS here. Whether the server then accepts unknown recipients is a policy decision made in Postfix, Exim, or whichever MTA is listening. People search for “set up catch-all in Cloudflare” and end up in Email Routing, which is a forwarding layer rather than a mailbox; “set up catch-all in cPanel” lands in the Mail section, where the toggle writes a rule into the local MTA config. Both work, but only one of them gives you a real catch-all mailbox.
In Postfix, the usual implementation is a virtual alias domain mapped to one destination, for example @example.com admin@example.com in a virtual alias file, with the domain listed in virtual_alias_domains. Exim handles it with a router that matches any local part at the domain and redirects to a single address, placed after the real-user routers so known mailboxes win. Both paths rely on the same ordering logic: the catch-all is a fallback rule mail server configs apply last, not a wildcard that overrides everything.
Catch-all differs from alias, forwarding and disposable addresses in scope. An alias maps one specific address to another. Forwarding moves mail to an external destination. A disposable address is a single generated address you can later revoke. A catch-all is domain-wide: every unlisted local part is caught, including ones you never planned for. catch-all vs email forwarding is worth a closer look. That is the feature and the liability in one. Catch-all domains are used for unlimited unpredictable addresses in automation and sign-ups, and the same property means a catch-all carries the risk of accepting spam to invented addresses. Spammers guess local parts constantly, and a catch-all guarantees every guess reaches a real inbox.
One more distinction matters for verification. In email verification, a domain that accepts all addresses is flagged as catch-all, and the verifier cannot confirm whether a specific mailbox exists, only that the domain will not bounce it. That is a different signal from a valid mailbox and should be treated as such. AllMail.one publishes a guide to catch-all email that walks through these cases if you need the long version.
Null MX Versus Catch-All: Stopping Mail at the DNS Layer
The DNS answer decides the fate of the message
MX records route inbound mail to a mail server, and that lookup happens before a single SMTP command is sent. When a sender’s MTA resolves a domain and finds a null MX (a single record of 0 .), RFC 7505 tells it the domain accepts no mail. The connection is never opened. That is the whole point: the rejection happens at the DNS layer, with a standards-defined result, instead of being negotiated inside Postfix or Exim after a TCP handshake, a HELO, a MAIL FROM, and a RCPT TO.
Now consider the catch-all case. A catch-all email is configured on the mail server, not in DNS. The MX record points at a host, SMTP connects, and only then does the server decide what to do with an unknown local part. If a catch-all mailbox exists, the message is accepted. If it does not, a standard mail server replies with 550 no such user. Either way, the sender has already spent a connection, and the receiving system has already taken on the parsing, the queue entry, and the risk.
The myth worth killing is that a catch-all and a null MX are two flavors of the same “accept everything” or “reject everything” switch. They operate at different layers entirely. One is a DNS policy statement; the other is a server-side routing rule. Mixing them up produces setups that look correct in a control panel and behave nothing like the operator intended.
Why the 550 from DNS beats the 550 from the queue
A null MX produces a clean, immediate, cacheable rejection. The sender learns the domain is not open for business, and recursive resolvers hold that answer for the TTL, so the next sender gets the same fast answer. Compare that with an accept-then-bounce path: the catch-all accepts the message, a rule later decides the address is invalid, and a bounce goes out. That bounce is backscatter, it can be forged, and it damages the domain’s reputation with SPF, DKIM and DMARC alignment problems since those records govern outbound mail only and cannot fix a bounce you should never have generated.
There is also the misconfigured relay failure mode. A catch-all domain with a fallback rule mail server that forwards unknown recipients to a smart host often accepts mail it cannot deliver, then retries for days before giving up. The sender sees a 250 at RCPT time and assumes success. A null MX never lets that happen.
| Setup | Where the decision happens | Sender sees | Trade-off |
|---|---|---|---|
Null MX (0 .) |
DNS resolver, before SMTP | No connection possible; domain accepts no mail | Clean and cacheable, but rejects every address, including ones you might want |
| Catch-all mailbox | Postfix or Exim after RCPT TO | 250 accepted for any local part | Useful for sign-ups and automation, but invites spam to invented addresses |
| No MX, no A record | DNS resolver | Implicit null; behavior varies by sender | Not explicit, some senders fall back to the A record and still try |
| Catch-all plus fallback relay | Mail server, then smart host | 250, then silent retries or late bounce | Backscatter risk and delayed failure signals |
| Explicit reject in server config | Postfix or Exim after RCPT TO | 550 no such user | Correct result, but the connection was already made and parsed |
The practical rule: if the domain genuinely accepts no mail, publish a null MX and stop pretending a catch-all will filter it for you. If you need unlimited unpredictable addresses for automation, run a real catch-all mailbox and monitor it, because accepting everything is a decision with a cost, and the DNS layer is the wrong place to discover it.
Diagnosing Common Null MX and Catch-All Misconfigurations
Most mail delivery failures blamed on “the other side” trace back to a DNS or server config that contradicts itself. A domain that publishes a null MX alongside a real MX record is the classic case. RFC 7505 is explicit: if any MX record points to a host, the “0 .” record is only meaningful when it is the sole record in the set. Publish both and resolvers will hand the sending MTA a target host, which it will try first because the null entry has no host to connect to. The message then hits your catch-all rule or bounces with whatever your server returns. Run dig MX example.com +short and count the lines. One line reading “0 .” is a clean null MX. Two or more lines mean the null intent is dead letter.
The reverse failure is just as common: a catch-all rule that overrides the null MX. This happens when the DNS zone correctly declares “0 .” but the mail server still has a wildcard alias or a virtual domain with catch-all enabled. Senders that ignore RFC 7505 (some marketing platforms and older MTAs do) will fall back to an A record lookup, find the web server, and try port 25 anyway. If that host also runs Postfix with a catch-all, the mail is accepted and the null MX never mattered. The fix is to remove the catch-all or to ensure the host on the A record rejects unknown recipients with a proper 550 no such user.
Relay fallback is the third offender. Many organizations route outbound through a smart host or a third-party filter. When the primary MX is unreachable or returns 4xx, the relay may try a secondary path configured in the transport map, and that path often has a permissive catch-all. The result is mail that should have been refused at the DNS layer getting accepted downstream and then bounced later, producing confusing backscatter. Check your transport maps and smarthost configs for any “accept all addresses” rule that sits between the sender and the final destination.
Verifying the Setup with dig and a Live SMTP Transaction
DNS checks only prove the zone is right. You also need to prove the server behaves. Use these steps in order:
- Run
dig MX yourdomain.com +shortand confirm exactly one record, “0 .”, if you intend a null MX. Any additional MX host invalidates the null. - Run
dig A yourdomain.com +shortto see what a non-compliant sender would connect to. If it is a mail host, test it. - Open a raw session with
openssl s_client -connect mail.yourdomain.com:25 -starttls smtpor plaintelnet mail.yourdomain.com 25. - Issue
EHLO test.local, thenMAIL FROM:<probe@test.local>, thenRCPT TO:<no-such-user-9f3a@yourdomain.com>. A correct null or strict setup returns 550; a catch-all returns 250. - Repeat with a known-good address to confirm legitimate mail still lands.
Watch for one more trap: catch-all domains used for automation and sign-ups often accumulate so much spam to invented addresses that the mailbox fills and legitimate mail is dropped silently. If your catch-all is intentional, monitor the inbox volume and set a discard rule for messages that fail SPF and DMARC. A working catch-all setup requires DNS pointing at the right host and a server that genuinely accepts unknown recipients, and neither half alone is enough.
Deploying Null MX and Catch-All Policies Safely
Choosing between a null MX and a catch-all is a policy decision, not a technical default. Write it down before you touch DNS. The two choices are mutually exclusive in intent: a null MX says “this domain accepts no mail at all,” while a catch-all says “this domain accepts everything, including addresses that were never created.” Domains that need both behaviors should be split into subdomains, for example mail.example.com with a catch-all for sign-up automation and example.com with a null MX for corporate mail that lives elsewhere.
If the domain genuinely never receives mail, publish exactly one MX record with preference 0 and a target of “.” and nothing else. TTL matters more than people think. Set it low (300 to 900 seconds) a day before the change so a mistake can be reversed quickly, then raise it to 3600 or higher once the state is stable. Two things break a null MX rollout: leaving an old MX record in place, which makes the null MX non-conforming, and forgetting that SPF, DKIM and DMARC govern outbound mail only, so a null MX has no bearing on sending. If the domain also sends mail, keep the authentication records intact and document why the domain sends but never receives.
For catch-all deployments, the risk profile is the mirror image. A catch-all mailbox accepts every message sent to the domain, including dictionary attacks against invented local parts, so the spam volume can grow without any user action. Before enabling it, confirm the mail server is configured to accept unknown recipients (Postfix luser_relay or a virtual alias regexp, Exim a *@domain router), set a retention policy for the catch-all mailbox, and add filtering upstream. If the catch-all exists only to protect against typos on a small set of real addresses, an alias or forwarding rule per address is cleaner and easier to audit.
Monitoring is where most deployments fail quietly. For null MX, watch the outbound queue of your own senders for bounces that mention “null MX” or a 550 rejection and check that no internal application still sends to the domain. For catch-all, review the mailbox weekly for the first month: legitimate mail that lands there (password resets, invoices, vendor notices) signals a missing real mailbox, while pure spam to random strings confirms the catch-all is doing what it should. Keep a sample of rejected or accepted messages so you can prove the policy works.
Documentation closes the loop. Publish a short note in your runbook and on the domain’s landing page stating which policy applies, when it was set, and who owns it. Tell internal teams which addresses are valid so they stop relying on the catch-all as a safety net, and tell external senders if the domain no longer receives mail. A working catch-all setup requires DNS pointing at the right host and a server accepting unknown recipients, and a null MX requires the opposite: DNS that tells every sender to stop before SMTP. Recording that decision, along with the TTL used and the rollback step, turns a one-off DNS edit into a policy your team can defend.
Run the check before you change anything. From a machine outside your network, query the domain with dig MX example.com +short and read the answer literally: a single 0 . means the domain is declared null and no SMTP connection should follow; an empty answer means the same in practice but without the explicit signal; a list of hosts means mail will connect to whichever host has the lowest preference that answers. Then test the actual path with swaks –to test@example.com –server mx1.example.com or a plain telnet session on port 25, and watch whether the server returns 550 no such user, accepts and queues, or accepts and bounces later. Those three outcomes tell you more about your real configuration than any control panel checkbox, because a catch-all mailbox configured on the mail server is invisible in DNS and a stale MX record can outlive the policy you thought you deployed.
Decide the policy per domain, not per server. Domains that only send mail, parked domains, and domains you use for outbound-only transactional traffic belong on null MX with a matching SPF record that ends in -all and a DMARC policy at p=reject; that combination tells the world the domain sends nothing and receives nothing, and it kills the backscatter from accept-then-bounce catch-alls that spammers love. Domains where you genuinely need unlimited unpredictable addresses, such as automation inboxes, sign-up testing, or per-customer reply addresses, keep a catch-all but pair it with rate limits, a spam quarantine folder, and a review of what lands there weekly. Set the TTL to 300 seconds for the first day of any MX change so a mistake rolls back in five minutes rather than an hour, confirm that no secondary MX or backup relay still points at the old host, and write the decision into your internal runbook with the date and the reason. When a sender complains that mail bounced, the first question is always whether the domain answers with a null MX or a catch-all, and the answer should be in your documentation, not something you rediscover with dig at 2 a.m. AllMail.one publishes a guide to catch-all email that covers the mailbox side of this setup in more depth.