Hello colleagues! 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: We have a mailbox emar...@domain.com, to which some external analytics application has access. This mailbox is published on our website. Letters coming to this mailbox should be sent to some of our managers. To do this, I use one of two solutions: a) using the virtual_alias_maps mechanism, I add a line like this to the "virtual" file: emar...@domain.com emar...@domain.com,manag...@domain.com,manag...@domain.com,manag...@domain.com b) using the virtual_alias_maps and recipient_bcc_maps mechanisms, I add a line like this to the "recipient_bcc" file: emar...@domain.com emarket-manag...@domain.com and add a line like this to the "virtual" file: emarket-manag...@domain.com manag...@domain.com,manag...@domain.com,manag...@domain.com 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:
We have two mailboxes that belong to retired employees. Their letters need to be forwarded to the remaining employee. To do this, I use one of two solutions: a) using the virtual_alias_maps mechanism, I add the following lines to the "virtual" file: retir...@domain.com remaining-mana...@domain.com retir...@domain.com remaining-mana...@domain.com b) using the recipient_bcc_maps mechanism, I add the same lines to the "recipient_bcc" file: retir...@domain.com remaining-mana...@domain.com retir...@domain.com remaining-mana...@domain.com 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? My Postfix version is 3.4.9, it works in conjunction with dovecot. Postfix does not receive mail directly: letters first go to our mail provider, and then Fetchmail takes them from there and sends them to employees. 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 pickup unix n - n 60 1 pickup cleanup unix n - n - 0 cleanup qmgr unix n - n 300 1 qmgr tlsmgr unix - - n 1000? 1 tlsmgr rewrite unix - - n - - trivial-rewrite bounce unix - - n - 0 bounce defer unix - - n - 0 bounce trace unix - - n - 0 bounce verify unix - - n - 1 verify flush unix n - n 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - n - - smtp relay unix - - n - - smtp showq unix n - n - - showq error unix - - n - - error retry unix - - n - - error discard unix - - n - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - n - - lmtp anvil unix - - n - 1 anvil scache unix - - n - 1 scache dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/dovecot-lda -f ${sender} -a ${original_recipient} -d ${user}@${nexthop} dfilt unix - n n - - pipe flags=Rq user=filter argv=/usr/local/etc/postfix/disclaimer -f ${sender} -- ${recipient} postlog unix-dgram n - n - 1 postlogd