2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-29 21:27:57 +00:00

postfix-3.3-20170729

This commit is contained in:
Wietse Venema 2017-07-29 00:00:00 -05:00 committed by Viktor Dukhovni
parent 5204816be8
commit 852cf62baf
22 changed files with 177 additions and 83 deletions

View File

@ -23087,11 +23087,26 @@ Apologies for any names omitted.
20170728 20170728
Documentation: added warnings that "enable_original_recipient Documentation: added warnings that "enable_original_recipient
= no" prevents Postfix from saving the address verification = no" prevents Postfix <= 3.2 from saving the address
result under the original probe destination address, if it verification result under the original probe destination
is changed by aliasing or canonical mapping. Files: address, if it is changed by aliasing or canonical mapping.
proto/ADDRESS_VERIFICATION_README.html, proto/postconf.proto. Files: proto/ADDRESS_VERIFICATION_README.html,
proto/postconf.proto.
Cleanup: don't store an empty address in the verify cache Cleanup: don't store an empty address in the verify cache
(this could happen with "enable_original_recipient = no"). (this could happen with "enable_original_recipient = no").
File: global/verify.c. 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.

View File

@ -164,6 +164,7 @@ same address repeatedly.
# Postfix 2.6 and later privacy feature. # Postfix 2.6 and later privacy feature.
# unverified_recipient_reject_reason = Address lookup failed # unverified_recipient_reject_reason = Address lookup failed
# Postfix 3.2 and earlier workaround.
# Do not set enable_original_recipient=no. This prevents Postfix # Do not set enable_original_recipient=no. This prevents Postfix
# from saving the recipient address verification result under # from saving the recipient address verification result under
# the original address, when the address verification probe # 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. # Note 2: Avoid hash files here. Use btree or lmdb instead.
address_verify_map = btree:/var/lib/postfix/verify address_verify_map = btree:/var/lib/postfix/verify
# Postfix 3.2 and earlier workaround.
# Do not set enable_original_recipient=no. This prevents Postfix # Do not set enable_original_recipient=no. This prevents Postfix
# from saving the sender address verification result under the # from saving the sender address verification result under the
# original address, when the address verification probe message # original address, when the address verification probe message

View File

@ -299,6 +299,7 @@ the same address repeatedly. </p>
# Postfix 2.6 and later privacy feature. # Postfix 2.6 and later privacy feature.
# <a href="postconf.5.html#unverified_recipient_reject_reason">unverified_recipient_reject_reason</a> = Address lookup failed # <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 # 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 # from saving the recipient address verification result under
# the original address, when the address verification probe # 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. # 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 <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 # 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 # from saving the sender address verification result under the
# original address, when the address verification probe message # original address, when the address verification probe message

View File

@ -564,6 +564,13 @@ LOCAL(8) LOCAL(8)
A prefix that is prepended to the process name in syslog A prefix that is prepended to the process name in syslog
records, so that, for example, "smtpd" becomes "prefix/smtpd". 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> <b>FILES</b>
The following are examples; details differ between systems. The following are examples; details differ between systems.
$HOME/.forward, per-user aliasing $HOME/.forward, per-user aliasing

View File

@ -461,6 +461,13 @@ PIPE(8) PIPE(8)
delivery status code or explanatory text of successful or unsuc- delivery status code or explanatory text of successful or unsuc-
cessful deliveries. 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> <b>SEE ALSO</b>
<a href="qmgr.8.html">qmgr(8)</a>, queue manager <a href="qmgr.8.html">qmgr(8)</a>, queue manager
<a href="bounce.8.html">bounce(8)</a>, delivery status reports <a href="bounce.8.html">bounce(8)</a>, delivery status reports

View File

