]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.3-20170729
authorWietse Venema <wietse@porcupine.org>
Sat, 29 Jul 2017 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sun, 20 Aug 2017 03:40:13 +0000 (23:40 -0400)
22 files changed:
postfix/HISTORY
postfix/README_FILES/ADDRESS_VERIFICATION_README
postfix/html/ADDRESS_VERIFICATION_README.html
postfix/html/local.8.html
postfix/html/pipe.8.html
postfix/html/postconf.5.html
postfix/html/virtual.8.html
postfix/man/man5/postconf.5
postfix/man/man8/local.8
postfix/man/man8/pipe.8
postfix/man/man8/virtual.8
postfix/proto/ADDRESS_VERIFICATION_README.html
postfix/proto/postconf.proto
postfix/src/cleanup/cleanup_init.c
postfix/src/cleanup/cleanup_milter.c
postfix/src/cleanup/cleanup_out_recipient.c
postfix/src/global/mail_copy.c
postfix/src/global/mail_params.c
postfix/src/global/mail_version.h
postfix/src/local/local.c
postfix/src/pipe/pipe.c
postfix/src/virtual/virtual.c

index 99bd24ab297abff5e3f90b943cebce7cc9d627a7..b13cc1c05b428d89f82664bf4bf92e4dac1079f8 100644 (file)
@@ -23087,11 +23087,26 @@ Apologies for any names omitted.
 20170728
 
        Documentation: added warnings that "enable_original_recipient
-       = no" prevents Postfix from saving the address verification
-       result under the original probe destination address, if it
-       is changed by aliasing or canonical mapping.  Files:
-       proto/ADDRESS_VERIFICATION_README.html, proto/postconf.proto.
+       = no" prevents Postfix <= 3.2 from saving the address
+       verification result under the original probe destination
+       address, if it is changed by aliasing or canonical mapping.
+       Files: proto/ADDRESS_VERIFICATION_README.html,
+       proto/postconf.proto.
 
        Cleanup: don't store an empty address in the verify cache
        (this could happen with "enable_original_recipient = no").
        File: global/verify.c.
+
+20170729
+
+       Cleanup: the setting "enable_original_recipient = no" no
+       longer breaks address verification for aliased addresses.
+       This does not change the behavior of the X-Original-To
+       header and of recipient deduplication. The fix is to always
+       store the original recipient in queue files. Some other
+       changes were needed to move ownership of the var_enable_orcpt
+       parameter from the cleanup daemon to the global library.
+       Files: cleanup/cleanup_init.c, cleanup/cleanup_milter.c,
+       cleanup_out_recipient.c, global/mail_params.c, global/mail_copy.c,
+       proto/postconf.proto proto/ADDRESS_VERIFICATION_README.html,
+       local/local.c, virtual/virtual.c, pipe/pipe.c.
index ab2d0625b4ec273ed8c56fad0db83941d5e1701d..f21058c6111b26cc00c7ce7a15c6e3c72ae71da1 100644 (file)
@@ -164,6 +164,7 @@ same address repeatedly.
         # Postfix 2.6 and later privacy feature.
         # unverified_recipient_reject_reason = Address lookup failed
 
+        # Postfix 3.2 and earlier workaround.
         # Do not set enable_original_recipient=no. This prevents Postfix
         # from saving the recipient address verification result under
         # the original address, when the address verification probe
@@ -209,6 +210,7 @@ verification for specific domains that often appear in forged email.
         # Note 2: Avoid hash files here. Use btree or lmdb instead.
         address_verify_map = btree:/var/lib/postfix/verify
 
+        # Postfix 3.2 and earlier workaround.
         # Do not set enable_original_recipient=no. This prevents Postfix
         # from saving the sender address verification result under the
         # original address, when the address verification probe message
index 58cb7e1ec1a89af029fa838ffd28d72e3f4fc47d..e5cb09b41f88868eec2385c5ca28b201d69a53a4 100644 (file)
@@ -299,6 +299,7 @@ the same address repeatedly.  </p>
     # Postfix 2.6 and later privacy feature.
     # <a href="postconf.5.html#unverified_recipient_reject_reason">unverified_recipient_reject_reason</a> = Address lookup failed
 
