2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-09-03 07:35:20 +00:00

postfix-1.1.11-20021029

This commit is contained in:
Wietse Venema
2002-10-29 00:00:00 -05:00
committed by Viktor Dukhovni
parent bae04c10f3
commit 033bb731e1
10 changed files with 82 additions and 43 deletions

View File

@@ -7106,6 +7106,15 @@ Apologies for any names omitted.
after HELO. Reported by Karthikeyan Bhargavan, upenn.edu. after HELO. Reported by Karthikeyan Bhargavan, upenn.edu.
Files: smtpd/smtpd.c. Files: smtpd/smtpd.c.
20021029
Bugfix: local(8) did not prepend an X-Original-To: message
header while delivering to command, and local(8) did not
document the X-Original-To: message header.
Workaround: DJBDNS produces a bogus A record when given a
numerical hostname. File: dns/dns_lookup.c.
Open problems: Open problems:
Low: revise other local delivery agent duplicate filters. Low: revise other local delivery agent duplicate filters.

View File

@@ -110,40 +110,41 @@ LOCAL(8) LOCAL(8)
In the case of UNIX-style mailbox delivery, the <b>local</b> dae- In the case of UNIX-style mailbox delivery, the <b>local</b> dae-
mon prepends a "<b>From</b> <i>sender</i> <i>time_stamp</i>" envelope header to mon prepends a "<b>From</b> <i>sender</i> <i>time_stamp</i>" envelope header to
each message, prepends an optional <b>Delivered-To:</b> header each message, prepends an <b>X-Original-To:</b> header with the
with the envelope recipient address, prepends a <b>Return-</b> recipient address as given to Postfix, prepends an
<b>Path:</b> header with the envelope sender address, prepends a optional <b>Delivered-To:</b> header with the envelope recipient
&gt; character to lines beginning with "<b>From</b> ", and appends address, prepends a <b>Return-Path:</b> header with the envelope
an empty line. The mailbox is locked for exclusive access sender address, prepends a &gt; character to lines beginning
while delivery is in progress. In case of problems, an with "<b>From</b> ", and appends an empty line. The mailbox is
attempt is made to truncate the mailbox to its original locked for exclusive access while delivery is in progress.
length. In case of problems, an attempt is made to truncate the
mailbox to its original length.
In the case of <b>maildir</b> delivery, the local daemon prepends In the case of <b>maildir</b> delivery, the local daemon prepends
an optional <b>Delivered-To:</b> header with the envelope recipi- an optional <b>Delivered-To:</b> header with the envelope recipi-
ent address and prepends a <b>Return-Path:</b> header with the ent address and prepends a <b>Return-Path:</b> header with the
envelope sender address. envelope sender address.
<b>EXTERNAL</b> <b>COMMAND</b> <b>DELIVERY</b> <b>EXTERNAL</b> <b>COMMAND</b> <b>DELIVERY</b>
The <b>allow</b><i>_</i><b>mail</b><i>_</i><b>to</b><i>_</i><b>commands</b> configuration parameter The <b>allow</b><i>_</i><b>mail</b><i>_</i><b>to</b><i>_</i><b>commands</b> configuration parameter
restricts delivery to external commands. The default set- restricts delivery to external commands. The default set-
ting (<b>alias,</b> <b>forward</b>) forbids command destinations in ting (<b>alias,</b> <b>forward</b>) forbids command destinations in
<b>:include:</b> files. <b>:include:</b> files.
The command is executed directly where possible. Assis- The command is executed directly where possible. Assis-
tance by the shell (<b>/bin/sh</b> on UNIX systems) is used only tance by the shell (<b>/bin/sh</b> on UNIX systems) is used only
when the command contains shell magic characters, or when when the command contains shell magic characters, or when
the command invokes a shell built-in command. the command invokes a shell built-in command.
A limited amount of command output (standard output and A limited amount of command output (standard output and
standard error) is captured for inclusion with non-deliv- standard error) is captured for inclusion with non-deliv-
ery status reports. A command is forcibly terminated if ery status reports. A command is forcibly terminated if
it does not complete within <b>command</b><i>_</i><b>time</b><i>_</i><b>limit</b> seconds. it does not complete within <b>command</b><i>_</i><b>time</b><i>_</i><b>limit</b> seconds.
Command exit status codes are expected to follow the con- Command exit status codes are expected to follow the con-
ventions defined in &lt;<b>sysexits.h</b>&gt;. ventions defined in &lt;<b>sysexits.h</b>&gt;.
A limited amount of message context is exported via envi- A limited amount of message context is exported via envi-
ronment variables. Characters that may have special mean- ronment variables. Characters that may have special mean-
ing to the shell are replaced by underscores. The list of ing to the shell are replaced by underscores. The list of
acceptable characters is specified with the <b>command</b><i>_</i><b>expan-</b> acceptable characters is specified with the <b>command</b><i>_</i><b>expan-</b>
<b>sion</b><i>_</i><b>filter</b> configuration parameter. <b>sion</b><i>_</i><b>filter</b> configuration parameter.
@@ -175,10 +176,11 @@ LOCAL(8) LOCAL(8)
The current working directory is the mail queue directory. The current working directory is the mail queue directory.
The <b>local</b> daemon prepends a "<b>From</b> <i>sender</i> <i>time_stamp</i>" enve- The <b>local</b> daemon prepends a "<b>From</b> <i>sender</i> <i>time_stamp</i>" enve-
lope header to each message, prepends an optional <b>Deliv-</b> lope header to each message, prepends an <b>X-Original-To:</b>
<b>ered-To:</b> header with the recipient envelope address, header with the recipient address as given to Postfix,
prepends a <b>Return-Path:</b> header with the sender envelope prepends an optional <b>Delivered-To:</b> header with the recipi-
address, and appends no empty line. ent envelope address, prepends a <b>Return-Path:</b> header with
the sender envelope address, and appends no empty line.
<b>EXTERNAL</b> <b>FILE</b> <b>DELIVERY</b> <b>EXTERNAL</b> <b>FILE</b> <b>DELIVERY</b>
The delivery format depends on the destination filename The delivery format depends on the destination filename
@@ -192,14 +194,16 @@ LOCAL(8) LOCAL(8)
In the case of UNIX-style mailbox delivery, the <b>local</b> dae- In the case of UNIX-style mailbox delivery, the <b>local</b> dae-
mon prepends a "<b>From</b> <i>sender</i> <i>time_stamp</i>" envelope header to mon prepends a "<b>From</b> <i>sender</i> <i>time_stamp</i>" envelope header to
each message, prepends an optional <b>Delivered-To:</b> header each message, prepends an <b>X-Original-To:</b> header with the
with the recipient envelope address, prepends a &gt; charac- recipient address as given to Postfix, prepends an
ter to lines beginning with "<b>From</b> ", and appends an empty optional <b>Delivered-To:</b> header with the recipient envelope
line. The envelope sender address is available in the address, prepends a &gt; character to lines beginning with
<b>Return-Path:</b> header. When the destination is a regular "<b>From</b> ", and appends an empty line. The envelope sender
file, it is locked for exclusive access while delivery is address is available in the <b>Return-Path:</b> header. When the
in progress. In case of problems, an attempt is made to destination is a regular file, it is locked for exclusive
truncate a regular file to its original length. access while delivery is in progress. In case of problems,
an attempt is made to truncate a regular file to its orig-
inal length.
In the case of <b>maildir</b> delivery, the local daemon prepends In the case of <b>maildir</b> delivery, the local daemon prepends
an optional <b>Delivered-To:</b> header with the envelope recipi- an optional <b>Delivered-To:</b> header with the envelope recipi-

