How to set up email forwarding for a custom domain
If you own a domain (e.g. yourdomain.com), you can route all incoming email through Cleanbox. This gives you aliases on your own domain, full spam filtering, and centralized management — without running your own mail server.
Overview
There are two ways to handle email on a custom domain with Cleanbox, depending on whether you already have a mail server:
| Aliases (IMAP) | Relay (SMTP forward) | |
|---|---|---|
| You have a mail server | No | Yes |
| How email is delivered | IMAP upload to Gmail, Outlook, etc. | SMTP forward to your server |
| Creates new addresses | Yes | No — protects existing ones |
| Minimum plan | Premium | Advanced |
Option 1: Aliases on your domain (no mail server needed)
This is the simplest setup. You create aliases like shop@yourdomain.com or info@yourdomain.com and Cleanbox forwards them to your existing mailbox (Gmail, Outlook, iCloud, etc.) via IMAP.
Step-by-step setup
- Add your domain — Go to Domains → Add domain → Enter
yourdomain.com - Add DNS records at your DNS provider:
- MX record:
@→mx1.cleanbox.to(priority 10) - TXT record:
@→cleanbox-verify=your-token - SPF record: Add
include:_spf.cleanbox.toto your existing SPF, or create:v=spf1 include:_spf.cleanbox.to ~all
- MX record:
- Verify — Click "Verify" in Cleanbox. Wait for DNS propagation if needed (usually 5–15 minutes).
- Create aliases — Go to Aliases → Add alias → Select your domain → Enter the local part (e.g.
info) - Select a mailbox — Choose which connected mailbox receives the forwarded emails
That is it. Emails sent to info@yourdomain.com are now filtered by Cleanbox and delivered to your mailbox.
Important notes
- Remove old MX records — If your domain previously pointed to another mail provider, remove those MX records. Otherwise email will be split between providers unpredictably.
- Only listed aliases receive mail — Cleanbox does not accept email for addresses that are not configured. If someone emails
random@yourdomain.comand no alias exists, the email bounces.
Option 2: Relay (you have your own mail server)
If you already run a mail server (or use Google Workspace / Microsoft 365) and want to keep your existing addresses, use Relay. Cleanbox sits in front of your server as a spam filter.
Step-by-step setup
- Add and verify your domain (same DNS steps as above)
- Enable Relay — Go to your domain → Relay tab → Enable
- Configure SMTP destination — Enter your mail server hostname and port (e.g.
mail.yourdomain.com:25) - Add relay addresses — Specify which addresses to protect (e.g.
info@yourdomain.com,support@yourdomain.com) - Test — Click "Test relay" to verify Cleanbox can reach your server
- Update MX records — Point MX to
mx1.cleanbox.to(remove or lower priority of old MX records)
How it differs
- Cleanbox filters inbound email, then forwards via SMTP to your server
- Your existing addresses keep working — no migration needed
- Your outbound email (SPF, DKIM, DMARC) is completely untouched
- Includes ClamAV virus scanning
- If SMTP forwarding fails, messages are queued and retried automatically
Which option should you choose?
- Choose aliases if you do not run a mail server and want to create new forwarding addresses on your domain.
- Choose relay if you already have working email on the domain and want to add spam filtering without changing how your mail works.
- Use both on the same domain if you want aliases for new addresses AND relay protection for existing ones (Advanced/Enterprise plans).
For detailed DNS setup instructions, see DNS configuration: MX, TXT, and SPF records.