1

Topic: duplicate emails with forwarding and "save a copy in mailbox"

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  v0.9.7
- Linux/BSD distribution name and version: debian stretch updated
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes, v2.8.0
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

from iRedAdmin-Pro i have enabled for a user (info@domain) the following:
Under Forwarding tab:
"Save a copy in mailbox"
Forward mails to address: nikos@test

Now each mail sent to info@domain is reveived twice by  "nikos@test" .

some headers from the duplicates mails:

original email:
Received: from mail.test ([127.0.0.1])
    by mail.test (mail.test [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id 252l9U_AYzXX for <info@domain>;

duplicate email:
Received: from mail.test  ([127.0.0.1])
    by mail.test  (mail.test  [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id 95zMBQCHuo4R for <nikos@test>;

Can i reveive only 1 mail?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: duplicate emails with forwarding and "save a copy in mailbox"

This is not expected, and i cannot reproduce it locally. Might be caused by some other setting.

Could you please try again and show us all RELATED Postfix log of your testing email?

3

Re: duplicate emails with forwarding and "save a copy in mailbox"

Here are the logs.

Dec 14 16:14:28 mail postfix/postscreen[13700]: CONNECT from [147.102.222.230]:64666 to [147.102.5.5]:25
Dec 14 16:14:28 mail postfix/postscreen[13700]: PASS OLD [147.102.222.230]:64666
Dec 14 16:14:28 mail postfix/smtpd[13703]: connect from ulysses.noc.ntua.gr[147.102.222.230]
Dec 14 16:14:28 mail postfix/smtpd[13703]: 9096A1CC0083: client=ulysses.noc.ntua.gr[147.102.222.230]
Dec 14 16:14:28 mail postfix/smtpd[13703]: disconnect from ulysses.noc.ntua.gr[147.102.222.230] helo=1 mail=1 rcpt=1 quit=1 commands=4
Dec 14 16:14:29 mail postfix/postscreen[13700]: CONNECT from [147.102.222.230]:64672 to [147.102.5.5]:25
Dec 14 16:14:29 mail postfix/postscreen[13700]: PASS OLD [147.102.222.230]:64672
Dec 14 16:14:29 mail postfix/smtpd[13703]: connect from ulysses.noc.ntua.gr[147.102.222.230]
Dec 14 16:14:29 mail postfix/smtpd[13703]: 638931CC0083: client=ulysses.noc.ntua.gr[147.102.222.230]
Dec 14 16:14:29 mail postfix/cleanup[13666]: 638931CC0083: message-id=<CACZyReS-RDswN9jARvA69E6kiLPq6w2z3yTso-YhH0MyaKuS-w@mail.gmail.com>
Dec 14 16:14:29 mail postfix/qmgr[946]: 638931CC0083: from=<iccs.isense.group@gmail.com>, size=3500, nrcpt=3 (queue active)
Dec 14 16:14:29 mail postfix/smtpd[13703]: disconnect from ulysses.noc.ntua.gr[147.102.222.230] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Dec 14 16:14:29 mail postfix/10025/smtpd[13673]: connect from localhost[127.0.0.1]
Dec 14 16:14:29 mail postfix/10025/smtpd[13673]: DD21A1CC0084: client=localhost[127.0.0.1]
Dec 14 16:14:29 mail postfix/cleanup[13666]: DD21A1CC0084: message-id=<CACZyReS-RDswN9jARvA69E6kiLPq6w2z3yTso-YhH0MyaKuS-w@mail.gmail.com>
Dec 14 16:14:29 mail postfix/10025/smtpd[13718]: connect from localhost[127.0.0.1]
Dec 14 16:14:29 mail postfix/10025/smtpd[13719]: connect from localhost[127.0.0.1]
Dec 14 16:14:29 mail postfix/10025/smtpd[13673]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Dec 14 16:14:29 mail postfix/qmgr[946]: DD21A1CC0084: from=<iccs.isense.group@gmail.com>, size=3783, nrcpt=1 (queue active)
Dec 14 16:14:29 mail postfix/10025/smtpd[13718]: E49211CC0085: client=localhost[127.0.0.1]
Dec 14 16:14:29 mail postfix/cleanup[13666]: E49211CC0085: message-id=<CACZyReS-RDswN9jARvA69E6kiLPq6w2z3yTso-YhH0MyaKuS-w@mail.gmail.com>
Dec 14 16:14:29 mail postfix/qmgr[946]: E49211CC0085: from=<iccs.isense.group@gmail.com>, size=3799, nrcpt=3 (queue active)
Dec 14 16:14:29 mail postfix/10025/smtpd[13719]: E72451CC0086: client=localhost[127.0.0.1]
Dec 14 16:14:29 mail postfix/10025/smtpd[13718]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Dec 14 16:14:29 mail amavis[10506]: (10506-19) Passed CLEAN {RelayedInbound}, [147.102.222.230]:64672 [2607:f8b0:4003:c0f:0:0:0:22d] <iccs.isense.group@gmail.com> -> <nikos.frangakis@iccs.gr>, Queue-ID: 638931CC0083, Message-ID: <CACZyReS-RDswN9jARvA69E6kiLPq6w2z3yTso-YhH0MyaKuS-w@mail.gmail.com>, mail_id: 5z3M-SsNXhli, Hits: -2.397, size: 3499, queued_as: DD21A1CC0084, dkim_sd=20161025:gmail.com, 470 ms, Tests: [DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,FREEMAIL_FROM=0.001,HTML_MESSAGE=0.001,RCVD_IN_DNSWL_MED=-2.3,TVD_SPACE_RATIO=0.001]
Dec 14 16:14:29 mail amavis[13208]: (13208-03) Passed CLEAN {RelayedInbound}, [147.102.222.230]:64672 [2607:f8b0:4003:c0f:0:0:0:22d] <iccs.isense.group@gmail.com> -> <info@interact-roadautomation.eu>, Queue-ID: 638931CC0083, Message-ID: <CACZyReS-RDswN9jARvA69E6kiLPq6w2z3yTso-YhH0MyaKuS-w@mail.gmail.com>, mail_id: J28vTSTU0rFQ, Hits: -2.397, size: 3499, queued_as: E49211CC0085, dkim_sd=20161025:gmail.com, 519 ms, Tests: [DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,FREEMAIL_FROM=0.001,HTML_MESSAGE=0.001,RCVD_IN_DNSWL_MED=-2.3,TVD_SPACE_RATIO=0.001]
Dec 14 16:14:29 mail postfix/cleanup[13666]: E72451CC0086: message-id=<CACZyReS-RDswN9jARvA69E6kiLPq6w2z3yTso-YhH0MyaKuS-w@mail.gmail.com>
Dec 14 16:14:29 mail postfix/qmgr[946]: E72451CC0086: from=<iccs.isense.group@gmail.com>, size=3779, nrcpt=1 (queue active)
Dec 14 16:14:29 mail postfix/10025/smtpd[13719]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Dec 14 16:14:29 mail postfix/smtp-amavis/smtp[13711]: 638931CC0083: to=<nikos.frangakis@iccs.gr>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.59, delays=0.05/0.04/0.01/0.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as DD21A1CC0084)
Dec 14 16:14:29 mail postfix/smtp-amavis/smtp[13670]: 638931CC0083: to=<info@interact-roadautomation.eu>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.6, delays=0.05/0/0.01/0.54, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as E49211CC0085)
Dec 14 16:14:29 mail amavis[12724]: (12724-08) Passed CLEAN {RelayedInbound}, [147.102.222.230]:64672 [2607:f8b0:4003:c0f:0:0:0:22d] <iccs.isense.group@gmail.com> -> <niki.georgiou@iccs.gr>, Queue-ID: 638931CC0083, Message-ID: <CACZyReS-RDswN9jARvA69E6kiLPq6w2z3yTso-YhH0MyaKuS-w@mail.gmail.com>, mail_id: bhsR0g5l8jOe, Hits: -2.397, size: 3499, queued_as: E72451CC0086, dkim_sd=20161025:gmail.com, 530 ms, Tests: [DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,FREEMAIL_FROM=0.001,HTML_MESSAGE=0.001,RCVD_IN_DNSWL_MED=-2.3,TVD_SPACE_RATIO=0.001]
Dec 14 16:14:30 mail postfix/pipe[13674]: DD21A1CC0084: to=<nikos.frangakis@iccs.gr>, relay=dovecot, delay=0.13, delays=0.03/0/0/0.1, dsn=2.0.0, status=sent (delivered via dovecot service)
Dec 14 16:14:30 mail postfix/qmgr[946]: DD21A1CC0084: removed
Dec 14 16:14:30 mail postfix/smtp-amavis/smtp[13710]: 638931CC0083: to=<niki.georgiou@iccs.gr>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.65, delays=0.05/0.02/0.01/0.58, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as E72451CC0086)
Dec 14 16:14:30 mail postfix/qmgr[946]: 638931CC0083: removed
Dec 14 16:14:30 mail postfix/pipe[13722]: E49211CC0085: to=<info@interact-roadautomation.eu>, relay=dovecot, delay=0.14, delays=0.02/0.03/0/0.09, dsn=2.0.0, status=sent (delivered via dovecot service)
Dec 14 16:14:30 mail postfix/pipe[13725]: E49211CC0085: to=<nikos.frangakis@iccs.gr>, relay=dovecot, delay=0.14, delays=0.02/0.05/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
Dec 14 16:14:30 mail postfix/pipe[13727]: E72451CC0086: to=<niki.georgiou@iccs.gr>, relay=dovecot, delay=0.13, delays=0.04/0.04/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)
Dec 14 16:14:30 mail postfix/qmgr[946]: E72451CC0086: removed
Dec 14 16:14:30 mail postfix/pipe[13723]: E49211CC0085: to=<niki.georgiou@iccs.gr>, relay=dovecot, delay=0.15, delays=0.02/0.04/0/0.09, dsn=2.0.0, status=sent (delivered via dovecot service)
Dec 14 16:14:30 mail postfix/qmgr[946]: E49211CC0085: removed

