From: Wietse Venema Date: Tue, 29 Oct 2002 05:00:00 +0000 (-0500) Subject: postfix-1.1.11-20021029 X-Git-Tag: v2.0.0~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=033bb731e1470814c595749e45c79656f0ad9295;p=thirdparty%2Fpostfix.git postfix-1.1.11-20021029 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 8d91a5f99..5091041ec 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -7106,6 +7106,15 @@ Apologies for any names omitted. after HELO. Reported by Karthikeyan Bhargavan, upenn.edu. 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: Low: revise other local delivery agent duplicate filters. diff --git a/postfix/html/local.8.html b/postfix/html/local.8.html index 801c4f09c..2fd88869d 100644 --- a/postfix/html/local.8.html +++ b/postfix/html/local.8.html @@ -110,40 +110,41 @@ LOCAL(8) LOCAL(8) In the case of UNIX-style mailbox delivery, the local dae- mon prepends a "From sender time_stamp" envelope header to - each message, prepends an optional Delivered-To: header - with the envelope recipient address, prepends a Return- - Path: header with the envelope sender address, prepends a - > character to lines beginning with "From ", and appends - an empty line. The mailbox is locked for exclusive access - while delivery is in progress. In case of problems, an - attempt is made to truncate the mailbox to its original - length. + each message, prepends an X-Original-To: header with the + recipient address as given to Postfix, prepends an + optional Delivered-To: header with the envelope recipient + address, prepends a Return-Path: header with the envelope + sender address, prepends a > character to lines beginning + with "From ", and appends an empty line. The mailbox is + locked for exclusive access while delivery is in progress. + In case of problems, an attempt is made to truncate the + mailbox to its original length. In the case of maildir delivery, the local daemon prepends an optional Delivered-To: header with the envelope recipi- - ent address and prepends a Return-Path: header with the + ent address and prepends a Return-Path: header with the envelope sender address. EXTERNAL COMMAND DELIVERY - The allow_mail_to_commands configuration parameter - restricts delivery to external commands. The default set- - ting (alias, forward) forbids command destinations in + The allow_mail_to_commands configuration parameter + restricts delivery to external commands. The default set- + ting (alias, forward) forbids command destinations in :include: files. - The command is executed directly where possible. Assis- - tance by the shell (/bin/sh on UNIX systems) is used only - when the command contains shell magic characters, or when + The command is executed directly where possible. Assis- + tance by the shell (/bin/sh on UNIX systems) is used only + when the command contains shell magic characters, or when the command invokes a shell built-in command. - A limited amount of command output (standard output and - standard error) is captured for inclusion with non-deliv- - ery status reports. A command is forcibly terminated if - it does not complete within command_time_limit seconds. - Command exit status codes are expected to follow the con- + A limited amount of command output (standard output and + standard error) is captured for inclusion with non-deliv- + ery status reports. A command is forcibly terminated if + it does not complete within command_time_limit seconds. + Command exit status codes are expected to follow the con- ventions defined in <sysexits.h>. - A limited amount of message context is exported via envi- - ronment variables. Characters that may have special mean- + A limited amount of message context is exported via envi- + ronment variables. Characters that may have special mean- ing to the shell are replaced by underscores. The list of acceptable characters is specified with the command_expan- sion_filter configuration parameter. @@ -175,10 +176,11 @@ LOCAL(8) LOCAL(8) The current working directory is the mail queue directory. The local daemon prepends a "From sender time_stamp" enve- - lope header to each message, prepends an optional Deliv- - ered-To: header with the recipient envelope address, - prepends a Return-Path: header with the sender envelope - address, and appends no empty line. + lope header to each message, prepends an X-Original-To: + header with the recipient address as given to Postfix, + prepends an optional Delivered-To: header with the recipi- + ent envelope address, prepends a Return-Path: header with + the sender envelope address, and appends no empty line. EXTERNAL FILE DELIVERY 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 local dae- mon prepends a "From sender time_stamp" envelope header to - each message, prepends an optional Delivered-To: header - with the recipient envelope address, prepends a > charac- - ter to lines beginning with "From ", and appends an empty - line. The envelope sender address is available in the - Return-Path: header. When the destination is a regular - file, it is locked for exclusive access while delivery is - in progress. In case of problems, an attempt is made to - truncate a regular file to its original length. + each message, prepends an X-Original-To: header with the + recipient address as given to Postfix, prepends an + optional Delivered-To: header with the recipient envelope + address, prepends a > character to lines beginning with + "From ", and appends an empty line. The envelope sender + address is available in the Return-Path: header. When the + destination is a regular file, it is locked for exclusive + 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 maildir delivery, the local daemon prepends an optional Delivered-To: header with the envelope recipi- diff --git a/postfix/html/pipe.8.html b/postfix/html/pipe.8.html index bb6a6561c..16ef33cca 100644 --- a/postfix/html/pipe.8.html +++ b/postfix/html/pipe.8.html @@ -62,8 +62,8 @@ PIPE(8) PIPE(8) expected by, for example, UUCP software. O Prepend an "X-Original-To: recipient" mes- - sage header with the original envelope - recipient address. Note: for this to work, + sage header with the recipient address as + given to Postfix. Note: for this to work, the transport_destination_recipient_limit must be 1. diff --git a/postfix/man/man8/local.8 b/postfix/man/man8/local.8 index 13c2b761d..5e044b6da 100644 --- a/postfix/man/man8/local.8 +++ b/postfix/man/man8/local.8 @@ -121,6 +121,8 @@ for recipients that are not found in the UNIX passwd database. In the case of UNIX-style mailbox delivery, the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR" 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 with the envelope recipient address, prepends a \fBReturn-Path:\fR 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" 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 with the recipient envelope address, prepends a \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, the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR" 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 with the recipient envelope address, prepends a \fB>\fR character to lines beginning with "\fBFrom \fR", and appends an diff --git a/postfix/man/man8/pipe.8 b/postfix/man/man8/pipe.8 index c93705999..ff49720d1 100644 --- a/postfix/man/man8/pipe.8 +++ b/postfix/man/man8/pipe.8 @@ -68,8 +68,8 @@ the message content. This is expected by, for example, \fBUUCP\fR software. .IP \fBO\fR Prepend an "\fBX-Original-To: \fIrecipient\fR" message header -with the original envelope recipient address. Note: for this to work, -the \fItransport\fB_destination_recipient_limit\fR must be 1. +with the recipient address as given to Postfix. Note: for this to +work, the \fItransport\fB_destination_recipient_limit\fR must be 1. .IP \fBR\fR Prepend a \fBReturn-Path:\fR message header with the envelope sender address. diff --git a/postfix/src/dns/dns_lookup.c b/postfix/src/dns/dns_lookup.c index b1a17fba5..823eaa44f 100644 --- a/postfix/src/dns/dns_lookup.c +++ b/postfix/src/dns/dns_lookup.c @@ -503,7 +503,19 @@ int dns_lookup(const char *name, unsigned type, unsigned flags, */ if (!valid_hostname(name, DONT_GRIPE)) { 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); return (DNS_NOTFOUND); } diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index b704e9b34..cedea784f 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change the patchlevel and the release date. Snapshots change the * 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 DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE diff --git a/postfix/src/local/command.c b/postfix/src/local/command.c index 8a86ac63a..9cbd1f706 100644 --- a/postfix/src/local/command.c +++ b/postfix/src/local/command.c @@ -120,7 +120,8 @@ int deliver_command(LOCAL_STATE state, USER_ATTR usr_attr, const char *comma /* * 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) 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_COPY_FLAGS, copy_flags, 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_TIME_LIMIT, var_command_maxtime, PIPE_CMD_ENV, env->argv, diff --git a/postfix/src/local/local.c b/postfix/src/local/local.c index e9d5db6bd..187a932e1 100644 --- a/postfix/src/local/local.c +++ b/postfix/src/local/local.c @@ -109,6 +109,8 @@ /* In the case of UNIX-style mailbox delivery, /* the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR" /* 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 /* with the envelope recipient address, prepends a \fBReturn-Path:\fR /* 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" /* 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 with the recipient envelope address, prepends a /* \fBReturn-Path:\fR header with the sender envelope address, @@ -189,6 +193,8 @@ /* In the case of UNIX-style mailbox delivery, /* the \fBlocal\fR daemon prepends a "\fBFrom \fIsender time_stamp\fR" /* 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 with the recipient envelope address, prepends a \fB>\fR /* character to lines beginning with "\fBFrom \fR", and appends an diff --git a/postfix/src/pipe/pipe.c b/postfix/src/pipe/pipe.c index 6332ee4f4..9cec20901 100644 --- a/postfix/src/pipe/pipe.c +++ b/postfix/src/pipe/pipe.c @@ -58,8 +58,8 @@ /* This is expected by, for example, \fBUUCP\fR software. /* .IP \fBO\fR /* Prepend an "\fBX-Original-To: \fIrecipient\fR" message header -/* with the original envelope recipient address. Note: for this to work, -/* the \fItransport\fB_destination_recipient_limit\fR must be 1. +/* with the recipient address as given to Postfix. Note: for this to +/* work, the \fItransport\fB_destination_recipient_limit\fR must be 1. /* .IP \fBR\fR /* Prepend a \fBReturn-Path:\fR message header with the envelope sender /* address.