Postfix Forward Email To Another Email Account

To forward emails received by a Postfix mail server to another email account, follow these steps:

  1. Edit the Postfix configuration file /etc/postfix/main.cf:
    # vi /etc/postfix/main.cf
  2. 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
  3. 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, and anotheruser@example.com with the email address to which you want to forward the emails.

  4. Create the hash table from the virtual file by running the following command:
    # postmap /etc/postfix/virtual
  5. 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)

Leave a Comment