To forward emails received by a Postfix mail server to another email account, follow these steps:
- Edit the Postfix configuration file
/etc/postfix/main.cf
:vi /etc/postfix/main.cf
- Add the following line to the end of the file to specify the email address to which emails should be forwarded:
virtual_alias_maps = hash:/etc/postfix/virtual
- Create a new file
/etc/postfix/virtual
and add the email address to which emails should be forwarded and the email address to which the forwarded emails should be sent:user@domain.com anotheruser@example.com
Replace
user@domain.com
with the email address that you want to forward, andanotheruser@example.com
with the email address to which you want to forward the emails. - Create the hash table from the virtual file by running the following command:
postmap /etc/postfix/virtual
- Restart the Postfix service to apply the changes:
# systemctl restart postfix
That’s it! Emails received by the Postfix mail server for the specified email address will now be forwarded to the email address that you specified in the virtual file. (www.traveltalktours.com)