Skip to content

Catch-all email on cPanel: why a sale@/sales@ typo doesn't need one

cPanel's Default Address setting controls what happens to mail sent to addresses that don't exist on a domain — forward everything (a catch-all), reject it during the SMTP conversation, or discard it silently. Here's the mechanism, why always-on catch-all costs more than it saves, and how to solve the sale@/sales@ typo problem without one.

A catch-all does not need to exist for sale@example.com to reach the same inbox as sales@. cPanel controls unmatched mail with one per-domain setting — Email » Default Address — with three real outcomes: forward everything unrouted to one mailbox (the classic catch-all), reject it during the SMTP conversation with an error the sender actually sees, or discard it silently with no error at all. Turning the default to “forward everything” does solve the one typo you’re worried about, but it also accepts every dictionary-attack guess and harvested-address blast the domain will ever receive, landing in the same box as the message you wanted. The fix that solves the typo problem without that cost: forward the specific, realistic misspellings — sale@, sales, whatever your team actually gets wrong — as named alias forwarders, and set the default address to reject everything else at SMTP time. Below is the mechanism, the exact cPanel and command-line steps for both pieces, and — the part most articles on this skip — how to audit a catch-all you already have before you touch it.

What you’ll accomplish

  • Understand the three real behaviors behind cPanel’s Default Address setting — forward, SMTP-time reject, silent discard — and where each is actually stored.
  • Know why “catch-all, always on” costs more in spam volume and delivery reputation than it saves in caught typos.
  • Set up named alias forwarders for the specific typos worth catching, with a hard SMTP-time rejection for everything else.
  • Audit an existing catch-all’s real legitimate-mail rate from the Exim log before deciding whether to keep or kill it.
  • Make the change from both the cPanel UI and the command line, with a way to prove it took effect.

Prerequisites

  • Access to cPanel » Email » Default Address for the domain in question, or WHM/root access if you’re auditing or changing several accounts at once.
  • Shell access (SSH) to read /etc/valiases/<domain>, /var/log/exim_mainlog, and /var/log/exim_rejectlog. The audit step below — reading actual delivery history before you flip a setting — isn’t available from the cPanel UI at all; you need the log.
  • A server running Exim, which is the default and near-universal mail transfer agent under cPanel & WHM. If the box is running something else behind cPanel, the file paths and uapi calls here won’t apply.
  • A current list of the domain’s real mailboxes (uapi Email list_pops, covered below) so you can tell a legitimate address from a guess when you read the log.
  • If you’re touching many accounts, know that WHM » Tweak Settings only sets the default for newly created accounts — it does not retroactively change domains that already exist, so an existing fleet needs a per-account pass, scripted or otherwise.

How it works

The setting lives in one place: /etc/valiases/<domain>, a plain-text alias file Exim reads at delivery time. Named accounts and forwarders get their own line; the domain’s catch-all behavior is the single wildcard line, *: <target>. What <target> is decides everything:

  • An email address (*: someone@example.com) — every unmatched address forwards there. This is the catch-all.
  • The account’s own username (*: theusername) — unmatched mail lands in the account’s own primary mailbox. Functionally the same catch-all, just without a separate forwarding address.
  • *: :fail: <message> — Exim’s redirect router treats :fail: as a forced failure, and by default returns SMTP code 550 for it. Because this failure is evaluated during recipient verification at the SMTP conversation (RCPT TO), the sending server gets the rejection before your server has accepted the message — no message is ever queued, stored, or bounced after the fact.
  • *: :blackhole: — the opposite of :fail: in every way that matters: “no delivery is done, and no error message is generated,” per Exim’s own documentation. The sender gets no signal at all that anything went wrong.

cPanel’s Email » Default Address screen is a front end for that one file, scoped per domain via a “send all unrouted email for the following domain” selector. The exact wording has shifted across cPanel versions, but the choices it exposes map directly onto the file: “Discard the email while your server processes it by SMTP time with an error message” (needs a custom failure message — this is :fail:), “Forward to Email Address” (the catch-all), and under Advanced options, “Forward to your system account”, “Pipe to a Program”, and “Discard (Not Recommended)” (that last one is :blackhole: — cPanel’s own label already warns it off). If your version’s wording differs, judge the option by which of these four behaviors it produces, not the label.

The diagram below is the decision this article argues for: most domains land on reject-at-SMTP, a smaller set legitimately needs a short, named alias list, and full always-on catch-all is the exception, not the default.

