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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s