+    # Postfix 3.2 and earlier workaround.
     # Do not set <a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a>=no. This prevents Postfix
     # from saving the recipient address verification result under
     # the original address, when the address verification probe
@@ -354,6 +355,7 @@ in forged email.  </p>
     # Note 2: Avoid hash files here. Use btree or lmdb instead.
     <a href="postconf.5.html#address_verify_map">address_verify_map</a> = <a href="DATABASE_README.html#types">btree</a>:/var/lib/postfix/verify
 
+    # Postfix 3.2 and earlier workaround.
     # Do not set <a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a>=no. This prevents Postfix
     # from saving the sender address verification result under the
     # original address, when the address verification probe message
index 6d56b6322ddcda2d1bff0c54c147ce540eadb746..ceec09222f96ffee10ec8f2cf7b48767e5f9d1d8 100644 (file)
@@ -564,6 +564,13 @@ LOCAL(8)                                                              LOCAL(8)
               A  prefix  that  is  prepended  to  the  process  name in syslog
               records, so that, for example, "smtpd" becomes "prefix/smtpd".
 
+       Available in Postfix version 3.3 and later:
+
+       <b><a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> (yes)</b>
+              Enable support for  the  original  recipient  address  after  an
+              address  is  rewritten  to a different address (for example with
+              aliasing or with canonical mapping).
+
 <b>FILES</b>
        The following are examples; details differ between systems.
        $HOME/.forward, per-user aliasing
index dff3425c6164933c46ff2d5d8bcecde3de86c05f..0c8dcf1ec594869f83668e5d18b516a355cb4447 100644 (file)
@@ -461,6 +461,13 @@ PIPE(8)                                                                PIPE(8)
               delivery status code or explanatory text of successful or unsuc-
               cessful deliveries.
 
+       Available in Postfix version 3.3 and later:
+
+       <b><a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> (yes)</b>
+              Enable support for  the  original  recipient  address  after  an
+              address  is  rewritten  to a different address (for example with
+              aliasing or with canonical mapping).
+
 <b>SEE ALSO</b>
        <a href="qmgr.8.html">qmgr(8)</a>, queue manager
        <a href="bounce.8.html">bounce(8)</a>, delivery status reports
index 3ae17d396e39840fefbb3dd38a400831d776e1a4..5c308bad22ed3cf8671ca147ebfd5afba406b8e8 100644 (file)
@@ -3203,32 +3203,34 @@ name changes. </p>
 <DT><b><a name="enable_original_recipient">enable_original_recipient</a>
 (default: yes)</b></DT><DD>
 
-<p> Enable support to save the original address if a recipient address
-is rewritten to a different address (for example with an alias or with
-canonical mapping). </p>
+<p> Enable support for the original recipient address after an
+address is rewritten to a different address (for example with
+aliasing or with canonical mapping). </p>
 
 <p> The original recipient address is used as follows: </p>
 
 <dl>
 
-<dt> X-Original-To message header </dt> <dd> When this parameter
-is set to <b>yes</b>, the original recipient address is stored in
-the X-Original-To message header. This header is needed to distinguish
-between different recipients that share the same mailbox. </dd>
-
-<dt> Recipient deduplication </dt> <dd> When this parameter is set
-to <b>yes</b>, the <a href="cleanup.8.html">cleanup(8)</a> daemon performs duplicate elimination
-on distinct pairs of (original recipient, rewritten recipient), and
-generates non-empty original recipient queue file records. When
-this parameter is set to <b>no</b>, the <a href="cleanup.8.html">cleanup(8)</a> daemon performs
-duplicate elimination on the rewritten recipient address only, and
-generates empty original recipient queue file records. </dd>
-
-<dt>Address verification </dt> <dd> When this parameter is set to
-<b>yes</b>, an addres verification result is stored under both the
-original and the final recipient address. When this parameter is
-set to <b>no</b>, an address verification result is stored only
-under the final recipient address. </dd>
+<dt> Final delivery </dt> <dd> With "<a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> =
+yes", the original recipient address is stored in the <b>X-Original-To</b>
+message header. This header may be used to distinguish between
+different recipients that share the same mailbox.  </dd>
+
+<dt> Recipient deduplication </dt> <dd> With "<a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a>
+= yes", the <a href="cleanup.8.html">cleanup(8)</a> daemon performs duplicate recipient elimination
+based on the content of (original recipient, maybe-rewritten
+recipient) pairs.  Otherwise, the <a href="cleanup.8.html">cleanup(8)</a> daemon performs duplicate
+recipient elimination based only on the maybe-rewritten recipient
+address.  </dd>
+
+</dl>
+
+<p> Note: with Postfix &le; 3.2 the "setting <a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a>
+= <b>no</b>" breaks address verification for addresses that are
+aliased or otherwise rewritten (Postfix is unable to store the
+addres verification result under the original probe destination
+address; instead, it can store the result only under the rewritten
+address).  </p>
 
 </ul>
 
