1

postfix will forward two mail to user when i configure autoreply, sender_bcc and always_bcc. i have used postfix with dovecot and mysql for virtual user configuration. i dont found where is the problem is.

when i send mail from lakhaman@sufalam.com to jugal@sufalam.com and in main.cf i have always_bcc=pranav@sufalam. following are the log.

May 30 07:25:27 sufalammail postfix/smtpd[7827]: connect from unknown[192.168.0.201]
May 30 07:26:58 sufalammail postfix/smtpd[7827]: 69139222DE: client=unknown[192.168.0.201]
May 30 07:27:13 sufalammail postfix/cleanup[7839]: 69139222DE: message-id=<20090530015658.69139222DE@sufalammail.com>
May 30 07:27:13 sufalammail postfix/qmgr[7824]: 69139222DE: from=<lakhaman@sufalam.com>, size=363, nrcpt=2 (queue active)
May 30 07:27:14 sufalammail postfix/pickup[7823]: 050C4222E0: uid=491 from=<lakhaman@sufalam.com>
May 30 07:27:14 sufalammail postfix/cleanup[7839]: 050C4222E0: message-id=<20090530015658.69139222DE@sufalammail.com>
May 30 07:27:14 sufalammail postfix/qmgr[7824]: 050C4222E0: from=<lakhaman@sufalam.com>, size=475, nrcpt=3 (queue active)
May 30 07:27:14 sufalammail postfix/pipe[7842]: 69139222DE: to=<jugal@sufalam.com>, relay=dfilt, delay=93, delays=92/0.04/0/0.59, dsn=2.0.0, status=sent (delivered via dfilt service)
May 30 07:27:14 sufalammail postfix/pipe[7842]: 69139222DE: to=<pranav@sufalam.com>, relay=dfilt, delay=93, delays=92/0.04/0/0.59, dsn=2.0.0, status=sent (delivered via dfilt service)
May 30 07:27:14 sufalammail postfix/qmgr[7824]: 69139222DE: removed
May 30 07:27:14 sufalammail postfix/virtual[7852]: 050C4222E0: to=<jugal@sufalam.com>, relay=virtual, delay=0.16, delays=0.03/0.02/0/0.1, dsn=2.0.0, status=sent (delivered to mailbox)
May 30 07:27:14 sufalammail postfix/virtual[7852]: 050C4222E0: to=<pranav@sufalam.com>, relay=virtual, delay=0.16, delays=0.03/0.02/0/0.11, dsn=2.0.0, status=sent (delivered to mailbox)
May 30 07:27:14 sufalammail postfix/virtual[7852]: 050C4222E0: to=<pranav@sufalam.com>, relay=virtual, delay=0.16, delays=0.03/0.02/0/0.11, dsn=2.0.0, status=sent (delivered to mailbox)
May 30 07:27:14 sufalammail postfix/qmgr[7824]: 050C4222E0: removed
May 30 07:27:15 sufalammail postfix/smtpd[7827]: disconnect from unknown[192.168.0.201]

active entry of master.cf is show as below.

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -        -       -       -       smtpd
#        -o content_filter=spamfilter:dummy
         -o content_filter=vacation:dummy
         -o content_filter=dfilt:dummy
#       -o cleanup_service_name= cleanupAF
vacation  unix  -       n        n       -       -       pipe
    flags=Rq user=vacation argv=/var/spool/vacation/vacation3.pl -f ${sender} -- ${recipient}
# flags=Rq user=vacation argv=/usr/bin/perl argv=/var/spool/vacation/vacation.pl -f ${sender} -- ${recipient}
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
relay     unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
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
#
# ====================================================================
# 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.
#spamassassin unix -      n       n       -       -       pipe
#    flags=Rq user=spamd argv=/usr/bin/spamc -u ${user} -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
#dovecot    unix  -       n       n       -       -       pipe
#       flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -d ${recipient}
#spamfilter unix         -       n       n       -       -       pipe
#   flags=Rq user=spamfilter argv=/usr/local/bin/spamfilter.sh -f ${sender} -- ${recipient}
#spamfilter unix -       n       n       -       -       pipe
#    flags=Rq user=vmail argv=/usr/bin/spamc -u ${user}@${domain} -e /usr/sbin/sendmail.postfix -oi -f ${sender} ${recipient}
dfilt     unix    -       n       n       -       -       pipe
    flags=Rq user=filterAlt argv=/etc/postfix/disclaimer -f ${sender} -- ${recipient}
#vacation  unix  -       n        n       -       -       pipe
#    flags=Rq user=vacation argv=/var/spool/vacation/vacation3.pl -f ${sender} -- ${recipient}
cleanupAF unix n - n - 0 cleanup
#-o always_bcc=pranav@sufalam.com
#-o recipient_bcc_maps=mysql:/etc/postfix/mysql-virtual_always_bcc.cf

same way if i send mail to autoreply user then also sender get two mail.

  • Show us yer config, luv! – womble Jun 4 '09 at 23:20
  • Oh, and relevant logs would be good, too. – womble Jun 4 '09 at 23:20
  • Post the output of "postconf -n" in code tags so they're readable. – Bill Weiss Jun 7 '09 at 6:38
4

Most likely you have a content filter and the always_bcc is being called both before and after the content filter. Customise the smtpd either before or after the content filter to include

-o receive_override_options=no_address_mappings

(Note that options in master.cf can't contain spaces).

  • Same problem, that worked for me. Thanks – Tsumi May 12 '16 at 20:13
0

For me 'enable_original_recipient = No' in main.cf did the trick.:-)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.