View File

@@ -62,8 +62,8 @@ PIPE(8) PIPE(8)
expected by, for example, <b>UUCP</b> software. expected by, for example, <b>UUCP</b> software.
<b>O</b> Prepend an "<b>X-Original-To:</b> <i>recipient</i>" mes- <b>O</b> Prepend an "<b>X-Original-To:</b> <i>recipient</i>" mes-
sage header with the original envelope sage header with the recipient address as
recipient address. Note: for this to work, given to Postfix. Note: for this to work,
the <i>transport_</i><b>destination</b><i>_</i><b>recipient</b><i>_</i><b>limit</b> the <i>transport_</i><b>destination</b><i>_</i><b>recipient</b><i>_</i><b>limit</b>
must be 1. must be 1.

View File

@@ -121,6 +121,8 @@ for recipients that are not found in the UNIX passwd database.
In the case of UNIX-style mailbox delivery, In the case of UNIX-style mailbox delivery,
the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR" the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR"
envelope header to each message, prepends an envelope header to each message, prepends an
\fBX-Original-To:\fR header with the recipient address as given to
Postfix, prepends an
optional \fBDelivered-To:\fR header optional \fBDelivered-To:\fR header
with the envelope recipient address, prepends a \fBReturn-Path:\fR with the envelope recipient address, prepends a \fBReturn-Path:\fR
header with the envelope sender address, prepends a \fB>\fR character header with the envelope sender address, prepends a \fB>\fR character
@@ -185,6 +187,8 @@ The current working directory is the mail queue directory.
The \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR" The \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR"
envelope header to each message, prepends an envelope header to each message, prepends an
\fBX-Original-To:\fR header with the recipient address as given to
Postfix, prepends an
optional \fBDelivered-To:\fR optional \fBDelivered-To:\fR
header with the recipient envelope address, prepends a header with the recipient envelope address, prepends a
\fBReturn-Path:\fR header with the sender envelope address, \fBReturn-Path:\fR header with the sender envelope address,
@@ -205,6 +209,8 @@ forward\fR) forbids file destinations in \fB:include:\fR files.
In the case of UNIX-style mailbox delivery, In the case of UNIX-style mailbox delivery,
the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR" the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR"
envelope header to each message, prepends an envelope header to each message, prepends an
\fBX-Original-To:\fR header with the recipient address as given to
Postfix, prepends an
optional \fBDelivered-To:\fR optional \fBDelivered-To:\fR
header with the recipient envelope address, prepends a \fB>\fR header with the recipient envelope address, prepends a \fB>\fR
character to lines beginning with "\fBFrom \fR", and appends an character to lines beginning with "\fBFrom \fR", and appends an