@@ -15276,8 +15278,8 @@ temporary problem (default: 450). <br> The
 <a href="postconf.5.html#unverified_recipient_tempfail_action">unverified_recipient_tempfail_action</a> parameter specifies the action
 after address probe failure due to a temporary problem (default:
 <a href="postconf.5.html#defer_if_permit">defer_if_permit</a>). <br> This feature breaks for aliased addresses
-when <a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> is set to "no". <br> This feature
-is available in Postfix 2.1 and later.  </dd>
+with "<a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> = no" (Postfix &le; 3.2). <br>
+This feature is available in Postfix 2.1 and later. </dd>
 
 </dl>
 
@@ -16021,8 +16023,9 @@ code when an address probe failed due to a temporary problem
 (default: 450).  <br> The <a href="postconf.5.html#unverified_sender_tempfail_action">unverified_sender_tempfail_action</a> parameter
 specifies the action after address probe failure due to a temporary
 problem (default: <a href="postconf.5.html#defer_if_permit">defer_if_permit</a>).  <br> This feature breaks for
-aliased addresses when <a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> is set to "no".
-<br> This feature is avaiable in Postfix 2.1 and later.  </dd>
+aliased addresses with "<a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> = no" (Postfix
+&le; 3.2).  <br> This feature is avaiable in Postfix 2.1 and later.
+</dd>
 
 </dl>
 
index 9c9477dd186889c64e7e973195cc1e9f2009d2ff..4af7d86a5cd280fc692a4a9b8e0f0db79fb7986b 100644 (file)
@@ -269,6 +269,13 @@ VIRTUAL(8)                                                          VIRTUAL(8)
               delivery status code or explanatory text of successful or unsuc-
               cessful deliveries.
 
+       Available in Postfix version 3.3 and later:
+
+       <b><a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> (yes)</b>
+              Enable  support  for  the  original  recipient  address after an
+              address is rewritten to a different address  (for  example  with
+              aliasing or with canonical mapping).
+
 <b>SEE ALSO</b>
        <a href="qmgr.8.html">qmgr(8)</a>, queue manager
        <a href="bounce.8.html">bounce(8)</a>, delivery status reports
index 38d336c29926cfb5940a311c34603343aa64866b..7f1d5d501f88bee876039bb13b95bc2a5c92340f 100644 (file)
@@ -2007,33 +2007,33 @@ name changes.
 .PP
 This feature is available in Postfix 2.9 and later.
 .SH enable_original_recipient (default: yes)
-Enable support to save the original address if a recipient address
-is rewritten to a different address (for example with an alias or with
-canonical mapping).
+Enable support for the original recipient address after an
+address is rewritten to a different address (for example with
+aliasing or with canonical mapping).
 .PP
 The original recipient address is used as follows:
-.IP "X\-Original\-To message header"
-When this parameter
-is set to \fByes\fR, the original recipient address is stored in
-the X\-Original\-To message header. This header is needed to distinguish
-between different recipients that share the same mailbox.
+.IP "Final delivery"
+With "enable_original_recipient =
+yes", the original recipient address is stored in the \fBX\-Original\-To\fR
+message header. This header may be used to distinguish between
+different recipients that share the same mailbox.
 .br
 .IP "Recipient deduplication"