4

Re: duplicate emails with forwarding and "save a copy in mailbox"

*) Please show us output of command "postconf -n", and full content of file /etc/postfix/master.cf.
*) Did you modify any Postfix or Amavisd settings?

5

Re: duplicate emails with forwarding and "save a copy in mailbox"

master.cf has been altered based on these instructions
https://forum.iredmail.org/topic12830-b … known.html


postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_min_user = no
allow_percent_hack = no
biff = no
body_checks = pcre:/etc/postfix/body_checks.pcre
command_directory = /usr/sbin
compatibility_level = 2
content_filter = smtp-amavis:[127.0.0.1]:10024
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
enable_original_recipient = no
header_checks = pcre:/etc/postfix/header_checks
inet_interfaces = all
inet_protocols = ipv4
lmtp_tls_mandatory_protocols = !SSLv2 !SSLv3
lmtp_tls_protocols = !SSLv2 !SSLv3
mail_owner = postfix
mailbox_size_limit = 104857600
mailq_path = /usr/bin/mailq
message_size_limit = 104857600
mydestination = $myhostname, localhost, localhost.localdomain
mydomain = mail.iccs.gr
myhostname = mail.iccs.gr
mynetworks = 127.0.0.1, 192.168.1.0/24, 147.102.5.180
myorigin = mail.iccs.gr
newaliases_path = /usr/bin/newaliases
postscreen_access_list = permit_mynetworks cidr:/etc/postfix/postscreen_access.cidr
postscreen_blacklist_action = enforce
postscreen_dnsbl_action = enforce
postscreen_dnsbl_reply_map = texthash:/etc/postfix/postscreen_dnsbl_reply
postscreen_dnsbl_sites = zen.spamhaus.org=127.0.0.[2..11]*3 b.barracudacentral.org=127.0.0.[2..11]*2
postscreen_dnsbl_threshold = 2
postscreen_dnsbl_whitelist_threshold = -2
postscreen_greet_action = enforce
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps
queue_directory = /var/spool/postfix
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf
recipient_delimiter = +
relay_domains = $mydestination proxy:mysql:/etc/postfix/mysql/relay_domains.cf
relayhost = relay.ntua.gr
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf
sender_dependent_relayhost_maps = proxy:mysql:/etc/postfix/mysql/sender_dependent_relayhost_maps.cf
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp-amavis_destination_recipient_limit = 1
smtp_tls_CAfile = $smtpd_tls_CAfile
smtp_tls_loglevel = 1
smtp_tls_mandatory_protocols = !SSLv2 !SSLv3
smtp_tls_note_starttls_offer = yes
smtp_tls_protocols = !SSLv2 !SSLv3
smtp_tls_security_level = may
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:7777
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks permit_sasl_authenticated check_helo_access pcre:/etc/postfix/helo_access.pcre reject_non_fqdn_helo_hostname reject_unknown_helo_hostname
smtpd_recipient_restrictions = reject_unknown_recipient_domain reject_non_fqdn_recipient reject_unlisted_recipient check_policy_service inet:127.0.0.1:7777 permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
smtpd_sender_restrictions = reject_unknown_sender_domain reject_non_fqdn_sender reject_unlisted_sender permit_mynetworks permit_sasl_authenticated check_sender_access pcre:/etc/postfix/sender_access.pcre
smtpd_tls_CAfile = /etc/ssl/certs/DigiCertCA.crt
smtpd_tls_cert_file = /etc/ssl/certs/mail_iccs_gr.crt
smtpd_tls_dh1024_param_file = /etc/ssl/dh2048_param.pem
smtpd_tls_dh512_param_file = /etc/ssl/dh512_param.pem
smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA
smtpd_tls_key_file = /etc/ssl/private/mail_iccs_gr.key
smtpd_tls_loglevel = 1
smtpd_tls_mandatory_protocols = !SSLv2 !SSLv3
smtpd_tls_protocols = !SSLv2 !SSLv3
smtpd_tls_security_level = may
swap_bangpath = no
tls_random_source = dev:/dev/urandom
transport_maps = proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf proxy:mysql:/etc/postfix/mysql/catchall_maps.cf proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
virtual_gid_maps = static:2000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_minimum_uid = 2000
virtual_transport = dovecot
virtual_uid_maps = static:2000

