11 KiB
| title | description | published | date | tags | editor | dateCreated |
|---|---|---|---|---|---|---|
| Recieving Mail thru MXRoute | Trusted receiver | true | 2026-02-15T02:33:37.376Z | markdown | 2026-02-15T01:44:15.683Z |
MXroute Incoming Mail to Mailcow
Overview
Configuration guide for using MXroute to receive incoming mail for your domains and forward to your Mailcow server.
Architecture
Incoming: Internet → MXroute → Mailcow subdomain → Alias → Mailbox
Outgoing: Mailbox → Mailcow → MXroute relay → Internet
This setup allows MXroute to handle incoming mail filtering, spam protection, and then forward clean mail to your Mailcow server. Users send and receive using clean @yourdomain.com addresses.
Address Structure Explained
What users see (clean addresses):
john@yourdomain.comjane@yourdomain.com
What happens behind the scenes:
- Mailboxes actually exist as
john@mail.yourdomain.com - Aliases in Mailcow map
john@yourdomain.com→john@mail.yourdomain.com - MXroute forwards to
john@mail.yourdomain.com - Users send FROM
john@yourdomain.com(configured as default sender) - Users login with
john@yourdomain.com(Dovecot auth configured to accept aliases)
Benefits:
- 100% transparent to users - they only ever see/use
@yourdomain.com - Clean, professional email addresses
- Easier for users to remember and communicate
- No confusion about which address to use
MXroute Configuration
1. Add Domain to MXroute
- Log into MXroute DirectAdmin panel
- Navigate to Email Accounts → Email Domains
- Add your domain (e.g.,
yourdomain.com)
2. Create Catch-All Forwarder
- Navigate to Email Accounts → Forwarders
- Create catch-all forwarder:
- Email Address:
*@yourdomain.com - Forward To:
@mail.yourdomain.com
- Email Address:
- This forwards all mail to your Mailcow server, preserving the username
How it works:
- Mail to
john@yourdomain.com→ forwarded tojohn@mail.yourdomain.com - Mail to
jane@yourdomain.com→ forwarded tojane@mail.yourdomain.com
DNS Configuration
Update MX Records
Point your domain's MX records to MXroute servers:
yourdomain.com → MX 10 arrow.mxroute.com
yourdomain.com → MX 20 eagle.mxroute.com
Note: Check your MXroute account for the correct server hostnames (arrow, eagle, hermes, etc.)
SPF Record
Update SPF to allow MXroute to send on your behalf:
v=spf1 include:mxroute.com -all
If you also send from Mailcow directly:
v=spf1 ip4:192.168.5.16 include:mxroute.com -all
DKIM Records
-
Generate DKIM key in MXroute DirectAdmin:
- Navigate to Email Authentication → DKIM Keys
- Generate key for your domain
- Copy the DNS record
-
Add DKIM TXT record to your DNS:
default._domainkey.yourdomain.com → [MXroute DKIM public key]
DMARC Record
_dmarc.yourdomain.com → v=DMARC1; p=quarantine; rua=mailto:admin@yourdomain.com
Note: Start with p=quarantine for testing, then move to p=reject once confirmed working.
Mailcow Configuration
1. Add Domain
Add mail.yourdomain.com as a domain in Mailcow:
- Navigate to Mailcow admin → Configuration → Mail setup → Domains
- Add domain:
mail.yourdomain.com - Configure as needed
2. Create Mailboxes
Create mailboxes using the subdomain:
- Navigate to Mailboxes
- Create mailbox:
john@mail.yourdomain.com - Set password and quota
- Repeat for each user
3. Create Aliases for Clean Addresses
For each mailbox, create an alias so users can use clean @yourdomain.com addresses:
- Navigate to Configuration → Mail setup → Aliases
- Create alias:
- Alias:
john@yourdomain.com - Destination:
john@mail.yourdomain.com
- Alias:
- Repeat for each user
Alternative: Alias Domain (Easier for Multiple Users)
- Navigate to Configuration → Mail setup → Alias Domains
- Add alias domain:
yourdomain.com→ aliases to →mail.yourdomain.com - This automatically creates aliases for ALL mailboxes:
john@yourdomain.com→john@mail.yourdomain.comjane@yourdomain.com→jane@mail.yourdomain.com
4. Configure Default Sender Address
Set users to send FROM their clean address by default:
Method 1: Per-Mailbox Settings
- Edit each mailbox in Mailcow
- Under Sender addresses, add
john@yourdomain.com - Set as default sender address
Method 2: SOGo Webmail Users can configure in SOGo:
- Log into webmail
- Settings → Mail → Accounts
- Set "From" address to
john@yourdomain.com
Method 3: Email Client Configure email client (Thunderbird, Outlook, etc.):
- Identity name:
john@yourdomain.com - Reply-to:
john@yourdomain.com - SMTP still authenticates as
john@mail.yourdomain.com
5. Enable Login with Alias Addresses (Make Transparent to Users)
Allow users to login with john@yourdomain.com instead of john@mail.yourdomain.com:
-
SSH into your Mailcow server
-
Edit the Dovecot configuration:
cd /opt/mailcow-dockerized nano data/conf/dovecot/extra.cf -
Add the following line:
auth_username_format = %Ln@%Ld -
Restart Dovecot:
docker-compose restart dovecot-mailcow
Alternative method - Edit via Mailcow UI:
- Navigate to System → Configuration → Configuration & Details
- Under Dovecot, add custom config
- Add:
auth_username_format = %Ln@%Ld
Result: Users can now login with EITHER address:
john@yourdomain.com✓john@mail.yourdomain.com✓
Both will work for IMAP, SMTP, and webmail authentication.
6. Allow MXroute IP Addresses
Add MXroute server IPs to Mailcow's trusted networks to skip spam filtering:
- Navigate to Configuration → Configuration & Details → Options
- Under mynetworks, add MXroute IPs
- Or edit via command line in
data/conf/postfix/extra.cf:mynetworks = 127.0.0.0/8 [::1]/128 192.168.0.0/16 [MXroute IPs]
7. Disable Greylisting for MXroute (Optional)
If you experience delays:
- Navigate to Configuration → Configuration & Details
- Find your domain
- Under Greylisting, add MXroute IPs to whitelist
Testing
1. Test Mail Flow
Send test email from external provider (Gmail, Outlook):
From: test@gmail.com
To: john@yourdomain.com
Expected Flow:
- Mail arrives at MXroute for
john@yourdomain.com - MXroute forwards to
john@mail.yourdomain.com - Mailcow receives at
john@mail.yourdomain.com - Mailcow alias delivers to
john@mail.yourdomain.commailbox - Mail appears in John's inbox
2. Test Reply
Have John reply to a message:
Expected behavior:
- Reply FROM:
john@yourdomain.com(clean address) - Reply goes through Mailcow → MXroute relay → Internet
3. Check Headers
Review email headers in Mailcow to verify:
Received:headers show MXroute serverTo:showsjohn@yourdomain.comDelivered-To:showsjohn@mail.yourdomain.com- SPF, DKIM, DMARC all pass
- No spam flags
3. Monitor Logs
MXroute Logs:
- Check DirectAdmin → Email Logs
- Verify forwarding is occurring
Mailcow Logs:
docker-compose logs -f postfix-mailcow
Look for incoming connections from MXroute IPs.
Example Configuration: gnarlypandaproductions.com
Mailcow Setup
Domain: mail.gnarlypandaproductions.com
Mailboxes:
admin@mail.gnarlypandaproductions.comcontact@mail.gnarlypandaproductions.cominfo@mail.gnarlypandaproductions.com
Alias Domain:
gnarlypandaproductions.com → aliases to → mail.gnarlypandaproductions.com
This automatically creates:
admin@gnarlypandaproductions.com→admin@mail.gnarlypandaproductions.comcontact@gnarlypandaproductions.com→contact@mail.gnarlypandaproductions.cominfo@gnarlypandaproductions.com→info@mail.gnarlypandaproductions.com
MXroute Setup
Catch-all Forwarder:
*@gnarlypandaproductions.com → @mail.gnarlypandaproductions.com
DNS Records
| Record Type | Name | Value |
|---|---|---|
| MX | @ | 10 arrow.mxroute.com |
| MX | @ | 20 eagle.mxroute.com |
| A | 192.168.5.16 | |
| TXT | @ | v=spf1 ip4:192.168.5.16 include:mxroute.com -all |
| TXT | _dmarc | v=DMARC1; p=reject; rua=mailto:admin@gnarlypandaproductions.com |
| TXT | default._domainkey | [MXroute DKIM key] |
User Experience
Users use clean addresses for EVERYTHING (completely transparent):
- Send FROM:
admin@gnarlypandaproductions.com - Receive AT:
admin@gnarlypandaproductions.com - Login with:
admin@gnarlypandaproductions.com(and password) - SMTP/IMAP Server:
mail.gnarlypandaproductions.com
Users never need to know about the mail. subdomain!
Troubleshooting
Mail Not Being Forwarded
-
Check MXroute forwarder configuration
- Verify forwarder exists in DirectAdmin
- Check destination address is correct
- Review MXroute email logs
-
Verify DNS propagation
dig MX yourdomain.com dig TXT yourdomain.com -
Check Mailcow firewall
- Ensure port 25 is open
- Verify MXroute IPs aren't blocked
SPF/DKIM Failures
-
SPF not passing
- Verify
include:mxroute.comin SPF record - Check for typos in SPF syntax
- Use SPF checker: https://mxtoolbox.com/spf.aspx
- Verify
-
DKIM not passing
- Confirm DKIM record published in DNS
- Verify selector matches (usually
default) - Check DKIM record format (no spaces in key)
Mail Delayed or Bouncing
-
Greylisting delays
- Disable greylisting in Mailcow for MXroute IPs
- Or wait 5-15 minutes for retry
-
Mailbox full
- Check quota in Mailcow
- Increase quota or clean mailbox
-
Spam filtering
- Check Mailcow spam folder
- Whitelist MXroute IPs in Rspamd
MXroute Server Information
Common MXroute Mail Servers
- arrow.mxroute.com
- eagle.mxroute.com
- hermes.mxroute.com
- zen.mxroute.com
Your assigned server: Check MXroute DirectAdmin welcome email or DNS settings
MXroute IP Ranges
Consult MXroute documentation for current IP ranges to whitelist in Mailcow.
Advantages of This Setup
- Spam filtering: MXroute handles initial spam filtering
- DDoS protection: MXroute absorbs mail-based attacks
- Reliability: If Mailcow is down, mail queues at MXroute
- Deliverability: MXroute IPs have good reputation
- Offload processing: Reduces load on your Mailcow server