View File

@@ -68,8 +68,8 @@ the message content.
This is expected by, for example, \fBUUCP\fR software. This is expected by, for example, \fBUUCP\fR software.
.IP \fBO\fR .IP \fBO\fR
Prepend an "\fBX-Original-To: \fIrecipient\fR" message header Prepend an "\fBX-Original-To: \fIrecipient\fR" message header
with the original envelope recipient address. Note: for this to work, with the recipient address as given to Postfix. Note: for this to
the \fItransport\fB_destination_recipient_limit\fR must be 1. work, the \fItransport\fB_destination_recipient_limit\fR must be 1.
.IP \fBR\fR .IP \fBR\fR
Prepend a \fBReturn-Path:\fR message header with the envelope sender Prepend a \fBReturn-Path:\fR message header with the envelope sender
address. address.

View File

@@ -503,7 +503,19 @@ int dns_lookup(const char *name, unsigned type, unsigned flags,
*/ */
if (!valid_hostname(name, DONT_GRIPE)) { if (!valid_hostname(name, DONT_GRIPE)) {
if (why) if (why)
vstring_sprintf(why, "Name service error for %s: invalid name", vstring_sprintf(why,
"Name service error for %s: invalid host or domain name",
name);
return (DNS_NOTFOUND);
}
/*
* DJBDNS produces a bogus A record when given a numerical hostname.
*/
if (valid_hostaddr(name, DONT_GRIPE)) {
if (why)
vstring_sprintf(why,
"Name service error for %s: invalid host or domain name",
name); name);
return (DNS_NOTFOUND); return (DNS_NOTFOUND);
} }

View File

@@ -20,7 +20,7 @@
* Patches change the patchlevel and the release date. Snapshots change the * Patches change the patchlevel and the release date. Snapshots change the
* release date only, unless they include the same bugfix as a patch release. * release date only, unless they include the same bugfix as a patch release.
*/ */
#define MAIL_RELEASE_DATE "20021028" #define MAIL_RELEASE_DATE "20021029"
#define VAR_MAIL_VERSION "mail_version" #define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE #define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE

View File

@@ -120,7 +120,8 @@ int deliver_command(LOCAL_STATE state, USER_ATTR usr_attr, const char *comma
/* /*
* Deliver. * Deliver.
*/ */
copy_flags = MAIL_COPY_FROM | MAIL_COPY_RETURN_PATH; copy_flags = MAIL_COPY_FROM | MAIL_COPY_RETURN_PATH
| MAIL_COPY_ORIG_RCPT;
if (local_deliver_hdr_mask & DELIVER_HDR_CMD) if (local_deliver_hdr_mask & DELIVER_HDR_CMD)
copy_flags |= MAIL_COPY_DELIVERED; copy_flags |= MAIL_COPY_DELIVERED;
@@ -168,6 +169,7 @@ int deliver_command(LOCAL_STATE state, USER_ATTR usr_attr, const char *comma
PIPE_CMD_COMMAND, command, PIPE_CMD_COMMAND, command,
PIPE_CMD_COPY_FLAGS, copy_flags, PIPE_CMD_COPY_FLAGS, copy_flags,
PIPE_CMD_SENDER, state.msg_attr.sender, PIPE_CMD_SENDER, state.msg_attr.sender,
PIPE_CMD_ORIG_RCPT, state.msg_attr.orig_rcpt,
PIPE_CMD_DELIVERED, state.msg_attr.delivered, PIPE_CMD_DELIVERED, state.msg_attr.delivered,
PIPE_CMD_TIME_LIMIT, var_command_maxtime, PIPE_CMD_TIME_LIMIT, var_command_maxtime,
PIPE_CMD_ENV, env->argv, PIPE_CMD_ENV, env->argv,

View File

@@ -109,6 +109,8 @@
/* In the case of UNIX-style mailbox delivery, /* In the case of UNIX-style mailbox delivery,
/* the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR" /* the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR"
/* envelope header to each message, prepends an /* envelope header to each message, prepends an
/* \fBX-Original-To:\fR header with the recipient address as given to
/* Postfix, prepends an
/* optional \fBDelivered-To:\fR header /* optional \fBDelivered-To:\fR header
/* with the envelope recipient address, prepends a \fBReturn-Path:\fR /* with the envelope recipient address, prepends a \fBReturn-Path:\fR
/* header with the envelope sender address, prepends a \fB>\fR character /* header with the envelope sender address, prepends a \fB>\fR character
@@ -171,6 +173,8 @@
/* /*
/* The \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR" /* The \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR"
/* envelope header to each message, prepends an /* envelope header to each message, prepends an
/* \fBX-Original-To:\fR header with the recipient address as given to
/* Postfix, prepends an
/* optional \fBDelivered-To:\fR /* optional \fBDelivered-To:\fR
/* header with the recipient envelope address, prepends a /* header with the recipient envelope address, prepends a
/* \fBReturn-Path:\fR header with the sender envelope address, /* \fBReturn-Path:\fR header with the sender envelope address,
@@ -189,6 +193,8 @@
/* In the case of UNIX-style mailbox delivery, /* In the case of UNIX-style mailbox delivery,
/* the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR" /* the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR"
/* envelope header to each message, prepends an /* envelope header to each message, prepends an
/* \fBX-Original-To:\fR header with the recipient address as given to
/* Postfix, prepends an
/* optional \fBDelivered-To:\fR /* optional \fBDelivered-To:\fR
/* header with the recipient envelope address, prepends a \fB>\fR /* header with the recipient envelope address, prepends a \fB>\fR
/* character to lines beginning with "\fBFrom \fR", and appends an /* character to lines beginning with "\fBFrom \fR", and appends an

View File

@@ -58,8 +58,8 @@
/* This is expected by, for example, \fBUUCP\fR software. /* This is expected by, for example, \fBUUCP\fR software.
/* .IP \fBO\fR /* .IP \fBO\fR
/* Prepend an "\fBX-Original-To: \fIrecipient\fR" message header /* Prepend an "\fBX-Original-To: \fIrecipient\fR" message header
/* with the original envelope recipient address. Note: for this to work, /* with the recipient address as given to Postfix. Note: for this to
/* the \fItransport\fB_destination_recipient_limit\fR must be 1. /* work, the \fItransport\fB_destination_recipient_limit\fR must be 1.
/* .IP \fBR\fR /* .IP \fBR\fR
/* Prepend a \fBReturn-Path:\fR message header with the envelope sender /* Prepend a \fBReturn-Path:\fR message header with the envelope sender
/* address. /* address.