Redirecting postfix email to a different email account

Problem

You have setup your Rails app to send out emails using postfix, but you also want to redirect the incoming emais to a different account.

Solution

Edit the postfix configuration file vi /etc/postfix/main.cf and add the following two lines at the bottom:

And then add the redirections to the virtual file with vi /etc/postfix/virtual:

Then run the following two commands to restart postfix:

* Based on the post here