Delivering copies of mail destined for multiple addresses to a specific single mailbox

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Delivering copies of mail destined for multiple addresses to a specific single mailbox

Emanuil Tolev
Hello to all postfix users!

I would like to know if there is any way to instruct postfix to do the
following:

1. When e-mail gets sent to [hidden email], [hidden email] and
[hidden email]
2. Send a copy of the incoming e-mail message to [hidden email]
(3. Both admin and the original user, to whom the message was destined,
get the e-mail.)

I am using a virtual users set-up with a SQL database. I tried using the
forwardings table, but it is apparently used to alias non-existent boxes
(e.g. [hidden email]) to other mailboxes (e.g. to [hidden email]). Thus
it doesn't make a copy of the mail, and user1, user2 and user3 received
the test mails successfully, but no copy got sent to admin...

I also read about the always_bcc option, but with it I don't seem to
have the ability to select just a few addresses to monitor.

Thanks in advance for any replies!

Greetings,
Emanuil Tolev

P.S. There are no privacy concerns here, because the mailboxes are used
only for occassional business correspondence, and all 3 employees know.
Reply | Threaded
Open this post in threaded view
|

Re: Delivering copies of mail destined for multiple addresses to a specific single mailbox

Wietse Venema
Emanuil Tolev:

> Hello to all postfix users!
>
> I would like to know if there is any way to instruct postfix to do the
> following:
>
> 1. When e-mail gets sent to [hidden email], [hidden email] and
> [hidden email]
> 2. Send a copy of the incoming e-mail message to [hidden email]
> (3. Both admin and the original user, to whom the message was destined,
> get the e-mail.)

Yes, this is possible with the Milter plugin protocol. I do not
provide Milter plugins.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: [SOLVED] Delivering copies of mail destined for multiple addresses to a specific single mailbox

Emanuil Tolev
Wietse Venema schrieb:

> Emanuil Tolev:
>  
>> Hello to all postfix users!
>>
>> I would like to know if there is any way to instruct postfix to do the
>> following:
>>
>> 1. When e-mail gets sent to [hidden email], [hidden email] and
>> [hidden email]
>> 2. Send a copy of the incoming e-mail message to [hidden email]
>> (3. Both admin and the original user, to whom the message was destined,
>> get the e-mail.)
>>    
>
> Yes, this is possible with the Milter plugin protocol. I do not
> provide Milter plugins.
>
> Wietse
>  
Thank You for Your timely and concrete answer!
Reply | Threaded
Open this post in threaded view
|

Re: [SOLVED] Delivering copies of mail destined for multiple addresses to a specific single mailbox

Wietse Venema
Emanuil Tolev:

> Wietse Venema schrieb:
> > Emanuil Tolev:
> >  
> >> Hello to all postfix users!
> >>
> >> I would like to know if there is any way to instruct postfix to do the
> >> following:
> >>
> >> 1. When e-mail gets sent to [hidden email], [hidden email] and
> >> [hidden email]
> >> 2. Send a copy of the incoming e-mail message to [hidden email]
> >> (3. Both admin and the original user, to whom the message was destined,
> >> get the e-mail.)
> >>    
> >
> > Yes, this is possible with the Milter plugin protocol. I do not
> > provide Milter plugins.
> >
> > Wietse
> >  
> Thank You for Your timely and concrete answer!

If you meant to write "send admin copy of mail for [hidden email]
OR [hidden email] OR [hidden email]" then you can use the
existing Postfix recipient_bcc_maps feature.

http://www.postfix.org/postconf.5.html#recipient_bcc_maps

If on the other hand you really meant to write "send admin copy of
mail for [hidden email] AND [hidden email] AND [hidden email]"
then you need the Milter plugin protocol.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Delivering copies of mail destined for multiple addresses to a specific single mailbox

mouss-2
In reply to this post by Emanuil Tolev
Emanuil Tolev wrote:
> Hello to all postfix users!
>
> I would like to know if there is any way to instruct postfix to do the
> following:
>
> 1. When e-mail gets sent to [hidden email], [hidden email] and
> [hidden email]

you'll need to explain what you mean by "and" here... I hope you mean "or".

> 2. Send a copy of the incoming e-mail message to [hidden email]
> (3. Both admin and the original user, to whom the message was
> destined, get the e-mail.)
>

if your goal is to cc admin if mail is sent to userK (OR, not AND), then
you can use virtual_alias_maps or recipient_bcc_maps.
> I am using a virtual users set-up with a SQL database. I tried using
> the forwardings table, but it is apparently used to alias non-existent
> boxes (e.g. [hidden email]) to other mailboxes (e.g. to
> [hidden email]). Thus it doesn't make a copy of the mail, and user1,
> user2 and user3 received the test mails successfully, but no copy got
> sent to admin...

then you have a bug in your lookup query.

>
> I also read about the always_bcc option, but with it I don't seem to
> have the ability to select just a few addresses to monitor.
>
> Thanks in advance for any replies!
>
> Greetings,
> Emanuil Tolev
>
> P.S. There are no privacy concerns here, because the mailboxes are
> used only for occassional business correspondence, and all 3 employees
> know.