Decision tree for whether a cPanel domain should run a catch-all, branching on whether it receives external mail, whether its addresses have been publicly exposed long enough to be harvested, and whether there's proven evidence of a real typo problem, ending at three configurations: reject unmatched mail with :fail:, explicit alias forwarders for known typos plus :fail: for the rest, or a rare monitored full catch-all

The case against “always on” isn’t hypothetical. Spammers run dictionary attacks against every domain with an MX record — info@, admin@, first.last@, and thousands more, automatically — and a catch-all accepts every guess as valid. Addresses ever printed on a business card, posted on an old page, or sitting in a breached mailing list get harvested and reused as spoofed senders and spray targets indefinitely; a catch-all absorbs that traffic forever, with no way to opt out. The failure mode that actually damages you, not just annoys you, is backscatter: if your server accepts mail to a bogus address and only later decides it can’t deliver it, the bounce it generates goes to whatever sender address was on the envelope — which, for spam, is almost always forged. You end up sending non-delivery notices to strangers who never emailed you, and enough of that pattern gets a server treated as a spam source by reputation systems on the receiving end. Rejecting at SMTP time avoids all of it — nothing is ever accepted, so there’s nothing to bounce later.

Official reference for the underlying mechanics: cPanel’s Default Address documentation and Exim’s redirect router specification, which covers :fail: and :blackhole: directly.

Step-by-step

1. Inventory the domain’s real mailboxes before you change anything. You need this list to judge, later, whether an address in the log is legitimate or a guess.

uapi --user=exampleuser Email list_pops domain=example.com
{
   "status": 1,
   "errors": null,
   "data": [
      { "email": "sales@example.com", "user": "sales" },
      { "email": "info@example.com", "user": "info" },
      { "email": "billing@example.com", "user": "billing" }
   ]
}

2. Read the domain’s current default-address setting. The raw file is the source of truth — it tells you immediately whether you’re already looking at a catch-all, a reject, or a discard.

cat /etc/valiases/example.com | grep '^\*:'
*: catchall@example.com

That means every unmatched address on the domain forwards to catchall@example.com right now — the account you’ll audit next. If you instead see *: :fail: ..., the domain already rejects unmatched mail and there’s nothing further to do here.

3. Audit 30 days of catch-all traffic before you touch the setting. This is the step most articles on this topic skip, and it’s what turns “probably mostly spam” into a number you can act on. exigrep groups every log line for a matching message together, so filtering its output to arrival lines (<=) counts distinct messages.

exigrep "catchall@example.com" /var/log/exim_mainlog | grep -c '<='
1247

That total tells you volume, not legitimacy. Break it down by sender to see the shape of it:

exigrep "catchall@example.com" /var/log/exim_mainlog \
  | grep '<=' \
  | awk -F'<= ' '{print $2}' | awk '{print $1}' \
  | sort | uniq -c | sort -rn | head -20
    312 spam-blast@random-vps.example.net
    198 no-reply@harvested-list.example.org
     89 sales-bot@dictionary-scan.example.com
      4 realclient@theirbusiness.com

That last line — four messages from one real correspondent, out of 1,247 — is the number the whole decision hinges on. If the log doesn’t reach back 30 days, check /etc/logrotate.d/exim for the rotation schedule and include the rotated archives (zgrep/bzgrep) rather than concluding from a partial window.

4. Forward the realistic typos as named aliases, not a wildcard. Cross-reference the legitimate senders from step 3 — misdirected mail is usually one or two specific misspellings, not an open-ended set. In the UI: Email » Forwarders » Add Forwarder, enter sale@example.com, choose Forward to Email Address, and point it at sales@example.com. On the command line, @ must be URL-encoded as %40:

uapi --user=exampleuser Email add_forwarder domain=example.com \
  email=sale%40example.com fwdopt=fwd fwdemail=sales%40example.com
{
   "status": 1,
   "errors": null,
   "data": { "result": 1, "reason": "Forwarder Added" }
}

Repeat for each realistic misspelling. Keep the list short and named — that’s deliberately not a wildcard.

5. Set the default address to reject everything else at SMTP time. In the UI, cPanel » Email » Default Address, select the domain, choose the option that discards unrouted mail with an SMTP-time error message, and enter a short failure message. On the command line:

uapi --user=exampleuser Email set_default_address domain=example.com \
  fwdopt=fail failmsgs="No such address at example.com. Check the spelling and try again."
{
   "status": 1,
   "errors": null,
   "data": [
      { "domain": "example.com", "dest": ":fail: No such address at example.com. Check the spelling and try again." }
   ]
}

