For some reason, when those users (whose mail is bcc'd through
"always_bcc", "recipient_bcc_maps," and "sender_bcc_maps") send email,
their sent messages shows in between one and four times (twice is the
norm) in the audit user (whose email is checked by GNU tools like cat
and grep, not by a MUA) and supervisor's inbox.
The issue is not client related AFAIK (I've tried MUAs like Thunderbird,
Outlook, and a webmail system). The problem does not occur for other
users who are only covered by the 'always bcc' rule.
The mail log shows that the audit user and the supervisor were only
bcc'd once, yet multiple copies still show up in both of the targets
inbox. Here's an example of one of the transactions:
Aug 1 18:15:43 ox postfix/qmgr[4787]: 0DBD1C7C89:
from=<us...@example.com>, size=1603, nrcpt=3 (queue active)
Aug 1 18:15:43 ox amavis[21060]: (21060-01) ESMTP::10024
/var/spool/amavis/amavis-20070801T181543-21060: <us...@example.com> ->
<external_recipient@outside_domain.example.com>,<audit...@example.com>,<super...@example.com>
Received: SIZE=1603 from ox.marketprecision.net ([127.0.0.1]) by
localhost (ox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id
21060-01; Wed, 1 Aug 2007 18:15:43 -0400 (EDT)
Aug 1 18:15:43 ox amavis[21060]: (21060-01) Checking:
<us...@example.com> ->
<external_recipient@outside_domain.example.com>,<audit...@example.com>,<super...@example.com>
Aug 1 18:15:44 ox amavis[21060]: (21060-01) FWD via SMTP:
[127.0.0.1]:10025 <us...@example.com> ->
<external_recipient@outside_domain.example.com>
Aug 1 18:15:44 ox postfix/qmgr[4787]: 65378C403A:
from=<us...@example.com>, size=1983, nrcpt=3 (queue active)
Aug 1 18:15:44 ox amavis[21060]: (21060-01) SPAM-TAG,
<us...@example.com> -> <audit...@example.com>,
<super...@example.com>, No, hits=-1.4 tagged_above=-100.8 required=5.0
tests=ALL_TRUSTED
Aug 1 18:15:44 ox amavis[21060]: (21060-01) FWD via SMTP:
[127.0.0.1]:10025 <us...@example.com> ->
<audit...@example.com>,<super...@example.com>
Aug 1 18:15:44 ox postfix/qmgr[4787]: 735C5C7C91:
from=<us...@example.com>, size=2056, nrcpt=4 (queue active)
Aug 1 18:15:44 ox amavis[21060]: (21060-01) Passed, <us...@example.com>
->
<external_recipient@outside_domain.example.com>,<audit...@example.com>,<super...@example.com>,
Message-ID:
<20983531.4041186006543053....@ox.marketprecision.net>,
Hits: -1.36
... mail, mail.log, and mail.err show no errors with the
[recipient|sender]_bcc_maps and they are as basic as can be (and I ran
postmap on each of the files properly):
recipient_bcc_maps:
us...@example.com super...@example.com
sender_bcc_maps:
us...@example.com super...@example.com
............
... removing the 'always_bcc' and the receipient_bcc_map does not stop
the double bcc'ing on sent messages.
Another pertinent oddity: I just tried adding a test user to the above
maps, ran postmap, HUP'd postfix, and none of the new bcc's are showing
up in my inbox or in the logs.
I'm using postfix-2.1.1-1.17 (RPM'd version, fully patched) in SLES9.
Here's my postconf -n results:
alias_maps = hash:/etc/aliases,ldap:ldapsharedfolder
always_bcc = audi...@marketprecision.net
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/lib/postfix
debug_peer_level = 3
defer_transports =
disable_dns_lookups = no
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks
inet_interfaces = all
local_recipient_maps =
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_size_limit = 0
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_exceptions = root
message_size_limit = 15728640
mydestination = $myhostname,localhost.$mydomain
mydomain = marketprecision.net
myhostname = ox.marketprecision.net
mynetworks = [my IP ranges]
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
recipient_bcc_maps = hash:/etc/postfix/recipient_bcc_map
recipient_delimiter = +
sample_directory = /usr/share/doc/packages/postfix/samples
sender_bcc_maps = hash:/etc/postfix/sender_bcc_map
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_banner = $myhostname
smtpd_error_sleep_time = 2s
smtpd_hard_error_limit = 10
smtpd_recipient_restrictions = permit_mynetworks,
reject_unknown_hostname, reject_unauth_pipelining,
reject_non_fqdn_recipient,
reject_unknown_sender_domain,
reject_unknown_recipient_domain, reject_non_fqdn_hostname,
reject_non_fqdn_sender, permit_tls_clientcerts,
permit_sasl_authenticated, check_recipient_access,
regexp:/etc/postfix/header_checks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_soft_error_limit = 5
smtpd_tls_ask_ccert = yes
smtpd_tls_cert_file = /etc/postfix/tls/ox.marketprecision.net.cert
smtpd_tls_key_file = /etc/postfix/tls/ox.marketprecision.net.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_daemon_random_source = dev:/dev/urandom
tls_random_source = dev:/dev/urandom
transport_maps = ldap:ldaptrans
unknown_address_reject_code = 554
unknown_client_reject_code = 554
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 450
virtual_alias_domains = ldap:ldapvdom
virtual_alias_maps = hash:/etc/postfix/virtual,ldap:ldapcoloc
-------------
Thank you in advance.
Since you are sending mail to a content filter, mail passes through
Postfix twice and the BCC mapping is performad as many times as well.
You need to specify receive_override_options = no_address_mappings
before you send mail to the filter as described here:
http://www.postfix.org/postconf.5.html#receive_override_options
For different ways to do this check this thread:
http://tech.groups.yahoo.com/group/postfix-users/message/221912
HTH
Peter