Docs / Email Servers / Setting Up Email Forwarding and Aliases

Setting Up Email Forwarding and Aliases

By Admin · Feb 25, 2026 · Updated Sep 24, 2026 · 117 views · 1 min read

With Postfix

Simple Aliases

Edit /etc/aliases:

# Redirect mail for specific users
info: [email protected]
support: [email protected], [email protected]
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
[email protected]    [email protected]
[email protected]  [email protected], [email protected]
@oldomain.com        [email protected]
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    [email protected]

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?