Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/postfix import 19991231-pl07



details:   https://anonhg.NetBSD.org/src/rev/759c448a3ea5
branches:  trunk
changeset: 486116:759c448a3ea5
user:      perry <perry%NetBSD.org@localhost>
date:      Sat May 13 14:50:45 2000 +0000

description:
import 19991231-pl07

diffstat:

 gnu/dist/postfix/HISTORY                   |  43 ++++++++++++++++++++++++++++++
 gnu/dist/postfix/INSTALL.sh                |   1 +
 gnu/dist/postfix/RELEASE_NOTES             |   8 +++++
 gnu/dist/postfix/cleanup/cleanup.c         |   7 ++++-
 gnu/dist/postfix/cleanup/cleanup_message.c |   9 ++++++
 gnu/dist/postfix/global/mail_copy.c        |  10 ++++--
 gnu/dist/postfix/global/mail_params.h      |   7 ++++
 gnu/dist/postfix/global/mail_version.h     |   2 +-
 gnu/dist/postfix/html/cleanup.8.html       |  22 +++++++-------
 gnu/dist/postfix/man/man8/cleanup.8        |   5 ++-
 gnu/dist/postfix/smtpd/smtpd.c             |  17 +++--------
 gnu/dist/postfix/smtpd/smtpd_chat.c        |  13 +++++++-
 gnu/dist/postfix/trivial-rewrite/resolve.c |   8 +++--
 gnu/dist/postfix/util/dict_mysql.c         |  40 +++++++++++++++++----------
 gnu/dist/postfix/util/valid_hostname.c     |   8 ++++-
 gnu/dist/postfix/util/valid_hostname.in    |  10 ++++++
 gnu/dist/postfix/util/valid_hostname.ref   |  29 ++++++++++++++++++++
 17 files changed, 188 insertions(+), 51 deletions(-)

diffs (truncated from 564 to 300 lines):

diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/HISTORY
--- a/gnu/dist/postfix/HISTORY  Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/HISTORY  Sat May 13 14:50:45 2000 +0000
@@ -3670,3 +3670,46 @@
        be issued in an SMTP session (ex.: NOOP, VRFY, ETRN, RSET).
        Problem report by Michael Ju. Tokarev @ tls.msk.ru.  Files:
        global/mail_params.h, smtpd/smtpd.c.
