4

is it ever possible to have multiple recipients in /etc/postfix/recipient_bcc_maps ?

/etc/postfix/recipient_bcc_maps :

source@domain.tld recipient1@domain.tld

Can I do something like:

**source@domain.tld rcpt1@domain.tld,rcpt2.domain.tld,rcpt3@domain.tld**

Googling with no success whatsoever

kmote
  • 16,095
  • 11
  • 68
  • 91
SelfVDS
  • 43
  • 1
  • 1
  • 4

1 Answers1

7

You cant specify multiple recipients in the right hand side of the recipient_bcc_maps. So

source@domain.tld    rcpt1@domain.tld,rcpt2.domain.tld,rcpt3@domain.tld

is not possible. But The BCC address is subject to virtual alias expansion (and aliases(5) expansion for any resulting local recipients). So

#/etc/postfix/main.cf
#...
virtual_alias_maps = hash:/etc/postfix/vmaps
#...

#/etc/postfix/recipient_bcc_maps
source@domain.tld    rcpt@domain.tld


#/etc/postfix/vmaps
rcpt@domain.tld    rcpt1@domain.tld,rcpt2.domain.tld,rcpt3@domain.tld

should help you to achieve it.

Ref: Postfix Mailinglist

clement
  • 3,289
  • 2
  • 17
  • 11
  • Thank you Clement! How did I miss this! – SelfVDS Mar 21 '14 at 17:09
  • 1
    i dont understand this feature, why do i need to create/add second address just to copy emails to other addresses... hm – ADM Sep 12 '15 at 12:48
  • 1
    Unfortunately this is an incomplete solution, because virtualmaps and recipient_bcc_maps are NOT the same. The recipient_bcc_maps forwards the email leaving a copy in the original inbox (basically bcc-ing), while the virtual_maps does NOT. As such this is NOT a general solution to the problem of having multiple recipient_bcc_maps, only covers a specific scenario. To achieve that, you need to create a "dummy" alias in the virtual_maps, for which you don't care that no copy of the email is left. – Zoltan Fedor Mar 30 '16 at 21:29
  • 1
    Zoltan, you can put the original address in the result column of the virtual alias maps too. This will achieve what you want. – Xmister Jul 27 '16 at 07:40