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 ?
postfix forward mail to multiple recipients
Re: postfix forward mail to multiple recipients
Yes it possible.
Separate the emails with comas.
Edit the file /etc/postfix/vmail_aliases
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
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:
You should be able the forward to multiple in one line:
But I never got it to work
and do it on 2 lines.
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
Code: Select all
# forward the mail
:0
! bob@domain.com,alice@domain.com
and do it on 2 lines.
Code: Select all
:0c
! bob@domain.com
:0
! alice@domain.com