@ -3203,32 +3203,34 @@ name changes. </p>
<DT><b><a name="enable_original_recipient">enable_original_recipient</a> <DT><b><a name="enable_original_recipient">enable_original_recipient</a>
(default: yes)</b></DT><DD> (default: yes)</b></DT><DD>
<p> Enable support to save the original address if a recipient address <p> Enable support for the original recipient address after an
is rewritten to a different address (for example with an alias or with address is rewritten to a different address (for example with
canonical mapping). </p> aliasing or with canonical mapping). </p>
<p> The original recipient address is used as follows: </p> <p> The original recipient address is used as follows: </p>
<dl> <dl>
<dt> X-Original-To message header </dt> <dd> When this parameter <dt> Final delivery </dt> <dd> With "<a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> =
is set to <b>yes</b>, the original recipient address is stored in yes", the original recipient address is stored in the <b>X-Original-To</b>
the X-Original-To message header. This header is needed to distinguish message header. This header may be used to distinguish between
between different recipients that share the same mailbox. </dd> different recipients that share the same mailbox. </dd>
<dt> Recipient deduplication </dt> <dd> When this parameter is set <dt> Recipient deduplication </dt> <dd> With "<a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a>
to <b>yes</b>, the <a href="cleanup.8.html">cleanup(8)</a> daemon performs duplicate elimination = yes", the <a href="cleanup.8.html">cleanup(8)</a> daemon performs duplicate recipient elimination
on distinct pairs of (original recipient, rewritten recipient), and based on the content of (original recipient, maybe-rewritten
generates non-empty original recipient queue file records. When recipient) pairs. Otherwise, the <a href="cleanup.8.html">cleanup(8)</a> daemon performs duplicate
this parameter is set to <b>no</b>, the <a href="cleanup.8.html">cleanup(8)</a> daemon performs recipient elimination based only on the maybe-rewritten recipient
duplicate elimination on the rewritten recipient address only, and address. </dd>
generates empty original recipient queue file records. </dd>
<dt>Address verification </dt> <dd> When this parameter is set to </dl>
<b>yes</b>, an addres verification result is stored under both the
original and the final recipient address. When this parameter is <p> Note: with Postfix &le; 3.2 the "setting <a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a>
set to <b>no</b>, an address verification result is stored only = <b>no</b>" breaks address verification for addresses that are
under the final recipient address. </dd> 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> </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 <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: 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 <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 with "<a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> = no" (Postfix &le; 3.2). <br>
is available in Postfix 2.1 and later. </dd> This feature is available in Postfix 2.1 and later. </dd>
</dl> </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 (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 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 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". aliased addresses with "<a href="postconf.5.html#enable_original_recipient">enable_original_recipient</a> = no" (Postfix
<br> This feature is avaiable in Postfix 2.1 and later. </dd> &le; 3.2). <br> This feature is avaiable in Postfix 2.1 and later.
</dd>
</dl> </dl>

View File

@ -269,6 +269,13 @@ VIRTUAL(8) VIRTUAL(8)
delivery status code or explanatory text of successful or unsuc- delivery status code or explanatory text of successful or unsuc-
cessful deliveries. 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> <b>SEE ALSO</b>
<a href="qmgr.8.html">qmgr(8)</a>, queue manager <a href="qmgr.8.html">qmgr(8)</a>, queue manager
<a href="bounce.8.html">bounce(8)</a>, delivery status reports <a href="bounce.8.html">bounce(8)</a>, delivery status reports

View File

@ -2007,33 +2007,33 @@ name changes.
.PP .PP
This feature is available in Postfix 2.9 and later. This feature is available in Postfix 2.9 and later.
.SH enable_original_recipient (default: yes) .SH enable_original_recipient (default: yes)
Enable support to save the original address if a recipient address Enable support for the original recipient address after an
is rewritten to a different address (for example with an alias or with address is rewritten to a different address (for example with
canonical mapping). aliasing or with canonical mapping).
.PP .PP
The original recipient address is used as follows: The original recipient address is used as follows:
.IP "X\-Original\-To message header" .IP "Final delivery"
When this parameter With "enable_original_recipient =
is set to \fByes\fR, the original recipient address is stored in yes", the original recipient address is stored in the \fBX\-Original\-To\fR
the X\-Original\-To message header. This header is needed to distinguish message header. This header may be used to distinguish between
between different recipients that share the same mailbox. different recipients that share the same mailbox.
.br .br
.IP "Recipient deduplication" .IP "Recipient deduplication"
When this parameter is set With "enable_original_recipient
to \fByes\fR, the \fBcleanup\fR(8) daemon performs duplicate elimination = yes", the \fBcleanup\fR(8) daemon performs duplicate recipient elimination
on distinct pairs of (original recipient, rewritten recipient), and based on the content of (original recipient, maybe\-rewritten
generates non\-empty original recipient queue file records. When recipient) pairs. Otherwise, the \fBcleanup\fR(8) daemon performs duplicate
this parameter is set to \fBno\fR, the \fBcleanup\fR(8) daemon performs recipient elimination based only on the maybe\-rewritten recipient
duplicate elimination on the rewritten recipient address only, and address.
generates empty original recipient queue file records.
.br .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 .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 .br
.PP .PP
This feature is available in Postfix 2.1 and later. Postfix 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). defer_if_permit).
.br .br
This feature breaks for aliased addresses This feature breaks for aliased addresses
when enable_original_recipient is set to "no". with "enable_original_recipient = no" (Postfix <= 3.2).
.br .br
This feature This feature is available in Postfix 2.1 and later.
is available in Postfix 2.1 and later.
.br .br
.br .br
.PP .PP
@ -10855,7 +10854,8 @@ specifies the action after address probe failure due to a temporary
problem (default: defer_if_permit). problem (default: defer_if_permit).
.br .br
This feature breaks for 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 .br
This feature is avaiable in Postfix 2.1 and later. This feature is avaiable in Postfix 2.1 and later.
.br .br

