Email aliases let one mailbox receive mail for multiple addresses, and forwarding routes incoming mail to another address entirely — both common needs for a self-hosted mail server.
Aliases vs Forwarding: The Distinction
Alias — mail sent to [email protected] is delivered directly to an existing mailbox (e.g. [email protected]'s inbox), with no separate mailbox needed for the alias itself.
Forwarding — mail sent to an address is redirected to a completely different address, potentially on an entirely different mail server.
Setting Up Aliases with Postfix
sudo nano /etc/aliases
info: admin
support: admin
sales: admin,billing
Maps [email protected] and [email protected] to the admin mailbox; sales delivers to both admin and billing.
Applying Alias Changes
sudo newaliases
Setting Up Virtual Aliases (For Virtual Domains/Users)
sudo nano /etc/postfix/virtual
[email protected] [email protected]
[email protected] [email protected],[email protected]
sudo postmap /etc/postfix/virtual
Used specifically when running Postfix with virtual mailbox domains (common for hosting multiple domains on one mail server), rather than the simpler system-user-based /etc/aliases.
Referencing the Virtual Alias Map in main.cf
virtual_alias_maps = hash:/etc/postfix/virtual
sudo systemctl reload postfix
Setting Up External Forwarding
[email protected] [email protected]
Redirects mail to a completely external address — useful when someone no longer has an active mailbox on your server but you still want to redirect their mail.
Setting Up a Catch-All Address
See How to Set Up Catch-All Email Addresses for capturing mail sent to any address at your domain, not just explicitly defined ones.
Wildcard/Pattern-Based Aliases
@olddomain.com @newdomain.com
Forwards everything from one domain to the equivalent address on another, useful during a domain migration/rebrand transition period.
Verifying Aliases Work Correctly
echo "test message" | mail -s "Alias Test" [email protected]
Confirm the message correctly arrives at the intended destination mailbox.
Considerations for External Forwarding and Deliverability
Forwarded mail can sometimes affect the receiving server's spam evaluation of your domain, since it looks like your server is relaying mail that didn't originate there — ensure proper SPF/DKIM configuration (see How to Configure SPF, DKIM, and DMARC (Complete Guide)) is in place, and be aware that external forwarding at scale has its own deliverability considerations.
Common Errors
Alias defined but mail bounces — verify newaliases was run after editing /etc/aliases, or that postmap was run for virtual alias file changes; both require this step to actually take effect.
Continue Reading
- How to Set Up Catch-All Email Addresses
- How to Install and Configure Postfix as a Mail Transfer Agent
- How to Set Up Multiple Domains on One Mail Server
Browse more articles in Email Hosting & Deliverability.