How to Forward Email To Another Email Account Postfix in Linux

Step 1: Modify /etc/postfix/main.cf File

# vi /etc/postfix/main.cf
virtual_alias_domains = tecdistro.com 
virtual_alias_maps = hash:/etc/postfix/virtual

Step 2: Configure /etc/postfix/virtual File

Forward email sent to user1@tecdistro.com to support@tecdistro.com. We can also implement a catch-all address i.e. email sent to user1@tecdistro.com should be forwarded to support@tecdistro.com

# vi /etc/postfix/virtual
user1@tecdistro.com   support@tecdistro.com
@tecdistro.com         support@tecdistro.com

Step 3: Execute postmap Command

Create the hashed file (.db) using postmap command.

# postmap /etc/postfix/virtual

Step 4: Reload postfix

Now reload the postfix service:

# service postfix reload
0 0 vote
Article Rating
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Alison
3 years ago

I am in fact delighted to read this web site posts which contains plenty of vazluable facts, thanks for providing these statistics.

minecraft
1 year ago

These are really wonderful ideas in concerning blogging.
You have touched some nice things here. Any way keep up wrinting.