View File

@ -594,6 +594,12 @@ The syslog facility of Postfix logging.
.IP "\fBsyslog_name (see 'postconf -d' output)\fR" .IP "\fBsyslog_name (see 'postconf -d' output)\fR"
A prefix that is prepended to the process name in syslog A prefix that is prepended to the process name in syslog
records, so that, for example, "smtpd" becomes "prefix/smtpd". 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" .SH "FILES"
.na .na
.nf .nf

View 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 Optional filter for the \fBpipe\fR(8) delivery agent to change the
delivery status code or explanatory text of successful or unsuccessful delivery status code or explanatory text of successful or unsuccessful
deliveries. 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" .SH "SEE ALSO"
.na .na
.nf .nf

View 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 Optional filter for the \fBvirtual\fR(8) delivery agent to change the
delivery status code or explanatory text of successful or unsuccessful delivery status code or explanatory text of successful or unsuccessful
deliveries. 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" .SH "SEE ALSO"
.na .na
.nf .nf

View File

@ -299,6 +299,7 @@ the same address repeatedly. </p>
# Postfix 2.6 and later privacy feature. # Postfix 2.6 and later privacy feature.
# unverified_recipient_reject_reason = Address lookup failed # unverified_recipient_reject_reason = Address lookup failed
# Postfix 3.2 and earlier workaround.
# Do not set enable_original_recipient=no. This prevents Postfix # Do not set enable_original_recipient=no. This prevents Postfix
# from saving the recipient address verification result under # from saving the recipient address verification result under
# the original address, when the address verification probe # 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. # Note 2: Avoid hash files here. Use btree or lmdb instead.
address_verify_map = btree:/var/lib/postfix/verify address_verify_map = btree:/var/lib/postfix/verify
# Postfix 3.2 and earlier workaround.
# Do not set enable_original_recipient=no. This prevents Postfix # Do not set enable_original_recipient=no. This prevents Postfix
# from saving the sender address verification result under the # from saving the sender address verification result under the
# original address, when the address verification probe message # original address, when the address verification probe message

View File

@ -1402,32 +1402,34 @@ for showq(8) queue displays. </p>
%PARAM enable_original_recipient yes %PARAM enable_original_recipient yes
<p> Enable support to save the original address if a recipient address <p> Enable support for the original recipient address after an
is rewritten to a different address (for example with an alias or with address is rewritten to a different address (for example with
canonical mapping). </p> aliasing or with canonical mapping). </p>
<p> The original recipient address is used as follows: </p> <p> The original recipient address is used as follows: </p>
<dl> <dl>
<dt> X-Original-To message header </dt> <dd> When this parameter <dt> Final delivery </dt> <dd> With "enable_original_recipient =
is set to <b>yes</b>, the original recipient address is stored in yes", the original recipient address is stored in the <b>X-Original-To</b>
the X-Original-To message header. This header is needed to distinguish message header. This header may be used to distinguish between
between different recipients that share the same mailbox. </dd> different recipients that share the same mailbox. </dd>
<dt> Recipient deduplication </dt> <dd> When this parameter is set <dt> Recipient deduplication </dt> <dd> With "enable_original_recipient
to <b>yes</b>, the cleanup(8) daemon performs duplicate elimination = yes", the cleanup(8) daemon performs duplicate recipient elimination
on distinct pairs of (original recipient, rewritten recipient), and based on the content of (original recipient, maybe-rewritten
generates non-empty original recipient queue file records. When recipient) pairs. Otherwise, the cleanup(8) daemon performs duplicate
this parameter is set to <b>no</b>, the cleanup(8) daemon performs recipient elimination based only on the maybe-rewritten recipient
duplicate elimination on the rewritten recipient address only, and address. </dd>
generates empty original recipient queue file records. </dd>
<dt>Address verification </dt> <dd> When this parameter is set to </dl>
<b>yes</b>, an addres verification result is stored under both the
original and the final recipient address. When this parameter is <p> Note: with Postfix &le; 3.2 the "setting enable_original_recipient
set to <b>no</b>, an address verification result is stored only = <b>no</b>" breaks address verification for addresses that are
under the final recipient address. </dd> 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> </ul>
@ -6139,8 +6141,8 @@ temporary problem (default: 450). <br> The
unverified_recipient_tempfail_action parameter specifies the action unverified_recipient_tempfail_action parameter specifies the action
after address probe failure due to a temporary problem (default: after address probe failure due to a temporary problem (default:
defer_if_permit). <br> This feature breaks for aliased addresses defer_if_permit). <br> This feature breaks for aliased addresses
when enable_original_recipient is set to "no". <br> This feature with "enable_original_recipient = no" (Postfix &le; 3.2). <br>
is available in Postfix 2.1 and later. </dd> This feature is available in Postfix 2.1 and later. </dd>
</dl> </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 (default: 450). <br> The unverified_sender_tempfail_action parameter
specifies the action after address probe failure due to a temporary specifies the action after address probe failure due to a temporary
problem (default: defer_if_permit). <br> This feature breaks for 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
<br> This feature is avaiable in Postfix 2.1 and later. </dd> &le; 3.2). <br> This feature is avaiable in Postfix 2.1 and later.
</dd>
</dl> </dl>

