On Fri, Mar 5, 2021 at 4:26 AM Viktor Dukhovni
<postfix-us...@dukhovni.org> 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 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 not set to "no".
>
>    2. A message with multiple recipients is delivered via multiple
>       transport:nexthop combinations, the separate messages then
>       get augmented with (or rewritten to) a common recipient.
>
> A third less common way is via local(8) aliases, because local
> delivery splits the envelope to one recipient at a time before
> alias(5) expansion.
>
> I don't recommend use of local aliases for anything other than
> ":include:" or "|command" support.  Do all ordinary address -> address
> rewriting via virtual aliases instead.
>
> Either or both may be happening in your case, and your job is to
> find out which.
>
> The first is easy, make sure "enable_original_recipient = no".
>
> The second can happen if your "content_filter" does not specify an
> explicit fixed nexthop.  Normally, that would be something like:
>
>     scan:[127.0.0.1]:10024
>
> but if for some reason your content filter is just a transport name,
> then implicitly the "nexthop" is the recipient domain, and recipients in
> different domains are delivered separately (creating multiple copies of
> the message into the filter).
>
> So long as the envelope is not split, and within a single envelope
> address duplication is suppressed, delivery will not be duplicated by
> Postfix if not already duplicated before it got to Postfix.
>
> If you internalise the above logic, you won't need to guess, you
> can just find where the envelope splits, prior to BCC rewrites.
>
> It is also best to avoid adding the BCC address more than once, so
> ideally enable address rewriting either only before or only after the
> content filter.  Look for "receive_override_options" in FILTER_README.
>
> --
>     Viktor.

What I'm going to to do is start with a minimal postfix install and
rebuild from scratch and do some testing. Best way to learn this, I
think. Thanks for your help.

Reply via email to