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: 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

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

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 - >

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

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 to add message-id to In-Reply-to header in bounce template

2021-03-04 Thread Wietse Venema
Manu: > > All DSNs are produced by the same message generating code, they > > just use different templates. So it would really be a WTF if some > > aded reply-to and some not. > > > NDRs do sound misleading, but yes, doing this for all DSNs makes sense :) Point taken. I'll update the docs. I

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. > >

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

Re: How to add message-id to In-Reply-to header in bounce template

2021-03-04 Thread Manu Zurmühl
> Manu: >> I am tasked to configure a customized bounce message. It is clear how to >> reference variables that correspond to postfix settings, like $myhostname. >> >> I have not found a way how to add the message-id of the original >> message. It should be added to the In-Reply-To: header. > >

Re: restricting MAIL FROM:

2021-03-04 Thread @lbutlr
On 04 Mar 2021, at 04:01, Matus UHLAR - fantomas wrote: >> csmtpd_helo_restrictions = reject_invalid_helo_hostname >> check_helo_access pcre:/etc/postfix/helo_checks.pcre permit >> >> helo_checks.pcre: >> /^\$/ REJECT No Funny addresses > > you mistook helo string with sender address. Yes,

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

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

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,

Re: How to add message-id to In-Reply-to header in bounce template

2021-03-04 Thread Wietse Venema
Manu: > I am tasked to configure a customized bounce message. It is clear how to > reference variables that correspond to postfix settings, like $myhostname. > > I have not found a way how to add the message-id of the original > message. It should be added to the In-Reply-To: header. Wietse: >

Re: How to add message-id to In-Reply-to header in bounce template

2021-03-04 Thread Manu Zurmühl
>> Hi all, >> >> I am tasked to configure a customized bounce message. It is clear how to >> reference variables that correspond to postfix settings, like $myhostname. >> >> I have not found a way how to add the message-id of the original >> message. It should be added to the In-Reply-To: header.

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

Re: smtpd_client_recipient_rate_limit - how about a SASL authenticated user?

2021-03-04 Thread Wietse Venema
Marek Kozlowski: > :-) > > smtpd_client_recipient_rate_limit : > "The maximal number of recipient addresses that any client is allowed to > send to this service per time unit, regardless of whether or not Postfix > actually accepts those recipients." > > I'm afraid I know several anvil related

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

Re: How to add message-id to In-Reply-to header in bounce template

2021-03-04 Thread Wietse Venema
Manu Zurm?hl: > Hi all, > > I am tasked to configure a customized bounce message. It is clear how to > reference variables that correspond to postfix settings, like $myhostname. > > I have not found a way how to add the message-id of the original > message. It should be added to the In-Reply-To:

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

How to add message-id to In-Reply-to header in bounce template

2021-03-04 Thread Manu Zurmühl
Hi all, I am tasked to configure a customized bounce message. It is clear how to reference variables that correspond to postfix settings, like $myhostname. I have not found a way how to add the message-id of the original message. It should be added to the In-Reply-To: header. failure_template

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

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

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

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

Re: restricting MAIL FROM:

2021-03-04 Thread Matus UHLAR - fantomas
On 03 Mar 2021, at 09:33, Paul Netpresto wrote: What is the best way to block MAIL FROM: addresses where the username component begins with a '$' character. Is this recommended or bad practice?. On 03.03.21 12:45, @lbutlr wrote: Why would you want to do that? The local part of the email

smtpd_client_recipient_rate_limit - how about a SASL authenticated user?

2021-03-04 Thread Marek Kozlowski
:-) smtpd_client_recipient_rate_limit : "The maximal number of recipient addresses that any client is allowed to send to this service per time unit, regardless of whether or not Postfix actually accepts those recipients." I'm afraid I know several anvil related limits for *clients* rather