Docs / Email Servers / Setting Up Email Forwarding and Aliases

Setting Up Email Forwarding and Aliases

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 28 views · 1 min read

With Postfix

Simple Aliases

Edit /etc/aliases:

# Redirect mail for specific users
info: admin@example.com
support: admin@example.com, backup@example.com
webmaster: admin
sudo newaliases  # Rebuild alias database
sudo systemctl reload postfix

Virtual Aliases

For domain-based forwarding, edit /etc/postfix/virtual:

# Forward any address at a domain
sales@example.com    john@gmail.com
billing@example.com  jane@gmail.com, accounting@company.com
@oldomain.com        admin@example.com
sudo postmap /etc/postfix/virtual

Add to /etc/postfix/main.cf:

virtual_alias_maps = hash:/etc/postfix/virtual

Catch-All Address

# In /etc/postfix/virtual
@example.com    catchall@example.com

Warning: catch-all addresses receive all spam sent to random addresses at your domain.

SRS (Sender Rewriting Scheme)

When forwarding, SPF checks may fail because the forwarding server is not authorized to send for the original sender. SRS rewrites the envelope sender to fix this:

sudo apt install -y postsrsd
# Automatically integrates with Postfix

Was this article helpful?