View File

@ -133,7 +133,6 @@ char *var_mimehdr_checks; /* mime header checks */
char *var_nesthdr_checks; /* nested header checks */ char *var_nesthdr_checks; /* nested header checks */
char *var_body_checks; /* any body checks */ char *var_body_checks; /* any body checks */
int var_dup_filter_limit; /* recipient dup filter */ 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 */ char *var_empty_addr; /* destination of bounced bounces */
int var_delay_warn_time; /* delay that triggers warning */ int var_delay_warn_time; /* delay that triggers warning */
char *var_prop_extension; /* propagate unmatched extension */ 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[] = { 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_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_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, VAR_ALWAYS_ADD_HDRS, DEF_ALWAYS_ADD_HDRS, &var_always_add_hdrs,

View File

@ -2244,7 +2244,6 @@ int cleanup_send_canon_flags;
MAPS *cleanup_send_canon_maps; MAPS *cleanup_send_canon_maps;
int var_dup_filter_limit = DEF_DUP_FILTER_LIMIT; int var_dup_filter_limit = DEF_DUP_FILTER_LIMIT;
char *var_empty_addr = DEF_EMPTY_ADDR; char *var_empty_addr = DEF_EMPTY_ADDR;
int var_enable_orcpt = DEF_ENABLE_ORCPT;
MAPS *cleanup_virt_alias_maps; MAPS *cleanup_virt_alias_maps;
char *var_milt_daemon_name = "host.example.com"; char *var_milt_daemon_name = "host.example.com";
char *var_milt_v = DEF_MILT_V; 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); msg_vstream_init(argv[0], VSTREAM_ERR);
var_line_limit = DEF_LINE_LIMIT; var_line_limit = DEF_LINE_LIMIT;
var_header_limit = DEF_HEADER_LIMIT; var_header_limit = DEF_HEADER_LIMIT;
var_enable_orcpt = DEF_ENABLE_ORCPT;
for (;;) { for (;;) {
ARGV *argv; ARGV *argv;

View File

@ -53,6 +53,11 @@
/* IBM T.J. Watson Research /* IBM T.J. Watson Research
/* P.O. Box 704 /* P.O. Box 704
/* Yorktown Heights, NY 10598, USA /* Yorktown Heights, NY 10598, USA
/*
/* Wietse Venema
/* Google, Inc.
/* 111 8th Avenue
/* New York, NY 10011, USA
/*--*/ /*--*/
/* System library. */ /* System library. */
@ -133,8 +138,6 @@ void cleanup_out_recipient(CLEANUP_STATE *state,
/* /*
* XXX Not elegant, but eliminates complexity in the record reading loop. * XXX Not elegant, but eliminates complexity in the record reading loop.
*/ */
if (!var_enable_orcpt)
orcpt = "";
if (dsn_orcpt == 0) if (dsn_orcpt == 0)
dsn_orcpt = ""; dsn_orcpt = "";

View File

@ -52,7 +52,8 @@
/* The address is quoted according to RFC822 rules. /* The address is quoted according to RFC822 rules.
/* .IP MAIL_COPY_ORIG_RCPT /* .IP MAIL_COPY_ORIG_RCPT
/* Prepend an X-Original-To: header with the original /* 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 /* .IP MAIL_COPY_RETURN_PATH
/* Prepend a Return-Path: header with the value of the /* Prepend a Return-Path: header with the value of the
/* \fIsender\fR attribute. /* \fIsender\fR attribute.
@ -87,6 +88,11 @@
/* IBM T.J. Watson Research /* IBM T.J. Watson Research
/* P.O. Box 704 /* P.O. Box 704
/* Yorktown Heights, NY 10598, USA /* Yorktown Heights, NY 10598, USA
/*
/* Wietse Venema
/* Google, Inc.
/* 111 8th Avenue
/* New York, NY 10011, USA
/*--*/ /*--*/
/* System library. */ /* System library. */
@ -197,7 +203,7 @@ int mail_copy(const char *sender,
* An empty original recipient record almost certainly means that * An empty original recipient record almost certainly means that
* original recipient processing was disabled. * original recipient processing was disabled.
*/ */
if (*orig_rcpt) { if (var_enable_orcpt && *orig_rcpt) {
quote_822_local(buf, orig_rcpt); quote_822_local(buf, orig_rcpt);
vstream_fprintf(dst, "X-Original-To: %s%s", vstring_str(buf), eol); vstream_fprintf(dst, "X-Original-To: %s%s", vstring_str(buf), eol);
} }

View File

@ -130,6 +130,7 @@
/* int var_idna2003_compat; /* int var_idna2003_compat;
/* int var_compat_level; /* int var_compat_level;
/* char *var_drop_hdrs; /* char *var_drop_hdrs;
/* bool var_enable_orcpt;
/* /*
/* void mail_params_init() /* void mail_params_init()
/* /*
@ -342,6 +343,7 @@ char *var_smtputf8_autoclass;
int var_idna2003_compat; int var_idna2003_compat;
int var_compat_level; int var_compat_level;
char *var_drop_hdrs; char *var_drop_hdrs;
bool var_enable_orcpt;
const char null_format_string[1] = ""; const char null_format_string[1] = "";
@ -783,6 +785,7 @@ void mail_params_init()
VAR_MULTI_ENABLE, DEF_MULTI_ENABLE, &var_multi_enable, VAR_MULTI_ENABLE, DEF_MULTI_ENABLE, &var_multi_enable,
VAR_LONG_QUEUE_IDS, DEF_LONG_QUEUE_IDS, &var_long_queue_ids, VAR_LONG_QUEUE_IDS, DEF_LONG_QUEUE_IDS, &var_long_queue_ids,
VAR_STRICT_SMTPUTF8, DEF_STRICT_SMTPUTF8, &var_strict_smtputf8, VAR_STRICT_SMTPUTF8, DEF_STRICT_SMTPUTF8, &var_strict_smtputf8,
VAR_ENABLE_ORCPT, DEF_ENABLE_ORCPT, &var_enable_orcpt,
0, 0,
}; };
const char *cp; const char *cp;

View File

@ -20,7 +20,7 @@
* Patches change both the patchlevel and the release date. Snapshots have no * Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only. * patchlevel; they change the release date only.
*/ */
#define MAIL_RELEASE_DATE "20170728" #define MAIL_RELEASE_DATE "20170729"
#define MAIL_VERSION_NUMBER "3.3" #define MAIL_VERSION_NUMBER "3.3"
#ifdef SNAPSHOT #ifdef SNAPSHOT

View File

@ -550,6 +550,12 @@
/* .IP "\fBsyslog_name (see 'postconf -d' output)\fR" /* .IP "\fBsyslog_name (see 'postconf -d' output)\fR"
/* A prefix that is prepended to the process name in syslog /* A prefix that is prepended to the process name in syslog
/* records, so that, for example, "smtpd" becomes "prefix/smtpd". /* 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 /* FILES
/* The following are examples; details differ between systems. /* The following are examples; details differ between systems.
/* $HOME/.forward, per-user aliasing /* $HOME/.forward, per-user aliasing

View File

@ -418,6 +418,12 @@
/* Optional filter for the \fBpipe\fR(8) delivery agent to change the /* Optional filter for the \fBpipe\fR(8) delivery agent to change the
/* delivery status code or explanatory text of successful or unsuccessful /* delivery status code or explanatory text of successful or unsuccessful
/* deliveries. /* 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 /* SEE ALSO
/* qmgr(8), queue manager /* qmgr(8), queue manager
/* bounce(8), delivery status reports /* bounce(8), delivery status reports

View File

@ -253,6 +253,12 @@
/* Optional filter for the \fBvirtual\fR(8) delivery agent to change the /* Optional filter for the \fBvirtual\fR(8) delivery agent to change the
/* delivery status code or explanatory text of successful or unsuccessful /* delivery status code or explanatory text of successful or unsuccessful
/* deliveries. /* 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 /* SEE ALSO
/* qmgr(8), queue manager /* qmgr(8), queue manager
/* bounce(8), delivery status reports /* bounce(8), delivery status reports