Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-05 Thread Viktor Dukhovni
On Fri, Mar 05, 2021 at 04:25:38AM -0500, Viktor Dukhovni wrote: > There are only two common ways a message without duplicated recipients > gets delivered to the same mailbox twice: > >1. Address rewriting (including BCC maps) duplicates a recipient, > and "enable_original_recipient" is

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-05 Thread Wietse Venema
Tom Hendrikx: > Isn't this as simple as: > > 1. new email comes in, is delivered to content filter, with bcc to > always_bcc recipient. That is what is supposed to happen. But see my description of what happens with a broken configuration. > 2. content filter re-injects email into the queue f

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-05 Thread Steve Dondley
On Fri, Mar 5, 2021 at 4:26 AM Viktor Dukhovni wrote: > > On Fri, Mar 05, 2021 at 03:41:06AM -0500, Steve Dondley wrote: > > > Here are postfix config file: https://pastebin.com/bZxjHF5y > > I don't usually go chasing pastebin URLs... > > > Hopefully something jumps out at you. > > There are only

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-05 Thread Steve Dondley
> 1. new email comes in, is delivered to content filter, with bcc to > always_bcc recipient. > 2. content filter re-injects email into the queue for final delivery, > postfix performs final delivery, with bcc to the always_bcc recipient? > > Since these are 2 separate deliveries (with different rou

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-05 Thread Viktor Dukhovni
On Fri, Mar 05, 2021 at 03:41:06AM -0500, Steve Dondley wrote: > Here are postfix config file: https://pastebin.com/bZxjHF5y I don't usually go chasing pastebin URLs... > Hopefully something jumps out at you. There are only two common ways a message without duplicated recipients gets delivered

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-05 Thread Tom Hendrikx
On 05-03-2021 09:41, Steve Dondley wrote: You may also have disabled recipient duplication. We will never knwo unles yo reveal yur configration as described in http://www.postfix.org/DEBUG_README.html#mail. I've been looking at this a lng time tonight. Despite my best efforts, I did not

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-05 Thread Steve Dondley
> You may also have disabled recipient duplication. We will > never knwo unles yo reveal yur configration as described > in http://www.postfix.org/DEBUG_README.html#mail. I've been looking at this a lng time tonight. Despite my best efforts, I did not find a reason for the duplicate email. I

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Wietse Venema
Steve Dondley: > > If 'always_bcc' produces three copies (with spamassassin turned on) > > for one email message with three recipients, then Postfix is > > It's actually generating 3 emails even if sending to only one recipient. Consider that Postfix deduplicates recipients. If you add a fixed re

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
> If 'always_bcc' produces three copies (with spamassassin turned on) > for one email message with three recipients, then Postfix is It's actually generating 3 emails even if sending to only one recipient. > mis-configured, for example, to deliver three one-recipient messages > to the content fil

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Wietse Venema
Steve Dondley: > OK, I don't feel quite so foolish. The guide here is what I apparently > followed when I initially set up spamassassin: > > https://wiki.debian.org/DebianSpamAssassin > > So I now know how to fix the duplicates by removing the "-o > content_filter=spamassassin" > > However, if I

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
> do a lot of your own homework (because everyone here is busy). If this > doesn't appeal, consider using a recipe for a postfix-based mail server > such as https://mailinabox.email/ or https://www.iredmail.org/. You lose > the flexibility of a bespoke setup but you get back some of your life - > I

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
OK, I don't feel quite so foolish. The guide here is what I apparently followed when I initially set up spamassassin: https://wiki.debian.org/DebianSpamAssassin So I now know how to fix the duplicates by removing the "-o content_filter=spamassassin" However, if I want to leave that in (which I a

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
I think I found the root cause of the problem (other than me being a clueless idiot). I had this in my master.cf: smtp inet n - y - -smtpd -o content_filter=spamassassin submission inet n - y - -smtpe -o content_filter=spamassassin

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Wietse Venema
Does the Postfix configuration send three copies to the filter, one for each recipient? Don't do that, it is wasteful. Wietse

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Viktor Dukhovni
On Thu, Mar 04, 2021 at 01:24:59PM -0500, Steve Dondley wrote: > After staring at these logs some more and piecing together the advice > here, here's my understanding of what's happening: > > * Mail comes in via smtpd as user sends mail. It's going to 3 > recipients. I'm not sure who those might

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
After staring at these logs some more and piecing together the advice here, here's my understanding of what's happening: * Mail comes in via smtpd as user sends mail. It's going to 3 recipients. I'm not sure who those might be. Maybe the catchall account and the two users the email is going to? *

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
Here's an anonymized pastebin example of my actual log entries of an outgoing email that generated 3 copies: https://pastebin.com/cw2XB5jp to the "catchall" mailbox. > It is worthwhile to know if the duplicates are caused by adding > multiple 'always_bcc' addresses to the same queue file. > > Look

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
> - mail comes to postfix (smtp or local injection) > = address mappings (always_bcc) happen > - postfix sends mail to spamassassin > - spamassassin scans mail and sends to postfix > = address mappings (always_bcc) happen > > one of those should be avoided by no_address_mappings but choose wise

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Matus UHLAR - fantomas
you only use should no_address_mappings if your mail loops back, not generally - you usually want alias expantion, canonical mapping, and automatic BCC (at least if you configure any of those). On 04.03.21 08:10, Steve Dondley wrote: Sorry, I don't follow you. - mail comes to postfix (smtp or

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Wietse Venema
Steve Dondley: > > The info can be found in the maillog file, and the Received: headers > > of the messages as delivered. Welcome to the vortex. > > After a close inspection of the headers, I can see that all the email > received have headers injected by spamassassin and this revealing > line: >

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
> The info can be found in the maillog file, and the Received: headers > of the messages as delivered. Welcome to the vortex. After a close inspection of the headers, I can see that all the email received have headers injected by spamassassin and this revealing line: "Received: by email.example.c

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Wietse Venema
Steve Dondley: > > you only use should no_address_mappings if your mail loops back, not > > generally - you usually want alias expantion, canonical mapping, and > > automatic BCC (at least if you configure any of those). > > Sorry, I don't follow you. > > I'm on debian. As far as I can gather, al

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
> you only use should no_address_mappings if your mail loops back, not > generally - you usually want alias expantion, canonical mapping, and > automatic BCC (at least if you configure any of those). Sorry, I don't follow you. I'm on debian. As far as I can gather, all mail related activity is lo

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
On Thu, Mar 4, 2021 at 7:48 AM Dominic Raferd wrote: > > On 04/03/2021 11:42, Steve Dondley wrote: > >> On 03.03.21 18:23, Steve Dondley wrote: > >>> I have enabled the always_bcc setting with: > >>> > >>> always_bcc = exam...@example.org > >>> > >>> It works, but I'm getting everything three time

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Dominic Raferd
On 04/03/2021 11:42, Steve Dondley wrote: On 03.03.21 18:23, Steve Dondley wrote: I have enabled the always_bcc setting with: always_bcc = exam...@example.org It works, but I'm getting everything three times. How do I prevent duplicates? this can happen if you use content_filter that feeds ma

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Matus UHLAR - fantomas
>-o content_filter=spamassassin the question is, how does spamassassin push mail back to postfix. On 04.03.21 07:06, Steve Dondley wrote: I have no earthly idea. Not sure how SA works, exactly. It's not how SA works, it's how it's configured in master.cf. And it makes me wonder if I'm brea

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
> > > > >-o content_filter=spamassassin > > the question is, how does spamassassin push mail back to postfix. I have no earthly idea. Not sure how SA works, exactly. And it makes me wonder if I'm breaking spam assassin by adding -o receive_override_options=no_address_mappings to my configuratio

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Matus UHLAR - fantomas
On 03.03.21 18:23, Steve Dondley wrote: >I have enabled the always_bcc setting with: > >always_bcc = exam...@example.org > >It works, but I'm getting everything three times. How do I prevent duplicates? this can happen if you use content_filter that feeds mail back to postfix. On 04.03.21 06:

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Steve Dondley
> On 03.03.21 18:23, Steve Dondley wrote: > >I have enabled the always_bcc setting with: > > > >always_bcc = exam...@example.org > > > >It works, but I'm getting everything three times. How do I prevent > >duplicates? > > this can happen if you use content_filter that feeds mail back to postfix.

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-04 Thread Matus UHLAR - fantomas
On 03.03.21 18:23, Steve Dondley wrote: I have enabled the always_bcc setting with: always_bcc = exam...@example.org It works, but I'm getting everything three times. How do I prevent duplicates? this can happen if you use content_filter that feeds mail back to postfix. in these cases, you c

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-03 Thread Steve Dondley
Thanks for your help Wietse. I had actually started reading it a few minutes ago. It's a tough read for a new guy. I'm having to learn mostly with a lot of trial, error and experimentation. I gotta go track down that postfix book I downloaded a while ago. On Wed, Mar 3, 2021 at 6:53 PM Wietse Ve

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-03 Thread Wietse Venema
Steve Dondley: > OK, I found some guidance here: > http://www.postfix.org/ADDRESS_REWRITING_README.html > > Adding in "-o receive_override_options=no_address_mappings" to the > smtpd section worked. > > I really don't understand the master configuration file at all, > however. Is there a good bas

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-03 Thread Wietse Venema
Steve Dondley: > I have enabled the always_bcc setting with: > > always_bcc = exam...@example.org > > It works, but I'm getting everything three times. How do I prevent duplicates? Postfix by default deduplicates if one message has multiple identical recipients. However Postfix cannot deduplicat

Re: How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-03 Thread Steve Dondley
OK, I found some guidance here: http://www.postfix.org/ADDRESS_REWRITING_README.html Adding in "-o receive_override_options=no_address_mappings" to the smtpd section worked. I really don't understand the master configuration file at all, however. Is there a good basic tutorial that explains it?

How do I stop getting multiple copies of emails from "always_bcc" option?

2021-03-03 Thread Steve Dondley
I have enabled the always_bcc setting with: always_bcc = exam...@example.org It works, but I'm getting everything three times. How do I prevent duplicates?