-When this parameter is set
-to \fByes\fR, the \fBcleanup\fR(8) daemon performs duplicate elimination
-on distinct pairs of (original recipient, rewritten recipient), and
-generates non\-empty original recipient queue file records. When
-this parameter is set to \fBno\fR, the \fBcleanup\fR(8) daemon performs
-duplicate elimination on the rewritten recipient address only, and
-generates empty original recipient queue file records.
+With "enable_original_recipient
+= yes", the \fBcleanup\fR(8) daemon performs duplicate recipient elimination
+based on the content of (original recipient, maybe\-rewritten
+recipient) pairs.  Otherwise, the \fBcleanup\fR(8) daemon performs duplicate
+recipient elimination based only on the maybe\-rewritten recipient
+address.
 .br
-.IP "Address verification"
-When this parameter is set to
-\fByes\fR, an addres verification result is stored under both the
-original and the final recipient address. When this parameter is
-set to \fBno\fR, an address verification result is stored only
-under the final recipient address.
 .br
+.PP
+Note: with Postfix <= 3.2 the "setting enable_original_recipient
+= \fBno\fR" breaks address verification for addresses that are
+aliased or otherwise rewritten (Postfix is unable to store the
+addres verification result under the original probe destination
+address; instead, it can store the result only under the rewritten
+address).
 .br
 .PP
 This feature is available in Postfix 2.1 and later. Postfix
@@ -10272,10 +10272,9 @@ after address probe failure due to a temporary problem (default:
 defer_if_permit).
 .br
 This feature breaks for aliased addresses
-when enable_original_recipient is set to "no".
+with "enable_original_recipient = no" (Postfix <= 3.2).
 .br
-This feature
-is available in Postfix 2.1 and later.
+This feature is available in Postfix 2.1 and later.
 .br
 .br
 .PP
@@ -10855,7 +10854,8 @@ specifies the action after address probe failure due to a temporary
 problem (default: defer_if_permit).
 .br
 This feature breaks for
-aliased addresses when enable_original_recipient is set to "no".
+aliased addresses with "enable_original_recipient = no" (Postfix
+<= 3.2).
 .br
 This feature is avaiable in Postfix 2.1 and later.
 .br
index 9be0467a953b2b9964c64e61ed4bae330070134a..baac83c89c7e835040a1fee2c8e09fff7ced9d29 100644 (file)
@@ -594,6 +594,12 @@ The syslog facility of Postfix logging.
 .IP "\fBsyslog_name (see 'postconf -d' output)\fR"
 A prefix that is prepended to the process name in syslog
 records, so that, for example, "smtpd" becomes "prefix/smtpd".
+.PP
+Available in Postfix version 3.3 and later:
+.IP "\fBenable_original_recipient (yes)\fR"
+Enable support for the original recipient address after an
+address is rewritten to a different address (for example with
+aliasing or with canonical mapping).
 .SH "FILES"
 .na
 .nf
index 0bcf97790eeed6d88e4c82e99fb28c18ebfcb8da..c74333cad5e6c6f09cd54cbbf863fbe5e0718b62 100644 (file)
@@ -440,6 +440,12 @@ Available in Postfix version 3.0 and later:
 Optional filter for the \fBpipe\fR(8) delivery agent to change the
 delivery status code or explanatory text of successful or unsuccessful
 deliveries.
+.PP
+Available in Postfix version 3.3 and later:
+.IP "\fBenable_original_recipient (yes)\fR"
+Enable support for the original recipient address after an
+address is rewritten to a different address (for example with
+aliasing or with canonical mapping).
 .SH "SEE ALSO"
 .na
 .nf
index 1fd325c32093f00e1c975afab0284c1d70645406..7d321c0f34e0c4d2e8084a2d900281c349d296fb 100644 (file)
@@ -289,6 +289,12 @@ Available in Postfix version 3.0 and later:
 Optional filter for the \fBvirtual\fR(8) delivery agent to change the
 delivery status code or explanatory text of successful or unsuccessful
 deliveries.
+.PP
+Available in Postfix version 3.3 and later:
+.IP "\fBenable_original_recipient (yes)\fR"
+Enable support for the original recipient address after an
+address is rewritten to a different address (for example with
+aliasing or with canonical mapping).
 .SH "SEE ALSO"
 .na
 .nf
index e5f4cea11374e7f14d0592b4a915fa80399abf6c..ef1f6a7830d49834a8465e27a2183a474f65e610 100644 (file)
@@ -299,6 +299,7 @@ the same address repeatedly.  </p>
     # Postfix 2.6 and later privacy feature.
     # unverified_recipient_reject_reason = Address lookup failed
 
