Email Forwarding
Email forwarding is one of mailiam’s three core features, allowing you to route emails with sophisticated custom rules and patterns.
Overview
Section titled “Overview”Transform your domain into a complete email infrastructure without managing mail servers. mailiam’s email forwarding supports:
- Catch-all forwarding (
*@domain.com) - Plus addressing (
user+tag@domain.com) - Custom routing rules with pattern matching
- Multi-destination forwarding
- Zero-downtime migration from existing email providers
Basic Configuration
Section titled “Basic Configuration”Simple Catch-All Setup
Section titled “Simple Catch-All Setup”Route all emails to your main inbox:
domains: mysite.com: forwarding: "*@mysite.com": "me@gmail.com"Specific Address Routing
Section titled “Specific Address Routing”Route specific addresses to different destinations:
domains: mysite.com: forwarding: "support@mysite.com": "support-team@company.com" "billing@mysite.com": "billing@company.com" "sales@mysite.com": "sales-team@company.com" "*@mysite.com": "me@gmail.com" # Catch remainingMulti-Destination Forwarding
Section titled “Multi-Destination Forwarding”Send emails to multiple recipients:
domains: mysite.com: forwarding: "alerts@mysite.com": - "admin@company.com" - "alerts@slack.com" - "monitoring@pagerduty.com"Advanced Routing Patterns
Section titled “Advanced Routing Patterns”Plus Addressing Support
Section titled “Plus Addressing Support”mailiam automatically supports plus addressing (also called sub-addressing):
domains: mysite.com: forwarding: "*@mysite.com": "me@gmail.com"This configuration automatically handles:
me+newsletter@mysite.com→me+newsletter@gmail.comme+shopping@mysite.com→me+shopping@gmail.comme+github@mysite.com→me+github@gmail.com
Department Routing
Section titled “Department Routing”Create department-based email routing:
domains: company.com: forwarding: # Sales team "sales@company.com": "sales-team@company.com" "demo@company.com": "sales-team@company.com" "partnership@company.com": "sales-team@company.com"
# Support team "support@company.com": "support-team@company.com" "help@company.com": "support-team@company.com" "bugs@company.com": "support-team@company.com"
# Executive team "ceo@company.com": "chief@company.com" "founder@company.com": "chief@company.com"
# Catch-all for employees "*@company.com": "general@company.com"Migration from Email Providers
Section titled “Migration from Email Providers”From Google Workspace
Section titled “From Google Workspace”- Set up forwarding rules in your mailiam config:
domains: mycompany.com: forwarding: "admin@mycompany.com": "admin@gmail.com" "team@mycompany.com": "team@gmail.com" "*@mycompany.com": "info@gmail.com"- Deploy the configuration:
mailiam push- Update MX records when ready:
- mailiam provides the MX records after deployment
- Update DNS gradually or all at once
- Zero-downtime migration possible
From Other Providers
Section titled “From Other Providers”mailiam works with any email provider as the destination:
domains: mysite.com: forwarding: # To Outlook/Office365 "team@mysite.com": "team@outlook.com"
# To ProtonMail "secure@mysite.com": "secure@protonmail.com"
# To custom domains "support@mysite.com": "help@internal.company.com"Routing Rules and Patterns
Section titled “Routing Rules and Patterns”Priority Order
Section titled “Priority Order”mailiam processes routing rules in order of specificity:
- Exact matches (
user@domain.com) - Wildcard matches (
*@domain.com)
domains: mysite.com: forwarding: "admin@mysite.com": "admin@gmail.com" # Processed first "support@mysite.com": "help@company.com" # Processed second "*@mysite.com": "catchall@gmail.com" # Processed lastPattern Matching
Section titled “Pattern Matching”Use wildcards for flexible routing:
domains: company.com: forwarding: # Department patterns "sales-*@company.com": "sales@company.com" "support-*@company.com": "support@company.com"
# Regional routing "eu-*@company.com": "europe@company.com" "us-*@company.com": "americas@company.com"CLI Commands
Section titled “CLI Commands”View Current Forwarding
Section titled “View Current Forwarding”# List all domains and their forwarding rulesmailiam domains list
# Show specific domain configurationmailiam domains show mysite.comAdd Forwarding Rules
Section titled “Add Forwarding Rules”# Add a single forwarding rulemailiam domains add-forwarding mysite.com "new@mysite.com" "destination@gmail.com"
# Add multiple destinationsmailiam domains add-forwarding mysite.com "alerts@mysite.com" "admin@gmail.com,ops@company.com"Test Forwarding
Section titled “Test Forwarding”# Test email routing (shows where email would be forwarded)mailiam domains test mysite.com test@mysite.com
# Test multiple addressesmailiam domains test mysite.com support@mysite.com sales@mysite.comSpam Protection
Section titled “Spam Protection”All forwarded emails include mailiam’s spam protection:
- SPF/DKIM validation on incoming emails
- Rate limiting per sending domain
- Blacklist filtering of known spam sources
- Content filtering for obvious spam patterns
Configure spam protection levels:
domains: mysite.com: forwarding: "*@mysite.com": "me@gmail.com" security: spamProtection: "strict" # strict, normal, or lenient rateLimit: 100 # emails per hour per sender blacklistEnabled: truePerformance & Reliability
Section titled “Performance & Reliability”- Sub-100ms processing times for email routing
- 99.9% uptime SLA for email forwarding
- Global redundancy across multiple regions
- Real-time monitoring and alerting
- Automatic failover for high availability
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Emails not forwarding:
- Check MX records point to mailiam
- Verify domain ownership in mailiam dashboard
- Check spam folders at destination
Forwarding rules not working:
- Check rule syntax in
mailiam.config.yaml - Run
mailiam config validateto check for errors - Verify deployment with
mailiam status
Performance issues:
# Check forwarding performancemailiam domains performance mysite.com
# View recent forwarding logsmailiam logs forwarding mysite.com --last 24hBest Practices
Section titled “Best Practices”- Use specific rules first: Place exact matches before wildcards
- Test thoroughly: Use
mailiam domains testbefore going live - Monitor forwarding: Set up alerts for failed forwards
- Document your setup: Keep routing rules documented for team
- Regular backups: Version control your
mailiam.config.yaml
Integration with Forms
Section titled “Integration with Forms”Email forwarding works seamlessly with mailiam’s forms and projects:
domains: mysite.com: forwarding: "*@mysite.com": "me@gmail.com" forms: contact: replies: true # Enables replies@mysite.com template: "professional" projects: marketing: replyTo: "marketing@mysite.com" # Uses forwardingThis creates a complete email ecosystem where form submissions, replies, and general email all work together seamlessly.