32

I have the following postfix virtual file:

test@domain.com bob@me.com

This correctly forwards all emails to test@domain.com to bob@me.com

However I would like to forward these emails to bob2@me.com as well.

I tried this change and it does not seem to work:

test@domain.com bob@me.com
test@domain.com bob2@me.com

How do I tell postfix to forward all emails to multiple recipients?

Sam Saffron
  • 1,959
  • 3
  • 18
  • 27

2 Answers2

56

Put all your addresses on the same line separated by commas as explained in the Postfix manual for virtual.

test@domain.com bob@me.com,bob2@me.com

Should do the trick.

Daniel Rikowski
  • 748
  • 4
  • 10
  • 19
dunxd
  • 9,482
  • 21
  • 80
  • 117
  • 1
    is it possible to do this entire domains somehow? I tried `@xyz.com @xyz.net, @xyz.org`, but it didn't work – Mohamed Hafez Jul 18 '20 at 16:59
  • I have the same question @MohamedHafez , I can't find a way to send the catch all emails to 2 mailboxes. Did you find a solution? – luvzfootball Mar 14 '22 at 22:04
  • A separate line/directive for each domain should work: `@xyz.com bob@me.com,bob2@me.com`\n `xyz.org bob@me.com,bob2@me.com` should work - but comments don't allow new lines so replace the \n with a newline! – dunxd Apr 13 '22 at 17:29
1

You can make alias on multiply addresses and setup a bcc for that alias:

Find or edit bcc_map (or else name) file in /etc/postfix, compile this into a postfix hash file using:

postmap bcc_map

Add tp postfix main.cf config:

sender_bcc_maps = hash:/etc/postfix/bcc_map
shcherbak
  • 279
  • 1
  • 12