nixCraft Poll

Topics

How to redirect one users mail to another user with postfix

Posted by Vivek Gite [Last updated: September 26, 2006]

See all Postfix MTA related articles

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.

Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

You may also be interested in other helpful articles:

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

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

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.