]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-1.1.11-20021029
authorWietse Venema <wietse@porcupine.org>
Tue, 29 Oct 2002 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:28:22 +0000 (06:28 +0000)
postfix/HISTORY
postfix/html/local.8.html
postfix/html/pipe.8.html
postfix/man/man8/local.8
postfix/man/man8/pipe.8
postfix/src/dns/dns_lookup.c
postfix/src/global/mail_version.h
postfix/src/local/command.c
postfix/src/local/local.c
postfix/src/pipe/pipe.c

index 8d91a5f99b82024a0fe459da74f9207d554cf402..5091041ec59ac98d2f2416f1f8c11bb3557cb79f 100644 (file)
@@ -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.
index 801c4f09c01d78df49bb63dd214bf9b7c66fd092..2fd88869d00436935ac1adccfdbcdc6dd3463d39 100644 (file)
@@ -110,40 +110,41 @@ LOCAL(8)                                                 LOCAL(8)
 
        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
-       each message, prepends an  optional  <b>Delivered-To:</b>  header
-       with  the  envelope  recipient address, prepends a <b>Return-</b>
-       <b>Path:</b> header with the envelope sender address, prepends  a
-       &gt;  character  to lines beginning with "<b>From</b> ", 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 <b>X-Original-To:</b> header  with  the
+       recipient   address  as  given  to  Postfix,  prepends  an
+       optional <b>Delivered-To:</b> header with the envelope  recipient
+       address,  prepends a <b>Return-Path:</b> header with the envelope
+       sender address, prepends a &gt; character to lines  beginning
+       with  "<b>From</b>  ", 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 <b>maildir</b> delivery, the local daemon prepends
        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.
 
 <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
-       restricts  delivery to external commands. The default set-
-       ting (<b>alias,</b>  <b>forward</b>)  forbids  command  destinations  in
+       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-
+       ting  (<b>alias,</b>  <b>forward</b>)  forbids  command  destinations in
        <b>:include:</b> files.
 
-       The  command  is  executed directly where possible. Assis-
-       tance by the shell (<b>/bin/sh</b> 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 (<b>/bin/sh</b> 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 <b>command</b><i>_</i><b>time</b><i>_</i><b>limit</b> 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  <b>command</b><i>_</i><b>time</b><i>_</i><b>limit</b>  seconds.
+       Command  exit status codes are expected to follow the con-
        ventions defined in &lt;<b>sysexits.h</b>&gt;.
 
-       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 <b>command</b><i>_</i><b>expan-</b>
        <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 <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>
-       <b>ered-To:</b>  header  with  the  recipient  envelope  address,
-       prepends a <b>Return-Path:</b> header with  the  sender  envelope
-       address, and appends no empty line.
+       lope  header  to  each message, prepends an <b>X-Original-To:</b>
+       header with the recipient address  as  given  to  Postfix,
+       prepends an optional <b>Delivered-To:</b> header with the recipi-
+       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>
        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-
        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
-       with  the recipient envelope address, prepends a &gt; charac-
-       ter to lines beginning with "<b>From</b> ", and appends an  empty
-       line.   The  envelope  sender  address is available in the
-       <b>Return-Path:</b> 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 <b>X-Original-To:</b> header  with  the
+       recipient   address  as  given  to  Postfix,  prepends  an
+       optional <b>Delivered-To:</b> header with the recipient  envelope
+       address,  prepends  a  &gt; character to lines beginning with
+       "<b>From</b> ", and appends an empty line.  The  envelope  sender
+       address is available in the <b>Return-Path:</b> 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 <b>maildir</b> delivery, the local daemon prepends
        an optional <b>Delivered-To:</b> header with the envelope recipi-
index bb6a6561c91257629da93f8eeb3f173d18064625..16ef33cca2248afbdf3ca4e900adccff83d2c1f0 100644 (file)
@@ -62,8 +62,8 @@ PIPE(8)                                                   PIPE(8)
                      expected by, for example, <b>UUCP</b> software.
 
               <b>O</b>      Prepend  an  "<b>X-Original-To:</b> <i>recipient</i>" 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    <i>transport_</i><b>destination</b><i>_</i><b>recipient</b><i>_</i><b>limit</b>
                      must be 1.
 
index 13c2b761de3b718061a96d7c0af301739fbb2990..5e044b6daa3da04b1aa0fd170ea1ab508fea932b 100644 (file)
@@ -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
index c9370599941e2361dc758064c3ddc6d542595cf3..ff49720d11a11d7c2de3b6b8bc99f13502ceb8f7 100644 (file)
@@ -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.
index b1a17fba514aa81b31c87318396842f38bd4669b..823eaa44f4d37d390f2639425a836100b7c5cd6f 100644 (file)
@@ -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);
     }
index b704e9b342c646fa41bd05bd87d68d7eb12f183c..cedea784f930cfc6c4fd9ba888262468443442f0 100644 (file)
@@ -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
index 8a86ac63a0561f75bb04ac1d59fbeb6140175125..9cbd1f706ce271b72a6edf20c517942243aa1f45 100644 (file)
@@ -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,
index e9d5db6bdc4d811d10d8174657042593aa2adce7..187a932e1089e925e717feb64aa464130d60e30c 100644 (file)
 /*     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
 /*
 /*     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,
 /*     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
index 6332ee4f40780f1f67e3c2f82ebd7c3deac6a402..9cec20901f8a444f3b210c20b605bda0d4104899 100644 (file)
@@ -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.