Hi guys. I need some help. I've setup postfix to use sender_bcc_maps and recipient_bcc_maps so that only one of the virtual domains which we host, is forwarded to a backup account.
The sender_bcc and recipient_bcc statements are in the main.cf The problem, as so many have posted before, is that the backup mailbox receives every mail twice. I realize this has to do with our external filters in our postfix queue, however Im totally lost as to where exactly to insert the options that have been posted in this newsgroup as a solution. I've have tried various options before, but either BCC gets disabled completely, or postfix refuses to accept smtp connections. I'm aware of the "recieve_override_options=no_address_mappings" setting. But if I put in the main.cf then no mails get sent via BCC to the backup mailbox. I have experimented with placing the sender_bcc_maps and recipient_bcc_maps at several different places within my master.cf. But whenever I do that, postfix stops working properly and refuses smtp connections. In other words, I can't send out email. Some additional info about our postfix setup: We use mysql as a user database in combination with postfixadmin. Secondly we filter emails via postgrey, amavisd, spamassassin and maildrop. The configuration wasn't entirely done by me, different admins added and modified different things, so I've lost the overview a bit. Can anyone help me? Below is the output of my postconf -n and my master.cf Thanks. ######################################################## broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/lib64/postfix data_directory = /var/lib/postfix debug_peer_level = 1 default_destination_concurrency_limit = 20 home_mailbox = .maildir/ html_directory = /usr/share/doc/postfix-2.2.9/html inet_interfaces = 1.1.1.1, mail.com, localhost local_destination_concurrency_limit = 4 mail_owner = postfix mailbox_size_limit = 1024000000 mailq_path = /usr/bin/mailq manpage_directory = /usr/share/man message_size_limit = 1024000000 mydestination = $myhostname myhostname = mail.com mynetworks = 1.1.1.1, 127.0.0.0/8 mynetworks_style = host myorigin = $mydomain newaliases_path = /usr/bin/newaliases queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.2.9/readme recipient_bcc_maps = hash:/etc/postfix/recipient_bcc sample_directory = /etc/postfix sender_bcc_maps = hash:/etc/postfix/sender_bcc sendmail_path = /usr/sbin/sendmail setgid_group = postdrop smtp_tls_note_starttls_offer = yes smtpd_client_connection_rate_limit = 10 smtpd_recipient_restrictions = reject_invalid_hostname, reject_non_fqdn_recipient, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination check_policy_service inet:127.0.0.1:10030 smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous smtpd_tls_CAfile = /etc/postfix/ssl/demoCA/cacert.pem smtpd_tls_CApath = /etc/ssl/certs smtpd_tls_cert_file = /etc/postfix/ssl/server-crt.pem smtpd_tls_key_file = /etc/postfix/ssl/server-key.pem smtpd_tls_loglevel = 3 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s smtpd_use_tls = yes tls_random_source = dev:/dev/urandom transport_maps = hash:/etc/postfix/transport unknown_local_recipient_reject_code = 550 virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_gid_maps = static:207 virtual_mailbox_base = /var/vmail/ virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domain_maps.cf virtual_mailbox_limit = 102400000 virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_minimum_uid = 207 virtual_transport = maildrop virtual_uid_maps = static:207 ################################################################### smtp inet n - n - 8 smtpd #-o content_filter=scan:[127.0.0.1]:10024 -o content_filter=spamchk:dummy -o recieve_override_options=no_address_mappings # #Mail transport used above. scan unix - - n - 4 lmtp -o disable_dns_lookup=yes -o lmtp_send_xforward_command=yes -o lmtp_data_done_timeout=1200 #Injecting mail back into Postfix after content filter localhost:10025 inet n - n - 4 smtpd -o content_filter= -o myhostname=localhost.mail.com -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelope=yes -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o smtpd_authorized_xforward_hosts=127.0.0.0/8 smtps inet n - n - 4 smtpd -o content_filter=scan:[127.0.0.1]:10024 -o recieve_override_options=no_address_mappings -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes #628 inet n - n - - qmqpd pickup fifo n - n 60 1 pickup cleanup unix n - n - 0 cleanup qmgr fifo n - n 300 1 qmgr #qmgr fifo n - n 300 1 oqmgr 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 smtp unix - - n - - smtp # When relaying mail as backup MX, disable fallback_relay to avoid MX loops relay unix - - n - - smtp -o fallback_relay= # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - n - - showq error 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. # Also specify in main.cf: maildrop_destination_recipient_limit=1 # #maildrop unix - n n - - pipe # flags=DRhu user=vmail argv=/usr/bin/maildrop -w 90 -d [EMAIL PROTECTED] ${recipient} ${user} ${nexthop} ${sender} maildrop unix - n n - - pipe flags=ODRhu user=vmail argv=/usr/bin/maildrop -w 90 -d [EMAIL PROTECTED] ${recipient} ${user} ${nexthop} ${sender} # # The Cyrus deliver program has changed incompatibly, multiple times. # old-cyrus unix - n n - - pipe flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} # 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} # # 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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient spamchk unix - n n - 10 pipe flags=Rq user=filter argv=/usr/local/bin/spamchk -f ${sender} -- ${recipient} vacation unix - n n - - pipe flags=DRhu user=vacation argv=/var/spool/vacation/vacation.pl -f ${sender} -- ${recipient} retry unix - - n - - error ####################################################################