+
+20000413
+
+       Bugfix: RFC 822 requires the presence of at least one
+       destination message header. The cleanup daemon now generates
+       a generic "To: undisclosed-recipients:;" message header
+       when no destination header is present.  The header content
+       is specified with the undisclosed_recipients_header parameter.
+       Problem pointed out by Geoff Gibbs, UK-Human Genome Mapping
+       Project-Resource Centre.
+
+20000416
+
+       Workaround: allow <(comment)> as SMTP MAIL FROM address.
+
+20000423
+
+       Bugfix: mail_copy() could prepend > or . in the middle of
+       long lines. Found by code inspection.
+
+20000505
+
+       Bugfix: the SMTP server now flushes unwritten output before
+       tarpit delays, to avoid protocol timeouts in pipelined
+       sessions when a client causes lots of errors. Found by
+       Lamont Jones, HP. File:  smtpd/smtpd_chat.c.
+
+20000510
+
+       Bugfix: configuration parameters for one mysql dictionary
+       would become default settings for the next one. File:
+       dict_mysql.c. This patch was merged into Postfix a while
+       back but apparently that Postfix version was nuked when
+       other parts were redesigned. Update by Scott Cotton.
+
+       Bugfix: some Postfix delivery agents would abort on addresses
+       of the form `stuff@.' which could be generated only locally.
+       Found by Patrik Rak. File:  trivial-rewrite/resolve.c.
+
+20000511
+
+       Bugfix: Postfix would incorrectly reject domain names with
+       adjacent - characters. File: util/valid_hostname.c.
diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/INSTALL.sh
--- a/gnu/dist/postfix/INSTALL.sh       Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/INSTALL.sh       Sat May 13 14:50:45 2000 +0000
@@ -332,6 +332,7 @@
      for file in man?/*
      do
         (test -f $MANPAGES/$file && cmp -s $file $MANPAGES/$file) || {
+            echo Updating $MANPAGES/$file...
             rm -f $MANPAGES/$file
             cp $file $MANPAGES/$file || exit 1
             chmod 644 $MANPAGES/$file || exit 1
diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/RELEASE_NOTES
--- a/gnu/dist/postfix/RELEASE_NOTES    Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/RELEASE_NOTES    Sat May 13 14:50:45 2000 +0000
@@ -1,3 +1,11 @@
+Incompatible changes with postfix-19991231-pl07:
+================================================
+
+As required by RFC 822, Postfix now inserts a generic destination
+message header when no destination header is present.  The text is
+specified via the undisclosed_recipients_header configuration
+parameter (default:  "To: undisclosed-recipients:;").
+
 Incompatible changes with postfix-19991231-pl06:
 ================================================
 
diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/cleanup/cleanup.c
--- a/gnu/dist/postfix/cleanup/cleanup.c        Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/cleanup/cleanup.c        Sat May 13 14:50:45 2000 +0000
@@ -13,7 +13,7 @@
 /*     The \fBcleanup\fR daemon always performs the following transformations:
 /* .IP \(bu
 /*     Insert missing message headers: (\fBResent-\fR) \fBFrom:\fR,
-/*     \fBMessage-Id:\fR, and \fBDate:\fR.
+/*     \fBTo:\fR, \fBMessage-Id:\fR, and \fBDate:\fR.
 /* .IP \(bu
 /*     Extract envelope recipient addresses from (\fBResent-\fR) \fBTo:\fR,
 /*     \fBCc:\fR and \fBBcc:\fR message headers when no recipients are
@@ -67,6 +67,9 @@
 /*     Address to send a copy of each message that enters the system.
 /* .IP \fBhopcount_limit\fR
 /*     Limit the number of \fBReceived:\fR message headers.
+/* .IP \fBrecipients_witheld_header\fR
+/*     The header line that is inserted when no recipients were
+/*     specified in (Resent-)To: or (Resent-)Cc: message headers.
 /* .SH "Address transformations"
 /* .ad
 /* .fi
@@ -177,6 +180,7 @@
 int     var_delay_warn_time;           /* delay that triggers warning */
 char   *var_prop_extension;            /* propagate unmatched extension */
 char   *var_always_bcc;
+char   *var_rcpt_witheld;              /* recipients not disclosed */
 
  /*
   * Mappings.
@@ -471,6 +475,7 @@
        VAR_HEADER_CHECKS, DEF_HEADER_CHECKS, &var_header_checks, 0, 0,
        VAR_PROP_EXTENSION, DEF_PROP_EXTENSION, &var_prop_extension, 0, 0,
        VAR_ALWAYS_BCC, DEF_ALWAYS_BCC, &var_always_bcc, 0, 0,
+       VAR_RCPT_WITHELD, DEF_RCPT_WITHELD, &var_rcpt_witheld, 1, 0,
        0,
     };
 
diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/cleanup/cleanup_message.c
--- a/gnu/dist/postfix/cleanup/cleanup_message.c        Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/cleanup/cleanup_message.c        Sat May 13 14:50:45 2000 +0000
@@ -350,6 +350,15 @@
                               cleanup_resent, vstring_str(cleanup_temp1));
        }
     }
+
+    /*
+     * Add a missing destination header.
+     */
+#define VISIBLE_RCPT    ((1 << HDR_TO) | (1 << HDR_RESENT_TO) | \
+                           (1 << HDR_CC) | (1 << HDR_RESENT_CC))
+
+    if ((cleanup_headers_seen & VISIBLE_RCPT) == 0)
+       cleanup_out_format(REC_TYPE_NORM, "%s", var_rcpt_witheld);
 }
 
 /* cleanup_message - process message content segment */
diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/global/mail_copy.c
--- a/gnu/dist/postfix/global/mail_copy.c       Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/global/mail_copy.c       Sat May 13 14:50:45 2000 +0000
@@ -166,10 +166,12 @@
        if (type != REC_TYPE_NORM && type != REC_TYPE_CONT)
            break;
        bp = vstring_str(buf);
-       if ((flags & MAIL_COPY_QUOTE) && *bp == 'F' && !strncmp(bp, "From ", 5))
-           VSTREAM_PUTC('>', dst);
-       if ((flags & MAIL_COPY_DOT) && *bp == '.')
-           VSTREAM_PUTC('.', dst);
+       if (prev_type == REC_TYPE_NORM) {
+           if ((flags & MAIL_COPY_QUOTE) && *bp == 'F' && !strncmp(bp, "From ", 5))
+               VSTREAM_PUTC('>', dst);
+           if ((flags & MAIL_COPY_DOT) && *bp == '.')
+               VSTREAM_PUTC('.', dst);
+       }
        if (VSTRING_LEN(buf) && VSTREAM_FWRITE_BUF(dst, buf) != VSTRING_LEN(buf))
            break;
        if (type == REC_TYPE_NORM && VSTREAM_PUTC('\n', dst) == VSTREAM_EOF)
diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/global/mail_params.h
--- a/gnu/dist/postfix/global/mail_params.h     Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/global/mail_params.h     Sat May 13 14:50:45 2000 +0000
@@ -215,6 +215,13 @@
 extern char *var_always_bcc;
 
  /*
+  * What to put in the To: header when no recipients were disclosed.
+  */
+#define VAR_RCPT_WITHELD       "undisclosed_recipients_header"
+#define DEF_RCPT_WITHELD       "To: undisclosed-recipients:;"  
+extern char *var_rcpt_witheld;
+
+ /*
   * Standards violation: allow/permit RFC 822-style addresses in SMTP
   * commands.
   */
diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/global/mail_version.h
--- a/gnu/dist/postfix/global/mail_version.h    Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/global/mail_version.h    Sat May 13 14:50:45 2000 +0000
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Postfix-19991231-pl06"
+#define DEF_MAIL_VERSION       "Postfix-19991231-pl07"
 extern char *var_mail_version;
 
 /* LICENSE
diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/html/cleanup.8.html
--- a/gnu/dist/postfix/html/cleanup.8.html      Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/html/cleanup.8.html      Sat May 13 14:50:45 2000 +0000
@@ -20,7 +20,7 @@
        mations:
 
        <b>o</b>      Insert missing message  headers:  (<b>Resent-</b>)  <b>From:</b>,
-              <b>Message-Id:</b>, and <b>Date:</b>.
+              <b>To:</b>, <b>Message-Id:</b>, and <b>Date:</b>.
 
        <b>o</b>      Extract envelope recipient addresses from (<b>Resent-</b>)
               <b>To:</b>, <b>Cc:</b> and <b>Bcc:</b> message headers when  no  recipi-
@@ -92,6 +92,11 @@
        <b>hopcount</b><i>_</i><b>limit</b>
               Limit the number of <b>Received:</b> message headers.
 
+       <b>recipients</b><i>_</i><b>witheld</b><i>_</i><b>header</b>
+              The header line that is inserted when no recipients
+              were specified in (Resent-)To: or (Resent-)Cc: mes-
+              sage headers.
+
 <b>Address</b> <b>transformations</b>
        <b>empty</b><i>_</i><b>address</b><i>_</i><b>recipient</b>
               The  destination  for  undeliverable  mail from &lt;&gt;.
@@ -120,11 +125,6 @@
 
        <b>virtual</b><i>_</i><b>maps</b>
               Address mapping lookup table for envelope recipient
-              addresses.
-
-<b>Resource</b> <b>controls</b>
-       <b>duplicate</b><i>_</i><b>filter</b><i>_</i><b>limit</b>
-              Limit  the  number  of envelope recipients that are
 
 
 
@@ -137,6 +137,11 @@
 CLEANUP(8)                                             CLEANUP(8)
 
 
+              addresses.
+
+<b>Resource</b> <b>controls</b>
+       <b>duplicate</b><i>_</i><b>filter</b><i>_</i><b>limit</b>
+              Limit  the  number  of envelope recipients that are
               remembered.
 
        <b>header</b><i>_</i><b>size</b><i>_</i><b>limit</b>
@@ -189,11 +194,6 @@
 
 
 
-
-
-
-
-
                                                                 3
 
 
diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/man/man8/cleanup.8
--- a/gnu/dist/postfix/man/man8/cleanup.8       Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/man/man8/cleanup.8       Sat May 13 14:50:45 2000 +0000
@@ -19,7 +19,7 @@
 The \fBcleanup\fR daemon always performs the following transformations:
 .IP \(bu
 Insert missing message headers: (\fBResent-\fR) \fBFrom:\fR,
-\fBMessage-Id:\fR, and \fBDate:\fR.
+\fBTo:\fR, \fBMessage-Id:\fR, and \fBDate:\fR.
 .IP \(bu
 Extract envelope recipient addresses from (\fBResent-\fR) \fBTo:\fR,
 \fBCc:\fR and \fBBcc:\fR message headers when no recipients are
@@ -81,6 +81,9 @@
 Address to send a copy of each message that enters the system.
 .IP \fBhopcount_limit\fR
 Limit the number of \fBReceived:\fR message headers.
+.IP \fBrecipients_witheld_header\fR
+The header line that is inserted when no recipients were
+specified in (Resent-)To: or (Resent-)Cc: message headers.
 .SH "Address transformations"
 .ad
 .fi
diff -r 99cf9cb6bc29 -r 759c448a3ea5 gnu/dist/postfix/smtpd/smtpd.c
--- a/gnu/dist/postfix/smtpd/smtpd.c    Sat May 13 14:43:11 2000 +0000
+++ b/gnu/dist/postfix/smtpd/smtpd.c    Sat May 13 14:50:45 2000 +0000
@@ -479,15 +479,6 @@
 #define PERMIT_EMPTY_ADDR      1
 #define REJECT_EMPTY_ADDR      0
 
-    if (allow_empty_addr && strcmp(STR(arg->vstrval), "<>") == 0) {
-       if (msg_verbose)
-           msg_info("%s: empty address", myname);
-       VSTRING_RESET(arg->vstrval);
-       VSTRING_TERMINATE(arg->vstrval);
-       arg->strval = STR(arg->vstrval);
-       return (0);
-    }
-
     /*
      * Some mailers send RFC822-style address forms (with comments and such)
      * in SMTP envelopes. We cannot blame users for this: the blame is with
@@ -519,9 +510,11 @@
     }
 
     /*
-     * Report trouble. Log a warning only if we are going to sleep+reject.
+     * Report trouble. Log a warning only if we are going to sleep+reject so
+     * that attackers can't flood our logfiles.
      */
-    if (naddr != 1
+    if ((naddr < 1 && !allow_empty_addr)
+       || naddr > 1
        || (strict_rfc821 && (non_addr || *STR(arg->vstrval) != '<'))) {
        msg_warn("Illegal address syntax from %s in %s command: %s",
                 state->namaddr, state->where, STR(arg->vstrval));
@@ -537,7 +530,7 @@
     if (addr)
        tok822_internalize(arg->vstrval, addr->head, TOK822_STR_DEFL);



Home | Main Index | Thread Index | Old Index