How to redirect one users mail to another user with postfix

by Vivek Gite · 0 comments

Postfix is an open source mail transfer agent (MTA), for the routing and delivery of email.

It provides a method of redirect mail to another user for both local and remote users. You need to configure /etc/postfix/aliases (or use /etc/aliases) file. The aliases file (read as table) provides a system-wide mechanism to redirect mail for local recipients. The redirections are processed by the Postfix local delivery agent.

Normally, the aliases table is specified as a text file that serves as input to the postalias command. The result, an indexed file in dbm or db format, is used for fast lookup by the mail system. Execute the command newaliases in order to rebuild the indexed file after changing the Postfix alias database.

Open file /etc/postfix/aliases using vi text editor:
# vi /etc/postfix/aliases

Now add line as follows:
abuse: noc@isp.com, bob@isp.com, techgroup@isp.com, postmaster

Save and close file. The abuse name is the local address which be receiving the mail on the local machine. noc@isp.com is the email address on another domain to forward to (the value can be a username on the local machine or the email). This can be a single or multiple values separated by commas.

To redirect root email to tom user:
root: tom

Type newaliases command to build new database:
# newaliases

If you don't have admin access to mail server, use .forward file from your own home directory.

Featured Articles:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: