always_bcc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

always_bcc

Jumping Mouse
Hello everyone, 


I have set up always_bcc = [hidden email]  for an email archiving account. 

How can bypass always_bcc for certain senders?   for example I do not want to always_bcc  any email that comes from



Thanks in advance for any help. 


Reply | Threaded
Open this post in threaded view
|

Re: always_bcc

Wietse Venema
Jumping Mouse:
> Hello everyone,
>
> I have set up always_bcc = [hidden email]  for an email
> archiving account.  How can bypass always_bcc for certain senders?

It's called *always*_bcc for a reason...

> for example I do not want to always_bcc  any email that comes from
> [hidden email]  and or  [hidden email]

If you don't want to bcc ALL senders, use sender_bcc_maps to make
exceptions, Postfix regular expression tables have VERY rudimentary
if/else/endif support.

/etc/postfix/main.cf:
    sender_bcc_maps = pcre:/etc/postfix/sender_bcc

/etc/postfix/sender_bcc:
    if !/^audit1@mydomain\.com$/
    if !/^audit2@mydomain\.com$/
    /./ [hidden email]
    endif
    endif

(I warned you that it is VERY rudimentary. There is no "DUNNO"
special result value that forces a lookup failure).

Note: do not put spaces at the beginning of the lines.

Pointers:
man pcre_table

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: always_bcc

Viktor Dukhovni
In reply to this post by Jumping Mouse
On Mon, Mar 18, 2013 at 02:42:23PM -0400, Jumping Mouse wrote:

> I have set up always_bcc = [hidden email]  for an email
> archiving account.
> How can bypass always_bcc for certain senders?
>
> For example I do not want to always_bcc  any email that comes from
> [hidden email]  and or  [hidden email]

Now all your users know that to avoid archiving they should just
send email from those addresses. (With NOTIFY=NEVER so as not to
be caught out by bounces if possible). :-)

More seriously, don't exempt senders, exempt messaging flows between
specific servers that carry traffic that is not subject to archiving.

--
        Viktor.
Reply | Threaded
Open this post in threaded view
|

RE: always_bcc

Jumping Mouse
In reply to this post by Wietse Venema
Thank you for the reply! 

> Jumping Mouse:
> > Hello everyone,
> >
> > I have set up always_bcc = [hidden email] for an email
> > archiving account. How can bypass always_bcc for certain senders?
>
> It's called *always*_bcc for a reason...

Yes that makes sense :-)

>
> > for example I do not want to always_bcc any email that comes from
> > [hidden email] and or [hidden email]
>
> If you don't want to bcc ALL senders, use sender_bcc_maps to make
> exceptions, Postfix regular expression tables have VERY rudimentary
> if/else/endif support.
>
> /etc/postfix/main.cf:
> sender_bcc_maps = pcre:/etc/postfix/sender_bcc
OK so do still keep the  always_bcc = [hidden email]  in  /etc/postfix/main.cf   right?  Does placement make a difference?



>
> /etc/postfix/sender_bcc:
> if !/^audit1@mydomain\.com$/
> if !/^audit2@mydomain\.com$/
> /./ [hidden email]
> endif
> endif
>
> (I warned you that it is VERY rudimentary. There is no "DUNNO"
> special result value that forces a lookup failure).
>
> Note: do not put spaces at the beginning of the lines.
>
> Pointers:
> man pcre_table
>
> Wietse
Reply | Threaded
Open this post in threaded view
|

RE: always_bcc

Jumping Mouse
In reply to this post by Viktor Dukhovni
Thanks Victor

> Date: Mon, 18 Mar 2013 19:43:06 +0000

> From: [hidden email]
> To: [hidden email]
> Subject: Re: always_bcc
>
> On Mon, Mar 18, 2013 at 02:42:23PM -0400, Jumping Mouse wrote:
>
> > I have set up always_bcc = [hidden email] for an email
> > archiving account.
> > How can bypass always_bcc for certain senders?
> >
> > For example I do not want to always_bcc any email that comes from
> > [hidden email] and or [hidden email]
>
> Now all your users know that to avoid archiving they should just
> send email from those addresses. (With NOTIFY=NEVER so as not to
> be caught out by bounces if possible). :-)
>
> More seriously, don't exempt senders, exempt messaging flows between
> specific servers that carry traffic that is not subject to archiving.
The traffic comes from the same server as the other emails come from,  so I think that will not work. 


>
> --
> Viktor.
Reply | Threaded
Open this post in threaded view
|

RE: always_bcc

Jumping Mouse
In reply to this post by Wietse Venema
Wietse, 

What do you mean by:   "(I warned you that it is VERY rudimentary. There is no "DUNNO"
special result value that forces a lookup failure)."  
What does this look like in a real world scenario?  What are the potential drawbacks? 
Reply | Threaded
Open this post in threaded view
|

Re: always_bcc

Wietse Venema
Jumping Mouse:
> Wietse,
> What do you mean by:   "(I warned you that it is VERY rudimentary.
> There is no "DUNNO"special result value that forces a lookup
> failure)."  What does this look like in a real world scenario?
> What are the potential drawbacks?

I described a solution with configuration file examples.  It does
what it does: exclude two sender addresses with a nested if/endif
construct.

In an ideal world, this solution would be nicer. You would specify
three rules: one rule for each excluded sender address, and one
wild-card rule for everyone else.  But the word is not ideal, and
therefore I will not decribe the nicer solution in detail.

        Wietse