Bug 37414 - always_bcc recipient always receive emails twice
always_bcc recipient always receive emails twice
Status: RESOLVED DUPLICATE of bug 14619
Product: UCS
Classification: Unclassified
Component: Mail
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.0-x
Assigned To: Mail maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-22 17:48 CET by Tobias Birkefeld
Modified: 2015-05-08 11:47 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Birkefeld univentionstaff 2014-12-22 17:48:30 CET
Customer reported: Ticket#2014121821000174 comment 4

If the UCR variable mail/archivefolder is set and mail/antivir/spam=yes (which is default) postfix send two mails to mail/archivefolder recipient.

It's easy to resolve the problem in the master.cf. Just add in the first smtpd line a "-o receive_override_options=no_address_mappings". The new template for master.cf could look like this:


--- 10_services 2013-11-20 11:54:47.000000000 +0100
+++ 10_services.new     2014-12-22 17:34:00.368239596 +0100
@@ -8,6 +8,8 @@
 smtp = '%s      inet  n       -       n       -       -       smtpd' % configRegistry.get('mail/smtpport', '25')
 if configRegistry.is_true("mail/postfix/smtpd/debug", False):
        smtp += " -v"
+if configRegistry.get('mail/archivefolder'):
+    smtp += " -o receive_override_options=no_address_mappings"
 print smtp
 @!@
 #628      inet  n       -       n       -       -       qmqpd


The UCR variable mail/archivefolder has now also trigger to rebuild the master.cf.
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2015-01-05 08:58:17 CET
I'm not sure if the proposed patch (source seems to be http://www.postfix.org/ADDRESS_REWRITING_README.html#auto_bcc) is the optimal way since a lot of other features will be disabled and may break things like canonical maps or result in non-optimal/faulty mail routing.

From the man page (man 5 postconf):

> no_address_mappings
>    Disable canonical address mapping, virtual alias map expansion, address 
>    masquerading, and automatic BCC (blind carbon-copy) recipients. This is 
>    typically specified BEFORE an external content filter.

This has to be checked before applying the patch.
Comment 2 Daniel Tröder univentionstaff 2015-05-08 11:47:16 CEST

*** This bug has been marked as a duplicate of bug 14619 ***