+    # Postfix 3.2 and earlier workaround.
     # Do not set enable_original_recipient=no. This prevents Postfix
     # from saving the recipient address verification result under
     # the original address, when the address verification probe
@@ -354,6 +355,7 @@ in forged email.  </p>
     # Note 2: Avoid hash files here. Use btree or lmdb instead.
     address_verify_map = btree:/var/lib/postfix/verify
 
+    # Postfix 3.2 and earlier workaround.
     # Do not set enable_original_recipient=no. This prevents Postfix
     # from saving the sender address verification result under the
     # original address, when the address verification probe message
index c2ca13b9bfc81e3b0807d72b15a7707f8dee126f..b5c8957c876656e847982d2640a2d7d8b48ebf05 100644 (file)
@@ -1402,32 +1402,34 @@ for showq(8) queue displays.  </p>
 
 %PARAM enable_original_recipient yes
 
-<p> Enable support to save the original address if a recipient address
-is rewritten to a different address (for example with an alias or with
-canonical mapping). </p>
+<p> Enable support for the original recipient address after an
+address is rewritten to a different address (for example with
+aliasing or with canonical mapping). </p>
 
 <p> The original recipient address is used as follows: </p>
 
 <dl>
 
-<dt> X-Original-To message header </dt> <dd> When this parameter
-is set to <b>yes</b>, the original recipient address is stored in
-the X-Original-To message header. This header is needed to distinguish
-between different recipients that share the same mailbox. </dd>
-
-<dt> Recipient deduplication </dt> <dd> When this parameter is set
-to <b>yes</b>, the cleanup(8) daemon performs duplicate elimination
-on distinct pairs of (original recipient, rewritten recipient), and
-generates non-empty original recipient queue file records. When
-this parameter is set to <b>no</b>, the cleanup(8) daemon performs
-duplicate elimination on the rewritten recipient address only, and
-generates empty original recipient queue file records. </dd>
-
-<dt>Address verification </dt> <dd> When this parameter is set to
-<b>yes</b>, an addres verification result is stored under both the
-original and the final recipient address. When this parameter is
-set to <b>no</b>, an address verification result is stored only
-under the final recipient address. </dd>
+<dt> Final delivery </dt> <dd> With "enable_original_recipient =
+yes", the original recipient address is stored in the <b>X-Original-To</b>
+message header. This header may be used to distinguish between
+different recipients that share the same mailbox.  </dd>
+
+<dt> Recipient deduplication </dt> <dd> With "enable_original_recipient
+= yes", the cleanup(8) daemon performs duplicate recipient elimination
+based on the content of (original recipient, maybe-rewritten
+recipient) pairs.  Otherwise, the cleanup(8) daemon performs duplicate
+recipient elimination based only on the maybe-rewritten recipient
+address.  </dd>
+
+</dl>
+
+<p> Note: with Postfix &le; 3.2 the "setting enable_original_recipient
+= <b>no</b>" breaks address verification for addresses that are
+aliased or otherwise rewritten (Postfix is unable to store the
+addres verification result under the original probe destination
+address; instead, it can store the result only under the rewritten
+address).  </p>
 
 </ul>
 
@@ -6139,8 +6141,8 @@ temporary problem (default: 450). <br> The
 unverified_recipient_tempfail_action parameter specifies the action
 after address probe failure due to a temporary problem (default:
 defer_if_permit). <br> This feature breaks for aliased addresses
-when enable_original_recipient is set to "no". <br> This feature
-is available in Postfix 2.1 and later.  </dd>
+with "enable_original_recipient = no" (Postfix &le; 3.2). <br>
+This feature is available in Postfix 2.1 and later. </dd>
 
 </dl>
 
@@ -6609,8 +6611,9 @@ code when an address probe failed due to a temporary problem
 (default: 450).  <br> The unverified_sender_tempfail_action parameter
 specifies the action after address probe failure due to a temporary
 problem (default: defer_if_permit).  <br> This feature breaks for
-aliased addresses when enable_original_recipient is set to "no".
-<br> This feature is avaiable in Postfix 2.1 and later.  </dd>
+aliased addresses with "enable_original_recipient = no" (Postfix
+&le; 3.2).  <br> This feature is avaiable in Postfix 2.1 and later.
+</dd>
 
 </dl>
 
