Cleanbox
Features Blog Pricing Developers
Sign in Start free trial

What is Relay and how does it protect your inbox?

Relay is Cleanbox inbound mail protection for your existing email addresses. Instead of creating new aliases, Relay sits between the internet and your mail server as a filtering gateway — scanning every incoming message for spam, viruses, and threats before forwarding clean mail to your server.

Relay is designed for businesses and professionals who already have email addresses they cannot change (info@yourdomain.com, support@yourdomain.com) but want the same level of protection that Cleanbox aliases provide.

How Relay works

When you enable Relay, you change your domain's MX records to point to Cleanbox. This makes Cleanbox the first stop for all incoming email on that domain:

  1. Connection — A sender's mail server connects to Cleanbox. The sending IP is immediately checked against DNSBL providers (Spamhaus, Barracuda, SpamCop). Blacklisted IPs are rejected before the message is even accepted.
  2. Receiving — Cleanbox accepts the message and verifies authentication: SPF, DKIM, and DMARC are all checked.
  3. Filtering — The message passes through the full Cleanbox filtering pipeline: Rspamd spam scoring, ClamAV virus scanning, your contact states (whitelisted, blocked, muted), and any filter rules you have configured.
  4. Decision — Based on the combined score and your per-address thresholds, Cleanbox either accepts, quarantines, or rejects the message. The X-Cleanbox-Explanation header is added to accepted messages showing what was detected.
  5. Forwarding — Accepted messages are forwarded to your actual mail server via SMTP, with the original message preserved intact.

Your email addresses keep working exactly as before. Recipients send to the same address, you receive in the same inbox — Cleanbox is invisible to both sides except for the spam that no longer arrives.

What Relay filters

Relay-protected addresses receive the same filtering as Cleanbox aliases:

LayerWhat it checksAction on failure
IP reputationSender IP against DNSBL providers (Spamhaus, Barracuda, SpamCop)Rejected at connection
AuthenticationSPF, DKIM, and DMARC validationScore penalty or rejection
Spam analysisRspamd content analysis, Bayesian classification, header checksScore-based: accept, quarantine, or reject
Virus scanningClamAV attachment and content scanningRejected
Contact statesYour whitelisted, blocked, and muted contactsBypass filtering or block
Filter rulesYour custom rules (sender, subject, headers, content)Per-rule action

You can adjust the spam threshold per address — stricter for a public-facing address like info@, more relaxed for internal addresses. See configuring per-address relay settings for details.

Authentication and forwarding

When Cleanbox forwards a message to your server, it preserves the original message intact — including the sender's DKIM signature. This means your mail server can independently verify that the message was not modified in transit.

To pass SPF checks at your server, Cleanbox uses SRS (Sender Rewriting Scheme) to rewrite the envelope-from address. This is a standard mechanism that ensures the forwarded message passes SPF validation at your destination. Some mail clients may display a "via srs.cleanbox.to" label as a result — see why you see "via srs.cleanbox.to" for a full explanation.

To prevent attackers from bypassing Cleanbox by sending directly to your server, you can configure a relay token. Your server verifies this token on every incoming message and rejects anything that did not pass through Cleanbox. See relay token configuration.

Delivery retries

If your mail server is temporarily unreachable, Cleanbox queues the message and retries delivery automatically. Messages are not lost during brief outages. For details on retry behavior and how to troubleshoot delivery failures, see understanding relay delivery failures and retries.

Relay vs. Aliases

AliasesRelay
PurposeCreate new email addressesProtect existing addresses
Mail serverNot needed (Cleanbox delivers via IMAP)Required (Cleanbox forwards to your server)
Outbound emailNot supported (receive-only)Unchanged — you send from your server as before
SPF/DKIM/DMARCManaged by CleanboxYour outbound authentication stays untouched
SetupInstant — pick a name and goMX record change + server configuration

Relay handles inbound filtering only — your outbound email, sending reputation, and authentication records are not affected.

Getting started

To use Relay, you need:

  • A Cleanbox Advanced or Enterprise plan
  • Your own mail server (or hosted email that accepts custom MX records)
  • Access to your domain's DNS settings

Advanced plans support up to 20 relay-protected addresses per domain. Enterprise plans support up to 100.

Ready to set up? Follow the step-by-step guide: setting up Relay for your domain.

Related articles