Postfix email forwarding

From vpsget wiki
Jump to: navigation, search

Let's assume that we have a mail server and we want to redirect all emails sent to elsewhere, for example to

Open conf file of Postfix:

nano /etc/postfix/

Append/edit the following lines:

virtual_alias_domains = 
virtual_alias_maps = hash:/etc/postfix/virtual

Open aliases file:

nano /etc/postfix/virtual

Append the following line

We also can forward all mailboxes hosted at to

Save changes and restart Postfix:

postmap /etc/postfix/virtual
service postfix restart