Postfix: Forward all outgoing emails to one email address on Centos / Redhat

Assuming the system is Centos / Redhat system.

Steps:

Step 1: 

Create virtual file lets say “all_email_forwarder”  for email forwarding inside /etc/postfix/

vi /etc/postfix/all_email_forwarder

To forward all outgoing emais, lets say ” myemail@domain.com”, please do the following:

/.+@.+/  myemail@domain.com

Step 2:

Edit /etc/postfix/main.cf file and add /edit virtual_maps variable with the following:

virtual_maps = regexp:/etc/postfix/all_email_forwarder

Step 3:

restart postfix service:

service postfix restart
Advertisements