This tutorial will help you to set up a postfix server to forward the email to other email accounts.
Setup Mail Forwarding in Postfix
Forwarding emails to remote mailboxes via Postfix does not require local mailboxes. Any email received by the Postfix will be routed to remote mailboxes based on configuration. Below example configuration will help you to configure example.com as mail forwarding domain on Postfix. Edit Postfix main.cf in editor: Add your mail forwarding domain to virtual_alias_domains and a configuration file with routing rules with virtual_alias_maps. You can add multiple virtual_alias_domains with space-separated. Next create and edit /etc/postfix/virtual file in editor: Now add the Postfix email forwarding rules as per your requirements. Below is some example: Save and close the file. Next, create a hash file of the virtual and start postfix service.
Conclusion
In this tutorial, you have learned to configured Postfix to forward emails to other email accounts.