Page 1 of 1

postfix forward mail to multiple recipients

Posted: Tue Aug 14, 2018 8:09 pm
by mister_v
Hi,
Is it possible to setup postfix with a "general" email-address
that forwards the mails to multiple email-addresses ?
Like a group-email-address ?

Re: postfix forward mail to multiple recipients

Posted: Tue Aug 14, 2018 8:23 pm
by chris
Yes it possible.
Separate the emails with comas.

Edit the file /etc/postfix/vmail_aliases

Code: Select all

group@domain.com bob@domain.com,alice@domain.com

Re: postfix forward mail to multiple recipients

Posted: Wed Aug 28, 2019 7:10 pm
by chris
Be careful to which email-address you forward.
For example;
if you forward an email coming from gmail to gmail,
It will probably be flagged as spam. Because gmail knows that your server should not send email coming from gmail
(or any other known email-providers).

To prevent this you could do it all with procmail
and change the from: email address.

Below the .procmail-code:

Code: Select all

# change from header
:0fhw
| formail -i "From: fakefromaddress@yoursystem.com"

# forward the mail
:0
! forward@address.com
You should be able the forward to multiple in one line:

Code: Select all

# forward the mail
:0
! bob@domain.com,alice@domain.com
But I never got it to work
and do it on 2 lines.

Code: Select all

:0c
! bob@domain.com
:0
! alice@domain.com