cat /etc/postfix/master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master" or
# on-line: http://www.postfix.org/master.5.html).
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
#smtp      inet  n       -       -       -       -       smtpd
smtp      inet  n       -       -       -       1       postscreen
smtpd     pass  -       -       -       -       -       smtpd
dnsblog   unix  -       -       -       -       0       dnsblog
tlsproxy  unix  -       -       -       -       0       tlsproxy
#submission inet n       -       -       -       -       smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       -       -       -       smtpd
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       -       -       -       qmqpd
pickup    unix  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
#   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
#  mailbox_transport = lmtp:inet:localhost
#  virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix    -    n    n    -    2    pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

# Submission, port 587, force TLS connection.
submission inet n       -       n       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o content_filter=smtp-amavis:[127.0.0.1]:10026
  #-o smtpd_upstream_proxy_protocol=haproxy

# Use dovecot's `deliver` program as LDA.
dovecot unix    -       n       n       -       -      pipe
    flags=DRh user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${domain} -m ${extension}

# Amavisd integration.
smtp-amavis unix -  -   n   -   8  smtp
    -o syslog_name=postfix/smtp-amavis
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes
    -o max_use=20

127.0.0.1:10025 inet n  -   n   -   -  smtpd
    -o syslog_name=postfix/10025
    -o content_filter=
    -o mynetworks_style=host
    -o mynetworks=127.0.0.0/8
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o strict_rfc821_envelopes=yes
    -o smtp_tls_security_level=none
    -o smtpd_tls_security_level=none
    -o smtpd_restriction_classes=
    -o smtpd_delay_reject=no
    -o smtpd_client_restrictions=permit_mynetworks,reject
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o smtpd_end_of_data_restrictions=
    -o smtpd_error_sleep_time=0
    -o smtpd_soft_error_limit=1001
    -o smtpd_hard_error_limit=1000
    -o smtpd_client_connection_count_limit=0
    -o smtpd_client_connection_rate_limit=0
    -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
    #-o smtpd_upstream_proxy_protocol=haproxy

6

Re: duplicate emails with forwarding and "save a copy in mailbox"

The problem is caused by removed ",no_address_mappings" in master.cf.

You can try to add "receive_override_options = no_address_mappings" in main.cf directly, and revert changes in master.cf.

7 (edited by chrisdent 2020-08-12 10:19:55)

Re: duplicate emails with forwarding and "save a copy in mailbox"

As always very appreciated for your support.

I  applied this configuration and I did not receive the email on the forwarded address.

Hope you can help me.