Sorry, I was wrong about case # 2. I just ran tests and they showed that the 
second case shows up regardless of the no_address_mappings option! Why it 
didn’t appear before is not clear. Moreover, I noticed that this problem 
spontaneously appears and disappears. Yesterday, for example, letters to our 
remaining manager arrived in one copy, as it should be, although both managers 
who quit were indicated as recipients. Very strange. Perhaps it depends on the 
settings on the side of our provider, which changes them. This version is also 
confirmed by the fact that if the sender is our employee, the letter is never 
duplicated.
I also checked your version: I disabled the filter and made sure that this does 
not solve problem # 2. (By the way, this filter adds a disclaimer to the emails 
we send, which is convenient when sending emails from different devices.)
So I left the filter and no_address_mappings option enabled.
Thank you for your feedback!

--- Исходное сообщение ---
От кого: "Matus UHLAR - fantomas" <uh...@fantomas.sk>
Дата: 14 июня 2021, 18:03:37

On 14.06.21 15:51, yuryb wrote:
>Please help me solve the problem with duplicate letters when sending mail. 
> The problem manifests itself in one of two cases, and the solutions are
> mutually exclusive:

[...]

>In both cases, each email addressed to emar...@domain.com comes twice.  The
> problem is solved by adding the option "-o receive_override_options =
> no_address_mappings" to master.cf, but then the problem arises in the case
> #2:

[...]

>In both cases, there is the following problem: if the sender indicated both
> recipients in the letter (retir...@domain.com and retir...@domain.com),
> then the manager will receive the letter in duplicate.  Removing the "-o
> receive_override_options = no_address_mappings" option from master.cf
> solves the problem, but then the problem arises in case # 1.

>Is there a way to solve both problems?

Apparently your content_filter "dfilt" causes the duplicate.
what does it do?


>Here is the content of my "master.cf" file:
>
>smtp      inet  n       -       n       -       -       smtpd
>  -o content_filter=dfilt:
>  -o receive_override_options=no_address_mappings
>26      inet  n       -       n       -       -       smtpd
>  -o content_filter=dfilt:
>  -o receive_override_options=no_address_mappings
>smtps     inet  n       -       n       -       -       smtpd
>  -o content_filter=dfilt:
>  -o receive_override_options=no_address_mappings
>  -o smtpd_tls_wrappermode=yes
>  -o smtpd_sasl_auth_enable=yes
>  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
>587     inet  n       -       n       -       -       smtpd
>  -o content_filter=dfilt:
>  -o receive_override_options=no_address_mappings
>  -o smtpd_tls_wrappermode=yes
>  -o smtpd_sasl_auth_enable=yes
>  -o smtpd_client_restrictions=permit_sasl_authenticated,reject


>dfilt     unix    -       n       n       -       -       pipe
>  flags=Rq user=filter argv=/usr/local/etc/postfix/disclaimer -f ${sender} -- 
>${recipient}

-- 
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
   One OS to rule them all, One OS to find them,
One OS to bring them all and into darkness bind them

Reply via email to