This is the shift the diagram below illustrates: the misdirected message that used to be absorbed into a shared mailbox now takes one of two clean paths — a named typo forwards to the right person, everything else is rejected immediately and the sender is told why.

Before/after comparison of mail flow for an inbound message to a nonexistent address: under catch-all-on, the message is accepted and lands in a shared mailbox mixed with unrelated spam that nobody reads regularly; under catch-all-off with explicit alias forwarders, a real typo like sale@ is forwarded to the correct mailbox while everything else is rejected at SMTP time with an immediate 550 error to the sender

Validate it works

Confirm the file reflects the change:

cat /etc/valiases/example.com | grep '^\*:'
*: :fail: No such address at example.com. Check the spelling and try again.

Send a test message to an address that doesn’t exist and was never one of your aliases, from an external account you control, and watch it in the log:

grep "definitely-not-a-real-address@example.com" /var/log/exim_rejectlog | tail -5
2026-08-19 14:02:11 H=mail.outside-domain.example [198.51.100.7] F=<tester@outside-domain.example> rejected RCPT <definitely-not-a-real-address@example.com>: No such address at example.com. Check the spelling and try again.

The rejected RCPT line is the proof, and the log it appears in matters: the refusal happened at the RCPT TO command, during the SMTP conversation, so the message was never accepted. Confirm the other half — that nothing was queued — by checking that the main log has no arrival line for it at all:

grep -c "definitely-not-a-real-address@example.com" /var/log/exim_mainlog
0

Zero is the result you want. An <= arrival line in exim_mainlog followed by a ** failure would mean the opposite: the server accepted the message and only then decided it could not deliver it, which generates exactly the backscatter bounce this setup exists to avoid. On the sending side, confirm the client or logs show an immediate, permanent (5xx) failure with your custom text — not a delayed bounce arriving minutes later.

Then confirm the typo path still works: send a test to sale@example.com and confirm it lands in sales@example.com, not the old catch-all.

Troubleshooting

The custom failure message doesn’t show up on the sender’s side. Some sending servers rewrite the remote failure text with their own generic non-delivery notice before it reaches the end user. Your text is still sent correctly during the SMTP conversation — confirm that from exim_rejectlog on your own server — but you don’t control what the sender’s MTA does with it afterward. Expected, not a misconfiguration.

Mail is still landing in the old catch-all mailbox. Check the raw file, not your memory of the UI: cat /etc/valiases/example.com | grep '^\*:'. A stale entry usually means the change was made for the wrong domain (multi-domain accounts need it set per-domain), or a prior manual edit to /etc/valiases bypassed the UI.

uapi Email add_forwarder returns status: 0. Most often a missing or malformed %40 in email= or fwdemail= — the @ must be URL-encoded. Next most common: domain= naming a domain not on that account.

Unsure whether the alias or the wildcard wins. They don’t conflict: a named alias always matches before Exim falls through to the *: line. If sale@example.com still hits the default address after step 4, the forwarder entry is missing or misspelled — grep /etc/valiases/<domain> for the exact local part.

The audit shows zero legitimate mail, but you’re still nervous about turning it off. That’s the case for the narrow, monitored exception: forward to a spam-filtered mailbox with a fixed review date instead of rejecting outright, and revisit after another 30 days. Don’t leave that exception running indefinitely — it’s the same trap in a smaller box.

When this is the wrong approach

A domain that never receives mail from the public — pure internal automation, a staging environment, outbound-only notifications — doesn’t need any of this apparatus. There’s no typo risk to solve because there’s no external correspondent typing the address; :fail: alone is the entire answer, and you can skip the alias-forwarder step.

A domain mid-migration, or one that just changed hands, is a legitimate case for a short-lived, monitored catch-all — you often don’t yet know the realistic typo list, and guessing wrong loses mail you can’t get back. Route it to a mailbox someone actually reviews, filter that mailbox specifically for spam, and put an end date on the exception. That’s a deliberate, time-boxed decision, not the “set once and forget it” default this article argues against.

If the box isn’t running Exim — a different mail stack behind cPanel, or a panel other than cPanel/WHM — the concepts still hold (SMTP-time rejection beats accept-then-bounce, named aliases beat a wildcard), but /etc/valiases and every uapi call here are Exim/cPanel-specific and won’t apply as written.

For the mechanics of forwarders themselves — keeping a local copy, avoiding loops, and the SPF/DMARC breakage that forwarding can cause — see creating and managing email forwarders in cPanel and fixing DMARC failures on forwarders with SRS. If the domain has ever been used to relay spam, or you’re hardening mail delivery more broadly, Exim open relay hardening is the next thing to check.

If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.