This looks like what I want:
http://www.mailinglistarchive.com/postfix-users@postfix.org/msg36244.html

However it doesnt seem to do anything.

I have:

submission inet n       -       n       -       -       smtpd
  -o cleanup_service_name=msa-cleanup

msa-cleanup   unix  n       -       -       -       0       cleanup
 -o sender_bcc_maps=mysql:/etc/postfix/mysql_bcc_send_maps.cf

If I change mysql_bcc_send_maps.cf to a file that doesn't exist, no errors are 
logged when sending.

Also changing to -o clean_service_name=nonexistant_service doesn't generate any 
errors, which makes me wonder if this option is still supported on my build.

From: mribb...@hotmail.com
To: jer...@adaptr.nl; postfix-users@postfix.org
Subject: RE: bcc send map issue  - duplication when mail sent from other host
Date: Mon, 19 Sep 2011 00:06:01 +0000








Hi Joroen,
I scratched my query out a bit quickly on a Friday afternoon - Thanks for your 
corrections, I am indeed looking at sender_bcc_maps and recipient_bcc_maps

I agree, POP is not a mail sending protocol.

I'm trying to make a distinction here between mail that is sent by a POP client 
via the postfix mail server, and mail that is generated by a separate server 
with both the from and to addresses matching the sender and recipient bcc map 
options.

Just to explain what I'm hoping to achieve:

All mail sent using POP clients is copied to crm_sys...@example.com 
(sender_bcc_map entry mail=@example.com, destination=crm_sys...@example.com)
All mail received is copied to crm_sys...@example.com (recipient_bcc_map entry 
mail=@example.com, destination=crm_sys...@example.com)

I can see why postfix is doing what it's doing - When our webshop sends an 
order copy email from sa...@example.com to sa...@example.com, that mail matches 
both the sender and recipient_bcc_maps

To me this seems like a legitimate attempt for using both for the same domain.

I have spent several hours reviewing the documentation and experimenting to no 
avail. The documentation is indeed quite clear, but I can't work out how to 
achieve what I require here.

If I just disable 'it' (either the sender_bcc_maps or the recipient_bcc_maps 
entry) then I won't have all sent and received mail copied to my 
crm_sys...@example.com address as required.

Date: Fri, 16 Sep 2011 23:30:01 +0200
From: jer...@adaptr.nl
To: postfix-users@postfix.org
Subject: Re: bcc send map issue  - duplication when mail sent from other host


  


    
  
  
    On 2011-09-16 04:08, Michael Ribbons wrote:
    
      
      
        Hi,

        I am using bcc_send_maps 
    
    

    No such option exists. You may be referring to sender_bcc_maps.

    

    
      so all mail sent by POP 
    
    

    Ugh. Re-check your basics - POP is not a mail SENDING protocol.

    

    
      is BCC to a particular address.

        

        So all mail from @example.com is BCCd to crm_sys...@example.com

        

        This works fine.

        

        However when we send mail from our webshop, the mail gets BCC'd
        as well, eg

        

        mail from webs...@example.com, mail to: sa...@example.com

        

        I think this is because the first address matches the send map
        spec of @example.com

        

        However I don't want this behaviour - We are also using
        bcc_recipient_maps so everything coming in to @example.com
        already gets copied to crm_sys...@example.com

      
    
    

    Again, the option is called recipient_bcc_maps.

    And why use both for the same domain ? That sounds suspicously like
    a broken configuration attempt.

    

    
      

        Is there any way to tell postfix not to use bcc_send_maps for
        mail sent by other sendmails?

      
    
    

    Exclude it. 

    Map formats and examples are documented clearly.

    

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

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

        http://www.postfix.org/ADDRESS_REWRITING_README.html#overview

    

    

    

    

    

    -- 
J.                                                                              
  

Reply via email to