• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 564
  • Last Modified:

postfix - save and forward ?

Hi,
  with qmail I used following function :
email arrived to my mailbox, stayed there, and its copy was forwarded to some other location (cell phone via providers gate).
 
  Currently, I'm running postfix with mysql, I'm newbie in this, so I'd like to know, how to set up, that email
wchich arrives to

user@domain.com

mailbox, stays there, and also gets forwarded to

otheruser@otherdomain.com

  will post CNF files if needed :)
  Thx
0
Letus
Asked:
Letus
1 Solution
 
it_alchemistCommented:
I would setup an alias. This way is quite an elegant way of doing these things because it's a simple change, it's easy to see what happens, and in the future its easy to change again if needed.

Simply add a line like the following to your aliases file to do what you need:

aliasuser@domain.com:    user@domain.com, otheruser@otherdomain.com

This will require you to use the aliasuser for reply-to: field. Any mail coming to user@domain.com would not get copied, unless you created another mailbox  (by copying user@domain.com to the new mailbox so that you can keep all your old mail) and then set the user@domain.com account to be an alias for your new mailbox plus otheruser@otherdomain.com

If neither of those solutions work for you, you can use the recipient_bcc_maps parameter. Use it like the following:

In main.cf add this line:

recipient_bcc_maps = hash:/etc/postfix/recipient_bcc

Then create a file called /etc/postfix/recipient_bcc with the following in it:

# BCC FOR CERTAIN USERS
user@domain.com otheruser@otherdomain.com

then save the file and do

postmap hash:/etc/postfix/recipient_bcc

and

postfix check
postfix reload

Hope that's all clear.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now