docs: create mxroute-mailcow
This commit is contained in:
parent
2df2c47f28
commit
a153c1b294
1 changed files with 271 additions and 0 deletions
271
mxroute-mailcow.md
Normal file
271
mxroute-mailcow.md
Normal file
|
|
@ -0,0 +1,271 @@
|
||||||
|
---
|
||||||
|
title: Recieving Mail thru MXRoute
|
||||||
|
description: Trusted receiver
|
||||||
|
published: true
|
||||||
|
date: 2026-02-15T01:44:15.683Z
|
||||||
|
tags:
|
||||||
|
editor: markdown
|
||||||
|
dateCreated: 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
|
||||||
|
|
||||||
|
```
|
||||||
|
Internet → MXroute (receives) → Mailcow (delivers)
|
||||||
|
```
|
||||||
|
|
||||||
|
This setup allows MXroute to handle incoming mail filtering, spam protection, and then forward clean mail to your Mailcow server.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## MXroute Configuration
|
||||||
|
|
||||||
|
### 1. Add Domain to MXroute
|
||||||
|
|
||||||
|
1. Log into MXroute DirectAdmin panel
|
||||||
|
2. Navigate to **Email Accounts** → **Email Domains**
|
||||||
|
3. Add your domain (e.g., `yourdomain.com`)
|
||||||
|
|
||||||
|
### 2. Create Forwarder Accounts
|
||||||
|
|
||||||
|
For each mailbox you want to receive mail:
|
||||||
|
|
||||||
|
1. Navigate to **Email Accounts** → **Forwarders**
|
||||||
|
2. Create forwarder:
|
||||||
|
- **Email Address:** user@yourdomain.com
|
||||||
|
- **Forward To:** user@mail.yourdomain.com (your Mailcow server)
|
||||||
|
3. Enable **Discard if no forwarders exist** (optional, prevents bounces)
|
||||||
|
|
||||||
|
**Alternative: Catch-all Forwarder**
|
||||||
|
- Create a catch-all forwarder: `*@yourdomain.com` → `@mail.yourdomain.com`
|
||||||
|
- This forwards all mail to Mailcow regardless of recipient
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 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
|
||||||
|
|
||||||
|
1. Generate DKIM key in MXroute DirectAdmin:
|
||||||
|
- Navigate to **Email Authentication** → **DKIM Keys**
|
||||||
|
- Generate key for your domain
|
||||||
|
- Copy the DNS record
|
||||||
|
|
||||||
|
2. 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. Allow MXroute IP Addresses
|
||||||
|
|
||||||
|
Add MXroute server IPs to Mailcow's trusted networks:
|
||||||
|
|
||||||
|
1. SSH into your Mailcow server
|
||||||
|
2. Edit `mailcow.conf`:
|
||||||
|
```bash
|
||||||
|
nano /opt/mailcow-dockerized/mailcow.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Add MXroute IPs to `SKIP_CLAMD` or trusted networks
|
||||||
|
4. Restart Mailcow:
|
||||||
|
```bash
|
||||||
|
docker-compose down
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Configure Mailboxes
|
||||||
|
|
||||||
|
Create mailboxes in Mailcow for each user:
|
||||||
|
|
||||||
|
1. Navigate to Mailcow admin → **Mailboxes**
|
||||||
|
2. Create mailbox: `user@yourdomain.com`
|
||||||
|
3. Set password and quota
|
||||||
|
|
||||||
|
### 3. Disable Greylisting (Optional)
|
||||||
|
|
||||||
|
If you experience delays:
|
||||||
|
|
||||||
|
1. Navigate to **Configuration** → **Configuration & Details**
|
||||||
|
2. Find your domain
|
||||||
|
3. Disable greylisting for MXroute IPs
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
|
||||||
|
### 1. Test Mail Flow
|
||||||
|
|
||||||
|
Send test email from external provider (Gmail, Outlook):
|
||||||
|
```
|
||||||
|
From: test@gmail.com
|
||||||
|
To: user@yourdomain.com
|
||||||
|
```
|
||||||
|
|
||||||
|
**Expected Flow:**
|
||||||
|
1. Mail arrives at MXroute
|
||||||
|
2. MXroute forwards to Mailcow
|
||||||
|
3. Mail appears in Mailcow inbox
|
||||||
|
|
||||||
|
### 2. Check Headers
|
||||||
|
|
||||||
|
Review email headers in Mailcow to verify:
|
||||||
|
- `Received:` headers show MXroute server
|
||||||
|
- SPF, DKIM, DMARC all pass
|
||||||
|
- No spam flags
|
||||||
|
|
||||||
|
### 3. Monitor Logs
|
||||||
|
|
||||||
|
**MXroute Logs:**
|
||||||
|
- Check DirectAdmin → Email Logs
|
||||||
|
- Verify forwarding is occurring
|
||||||
|
|
||||||
|
**Mailcow Logs:**
|
||||||
|
```bash
|
||||||
|
docker-compose logs -f postfix-mailcow
|
||||||
|
```
|
||||||
|
|
||||||
|
Look for incoming connections from MXroute IPs.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Example Configuration: gnarlypandaproductions.com
|
||||||
|
|
||||||
|
### MXroute Forwarders
|
||||||
|
| MXroute Address | Forwards To |
|
||||||
|
|-----------------|-------------|
|
||||||
|
| admin@gnarlypandaproductions.com | admin@mail.gnarlypandaproductions.com |
|
||||||
|
| contact@gnarlypandaproductions.com | contact@mail.gnarlypandaproductions.com |
|
||||||
|
| *@gnarlypandaproductions.com | @mail.gnarlypandaproductions.com |
|
||||||
|
|
||||||
|
### DNS Records
|
||||||
|
| Record Type | Name | Value |
|
||||||
|
|-------------|------|-------|
|
||||||
|
| MX | @ | 10 arrow.mxroute.com |
|
||||||
|
| MX | @ | 20 eagle.mxroute.com |
|
||||||
|
| A | mail | 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] |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Mail Not Being Forwarded
|
||||||
|
|
||||||
|
1. **Check MXroute forwarder configuration**
|
||||||
|
- Verify forwarder exists in DirectAdmin
|
||||||
|
- Check destination address is correct
|
||||||
|
- Review MXroute email logs
|
||||||
|
|
||||||
|
2. **Verify DNS propagation**
|
||||||
|
```bash
|
||||||
|
dig MX yourdomain.com
|
||||||
|
dig TXT yourdomain.com
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Check Mailcow firewall**
|
||||||
|
- Ensure port 25 is open
|
||||||
|
- Verify MXroute IPs aren't blocked
|
||||||
|
|
||||||
|
### SPF/DKIM Failures
|
||||||
|
|
||||||
|
1. **SPF not passing**
|
||||||
|
- Verify `include:mxroute.com` in SPF record
|
||||||
|
- Check for typos in SPF syntax
|
||||||
|
- Use SPF checker: https://mxtoolbox.com/spf.aspx
|
||||||
|
|
||||||
|
2. **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
|
||||||
|
|
||||||
|
1. **Greylisting delays**
|
||||||
|
- Disable greylisting in Mailcow for MXroute IPs
|
||||||
|
- Or wait 5-15 minutes for retry
|
||||||
|
|
||||||
|
2. **Mailbox full**
|
||||||
|
- Check quota in Mailcow
|
||||||
|
- Increase quota or clean mailbox
|
||||||
|
|
||||||
|
3. **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
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- [MXroute Documentation](https://mxroutedocs.com/)
|
||||||
|
- [Mailcow Documentation](https://docs.mailcow.email/)
|
||||||
|
- [Email Forwarding Best Practices](https://www.rfc-editor.org/rfc/rfc5321)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue