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

2
Leave a Reply

avatar
2 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
minecraftAlison Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Alison
Guest

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

minecraft
Guest

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