Redirecting postfix email to a different email account


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.


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

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

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

Then run the following two commands to restart postfix:

postmap /etc/postfix/virtual
postfix reload

* Based on the post here