Hello,
For our setup here we needed to selectively disable BCC mappings without
disabling the other mappings. So attached is a patch that adds this capability
to receive_override_options . It does not change any other behavior.
The patch is against v2.8.3. I hope that it will be integrated in some next
version of the server.
Best regards & great software BTW
Luben Karavelov
diff -Naur postfix-2.8.3/html/postconf.5.html postfix-2.8.3-patched/html/postconf.5.html
--- postfix-2.8.3/html/postconf.5.html 2011-01-20 14:10:36.000000000 +0200
+++ postfix-2.8.3-patched/html/postconf.5.html 2011-05-30 19:32:50.889291872 +0300
@@ -7954,6 +7954,11 @@
recipients. This is typically specified BEFORE an external content
filter. </dd>
+<dt><b><a name="no_bcc_mappings">no_bcc_mappings</a></b></dt>
+
+<dd>Disable automatic BCC (blind carbon-copy) recipients. This is
+typically specified BEFORE an external content filter. </dd>
+
<dt><b><a name="no_header_body_checks">no_header_body_checks</a></b></dt>
<dd>Disable header/body_checks. This is typically specified AFTER
diff -Naur postfix-2.8.3/man/man5/postconf.5 postfix-2.8.3-patched/man/man5/postconf.5
--- postfix-2.8.3/man/man5/postconf.5 2011-01-20 14:10:37.000000000 +0200
+++ postfix-2.8.3-patched/man/man5/postconf.5 2011-05-30 19:32:51.119274156 +0300
@@ -4507,6 +4507,9 @@
address masquerading, and automatic BCC (blind carbon-copy)
recipients. This is typically specified BEFORE an external content
filter.
+.IP "\fBno_bcc_mappings\fR"
+Disable automatic BCC (blind carbon-copy) recipients. This is
+typically specified BEFORE an external content filter.
.IP "\fBno_header_body_checks\fR"
Disable header/body_checks. This is typically specified AFTER
an external content filter.
diff -Naur postfix-2.8.3/proto/postconf.proto postfix-2.8.3-patched/proto/postconf.proto
--- postfix-2.8.3/proto/postconf.proto 2011-01-20 14:10:33.000000000 +0200
+++ postfix-2.8.3-patched/proto/postconf.proto 2011-05-30 19:30:44.529026685 +0300
@@ -3298,6 +3298,11 @@
recipients. This is typically specified BEFORE an external content
filter. </dd>
+<dt><b><a name="no_bcc_mappings">no_bcc_mappings</a></b></dt>
+
+<dd>Disable automatic BCC (blind carbon-copy) recipients. This is
+typically specified BEFORE an external content filter. </dd>
+
<dt><b><a name="no_header_body_checks">no_header_body_checks</a></b></dt>
<dd>Disable header/body_checks. This is typically specified AFTER
diff -Naur postfix-2.8.3/src/global/input_transp.c postfix-2.8.3-patched/src/global/input_transp.c
--- postfix-2.8.3/src/global/input_transp.c 2008-01-08 22:36:13.000000000 +0200
+++ postfix-2.8.3-patched/src/global/input_transp.c 2011-05-30 19:12:47.012085544 +0300
@@ -74,6 +74,7 @@
"no_address_mappings", INPUT_TRANSP_ADDRESS_MAPPING,
"no_header_body_checks", INPUT_TRANSP_HEADER_BODY,
"no_milters", INPUT_TRANSP_MILTER,
+ "no_bcc_mappings", INPUT_TRANSP_BCC,
0,
};
@@ -95,6 +96,9 @@
cleanup_flags &= ~CLEANUP_FLAG_FILTER;
if (transp_mask & INPUT_TRANSP_MILTER)
cleanup_flags &= ~CLEANUP_FLAG_MILTER;
+ if (transp_mask & INPUT_TRANSP_BCC)
+ cleanup_flags &= ~CLEANUP_FLAG_BCC_OK;
+
if (msg_verbose)
msg_info("after %s: cleanup flags = %s",
myname, cleanup_strflags(cleanup_flags));
diff -Naur postfix-2.8.3/src/global/input_transp.h postfix-2.8.3-patched/src/global/input_transp.h
--- postfix-2.8.3/src/global/input_transp.h 2006-07-10 22:20:19.000000000 +0300
+++ postfix-2.8.3-patched/src/global/input_transp.h 2011-06-14 16:02:23.227251354 +0300
@@ -18,6 +18,7 @@
#define INPUT_TRANSP_ADDRESS_MAPPING (1<<1)
#define INPUT_TRANSP_HEADER_BODY (1<<2)
#define INPUT_TRANSP_MILTER (1<<3)
+#define INPUT_TRANSP_BCC (1<<4)
extern int input_transp_mask(const char *, const char *);
extern int input_transp_cleanup(int, int);