index 20e14676c66618d57a8a4e829295c81e81d1f42c..063982387fa76f04356d35529758b4e9f378fc93 100644 (file)
@@ -133,7 +133,6 @@ char   *var_mimehdr_checks;         /* mime header checks */
 char   *var_nesthdr_checks;            /* nested header checks */
 char   *var_body_checks;               /* any body checks */
 int     var_dup_filter_limit;          /* recipient dup filter */
-bool    var_enable_orcpt;              /* Include orcpt in dup filter? */
 char   *var_empty_addr;                        /* destination of bounced bounces */
 int     var_delay_warn_time;           /* delay that triggers warning */
 char   *var_prop_extension;            /* propagate unmatched extension */
@@ -184,7 +183,6 @@ const CONFIG_INT_TABLE cleanup_int_table[] = {
 };
 
 const CONFIG_BOOL_TABLE cleanup_bool_table[] = {
-    VAR_ENABLE_ORCPT, DEF_ENABLE_ORCPT, &var_enable_orcpt,
     VAR_VERP_BOUNCE_OFF, DEF_VERP_BOUNCE_OFF, &var_verp_bounce_off,
     VAR_AUTO_8BIT_ENC_HDR, DEF_AUTO_8BIT_ENC_HDR, &var_auto_8bit_enc_hdr,
     VAR_ALWAYS_ADD_HDRS, DEF_ALWAYS_ADD_HDRS, &var_always_add_hdrs,
index 4383a943ebb40f8c0c34944a85afa79220c5cbaf..274fa5aa9ac31107237246e60b30dd5ebe087566 100644 (file)
@@ -2244,7 +2244,6 @@ int     cleanup_send_canon_flags;
 MAPS   *cleanup_send_canon_maps;
 int     var_dup_filter_limit = DEF_DUP_FILTER_LIMIT;
 char   *var_empty_addr = DEF_EMPTY_ADDR;
-int     var_enable_orcpt = DEF_ENABLE_ORCPT;
 MAPS   *cleanup_virt_alias_maps;
 char   *var_milt_daemon_name = "host.example.com";
 char   *var_milt_v = DEF_MILT_V;
@@ -2439,6 +2438,7 @@ int     main(int unused_argc, char **argv)
     msg_vstream_init(argv[0], VSTREAM_ERR);
     var_line_limit = DEF_LINE_LIMIT;
     var_header_limit = DEF_HEADER_LIMIT;
+    var_enable_orcpt = DEF_ENABLE_ORCPT;
 
     for (;;) {
        ARGV   *argv;
index bbe080365dae6d7f87bfd7d3d278b197dd6b05cb..40735e2c6790dadf74d0103b82d3137c2eaf07b6 100644 (file)
 /*     IBM T.J. Watson Research
 /*     P.O. Box 704
 /*     Yorktown Heights, NY 10598, USA
+/*
+/*     Wietse Venema
+/*     Google, Inc.
+/*     111 8th Avenue
+/*     New York, NY 10011, USA
 /*--*/
 
 /* System library. */
@@ -133,8 +138,6 @@ void    cleanup_out_recipient(CLEANUP_STATE *state,
     /*
      * XXX Not elegant, but eliminates complexity in the record reading loop.
      */
-    if (!var_enable_orcpt)
-       orcpt = "";
     if (dsn_orcpt == 0)
        dsn_orcpt = "";
 
index 7b841df84fde5abf083f46042e02e9369ac5efc2..8a56f84affe2b7fae7c23b7e89c532b17091d701 100644 (file)
@@ -52,7 +52,8 @@
 /*     The address is quoted according to RFC822 rules.
 /* .IP MAIL_COPY_ORIG_RCPT
 /*     Prepend an X-Original-To: header with the original
-/*     envelope recipient address.
+/*     envelope recipient address. This is a NOOP with
+/*     var_enable_orcpt === 0.
 /* .IP MAIL_COPY_RETURN_PATH
 /*     Prepend a Return-Path: header with the value of the
 /*     \fIsender\fR attribute.
 /*     IBM T.J. Watson Research
 /*     P.O. Box 704
 /*     Yorktown Heights, NY 10598, USA
+/*
+/*     Wietse Venema
+/*     Google, Inc.
+/*     111 8th Avenue
+/*     New York, NY 10011, USA
 /*--*/
 
 /* System library. */
@@ -197,7 +203,7 @@ int     mail_copy(const char *sender,
         * An empty original recipient record almost certainly means that
         * original recipient processing was disabled.
         */
-       if (*orig_rcpt) {
+       if (var_enable_orcpt && *orig_rcpt) {
            quote_822_local(buf, orig_rcpt);
            vstream_fprintf(dst, "X-Original-To: %s%s", vstring_str(buf), eol);
        }
index ece9ec071c8d7647371d608b182a0c903d18e142..a1bf336c1073b144225e852ed874dfb4ec20602d 100644 (file)
 /*     int     var_idna2003_compat;
 /*     int     var_compat_level;
 /*     char    *var_drop_hdrs;
+/*     bool    var_enable_orcpt;
 /*
 /*     void    mail_params_init()
 /*
@@ -342,6 +343,7 @@ char   *var_smtputf8_autoclass;
 int     var_idna2003_compat;
 int     var_compat_level;
 char   *var_drop_hdrs;
+bool    var_enable_orcpt;
 
 const char null_format_string[1] = "";
 
@@ -783,6 +785,7 @@ void    mail_params_init()
        VAR_MULTI_ENABLE, DEF_MULTI_ENABLE, &var_multi_enable,
        VAR_LONG_QUEUE_IDS, DEF_LONG_QUEUE_IDS, &var_long_queue_ids,
        VAR_STRICT_SMTPUTF8, DEF_STRICT_SMTPUTF8, &var_strict_smtputf8,
+       VAR_ENABLE_ORCPT, DEF_ENABLE_ORCPT, &var_enable_orcpt,
        0,
     };
     const char *cp;
index 178bcc3445b169a1c23db041ca2feefdf64d7d31..5cf59b9904e420394c97679dd876d8d785ef6689 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20170728"
+#define MAIL_RELEASE_DATE      "20170729"
 #define MAIL_VERSION_NUMBER    "3.3"
 
 #ifdef SNAPSHOT
index 4ed90402f31594fe2fca0ceb30b791d160925790..dfd453fa734c1b2c805a261ee5075aae2e30afb9 100644 (file)
 /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR"
 /*     A prefix that is prepended to the process name in syslog
 /*     records, so that, for example, "smtpd" becomes "prefix/smtpd".
+/* .PP
+/*     Available in Postfix version 3.3 and later:
+/* .IP "\fBenable_original_recipient (yes)\fR"
+/*     Enable support for the original recipient address after an
+/*     address is rewritten to a different address (for example with
+/*     aliasing or with canonical mapping).
 /* FILES
 /*     The following are examples; details differ between systems.
 /*     $HOME/.forward, per-user aliasing
index eca2bd12a38e5e9a405896474fa60fda0ddd5f90..fe01d4b7f10071030b9058d67b94119ca78bb07a 100644 (file)
 /*     Optional filter for the \fBpipe\fR(8) delivery agent to change the
 /*     delivery status code or explanatory text of successful or unsuccessful
 /*     deliveries.
+/* .PP
+/*     Available in Postfix version 3.3 and later:
+/* .IP "\fBenable_original_recipient (yes)\fR"
+/*     Enable support for the original recipient address after an
+/*     address is rewritten to a different address (for example with
+/*     aliasing or with canonical mapping).
 /* SEE ALSO
 /*     qmgr(8), queue manager
 /*     bounce(8), delivery status reports
index 77e1a76c97704cbad41179a4c10351d17543bcd3..a7273ebf8432b55f37305a8f1254c9faacd8736e 100644 (file)
 /*     Optional filter for the \fBvirtual\fR(8) delivery agent to change the
 /*     delivery status code or explanatory text of successful or unsuccessful
 /*     deliveries.
+/* .PP
+/*     Available in Postfix version 3.3 and later:
+/* .IP "\fBenable_original_recipient (yes)\fR"
+/*     Enable support for the original recipient address after an
+/*     address is rewritten to a different address (for example with
+/*     aliasing or with canonical mapping).
 /* SEE ALSO
 /*     qmgr(8), queue manager
 /*     bounce(8), delivery status reports