]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.0.12-20030621
authorWietse Venema <wietse@porcupine.org>
Sat, 21 Jun 2003 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:28:57 +0000 (06:28 +0000)
postfix/HISTORY
postfix/src/global/mail_version.h
postfix/src/master/master_ent.c
postfix/src/postcat/postcat.c
postfix/src/sendmail/sendmail.c
postfix/src/smtpd/smtpd.c

index de58eebe7c402947cefdd662bd57ef9889f58d19..0984941cc9823ca3db4e7bd06a8a8ad1dba3390f 100644 (file)
@@ -8189,8 +8189,8 @@ Apologies for any names omitted.
        of mail probes, so it will no longer block for in_flow_delay
        seconds when mail arrives faster than it is delivered.
        Still need to make mail_stream_finish() asynchronous in
-       order to avoid blocking for trigger_timeout seconds when the
-       queue manager is overwhelmed.  Files:  global/post_mail.c,
+       order to avoid blocking for trigger_timeout seconds when
+       the queue manager is overwhelmed.  Files:  global/post_mail.c,
        verify/verify.c.
 
        Bugfix: removed extraneous sleep() after the last attempt
@@ -8201,6 +8201,22 @@ Apologies for any names omitted.
        Bugfix: the stricter postdrop input filter broke "sendmail
        -bs". Found by Lutz Jaenicke. File: smtpd/smtpd.c.
 
+20030618
+
+       After "postfix reload", the master daemon now warns when
+       inet_interfaces has changed, and ignores the change, instead
+       of passing incorrect information to the smtp server. File:
+       master/master_ent.c.
+
+20030620
+
+       Bugfix: after the last change to postdrop, postcat no longer
+       recognized maildrop files as valid. File: postcat/postcat.c.
+
+       Bugfix: after moving "sendmail -t" address extraction to
+       sendmail, "-t" broke multi-line recipient headers.  Victor
+       Duchovni, Morgan Stanley. File: sendmail/sendmail.c.
+
 Open problems:
 
        Low: smtp-source may block when sending large test messages.
index bedf937ed89af7d2469760cd6fdb999c300b8d49..7cd711ca6f9461e76112bfc7a5e5df1dfa2bb675 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      "20030611"
+#define MAIL_RELEASE_DATE      "20030621"
 
 #define VAR_MAIL_VERSION       "mail_version"
 #define DEF_MAIL_VERSION       "2.0.12-" MAIL_RELEASE_DATE
index cccaa8ea15681f9be401cb0deb61e0457577846d..11ff16cc94bcd161cea417724155fd8c1911b305 100644 (file)
@@ -234,10 +234,26 @@ MASTER_SERV *get_master_ent()
     int     n;
     char   *bufp;
     char   *atmp;
+    static char *saved_interfaces = 0;
 
     if (master_fp == 0)
        msg_panic("get_master_ent: config file not open");
 
+    /*
+     * XXX We cannot change the inet_interfaces setting for a running master
+     * process. Listening sockets are inherited by child processes so that
+     * closing and reopening those sockets in the master does not work.
+     * 
+     * Another problem is that library routines still cache results that are
+     * based on the old inet_interfaces setting. It is too much trouble to
+     * recompute everything.
+     * 
+     * In order to keep our data structures consistent we ignore changes in
+     * inet_interfaces settings, and issue a warning instead.
+     */
+    if (saved_interfaces == 0)
+       saved_interfaces = mystrdup(var_inet_interfaces);
+
     /*
      * Skip blank lines and comment lines.
      */
@@ -274,6 +290,12 @@ MASTER_SERV *get_master_ent()
 
     transport = get_str_ent(&bufp, "transport type", (char *) 0);
     if (STR_SAME(transport, MASTER_XPORT_NAME_INET)) {
+       if (!STR_SAME(saved_interfaces, var_inet_interfaces)) {
+           msg_warn("service %s: ignoring %s change",
+                    name, VAR_INET_INTERFACES);
+           msg_warn("to change %s, stop and start Postfix",
+                    VAR_INET_INTERFACES);
+       }
        serv->type = MASTER_SERV_TYPE_INET;
        atmp = inet_parse(name, &host, &port);
        if (*host) {
@@ -284,7 +306,7 @@ MASTER_SERV *get_master_ent()
            inet_addr_host(MASTER_INET_ADDRLIST(serv), host);
            inet_addr_list_uniq(MASTER_INET_ADDRLIST(serv));
            serv->listen_fd_count = MASTER_INET_ADDRLIST(serv)->used;
-       } else if (strcasecmp(var_inet_interfaces, DEF_INET_INTERFACES) == 0) {
+       } else if (strcasecmp(saved_interfaces, DEF_INET_INTERFACES) == 0) {
            MASTER_INET_ADDRLIST(serv) = 0;     /* wild-card */
            serv->listen_fd_count = 1;
        } else {
index 4f6c6c482016e6f6d60f84e59ee90cf3dbf16102..3e19547b57bc38cbe74fe6c76a8c323cc857b92a 100644 (file)
@@ -57,6 +57,7 @@
 #include <unistd.h>
 #include <time.h>
 #include <fcntl.h>
+#include <string.h>
 
 /* Utility library. */
 
@@ -97,7 +98,7 @@ static void postcat(VSTREAM *fp, VSTRING *buffer)
      * See if this is a plausible file.
      */
     if ((ch = VSTREAM_GETC(fp)) != VSTREAM_EOF) {
-       if (ch != REC_TYPE_TIME && ch != REC_TYPE_SIZE) {
+       if (!strchr(REC_TYPE_POST_ENVELOPE, ch)) {
            msg_warn("%s: input is not a valid queue file", VSTREAM_PATH(fp));
            return;
        }
index 6b9ec626260932716e26f24c6a9d405fc905abb6..a59957c01363231826808379bce29064fd2279e0 100644 (file)
@@ -398,24 +398,14 @@ static void output_header(void *context, int header_class,
     char   *line;
     char   *next_line;
 
-    /*
-     * Pipe the unmodified message header through the header line folding
-     * routine.
-     */
-    for (line = start = STR(buf); line; line = next_line) {
-       next_line = split_at(line, '\n');
-       output_text(context, REC_TYPE_NORM, line, next_line ?
-                   next_line - line - 1 : strlen(line), offset);
-    }
-
     /*
      * Parse the header line, and save copies of recipient addresses in the
      * appropriate place.
      */
     if (header_class == MIME_HDR_PRIMARY
        && header_info
-       && header_info->flags & HDR_OPT_RECIP
-       && header_info->flags & HDR_OPT_EXTRACT
+       && (header_info->flags & HDR_OPT_RECIP)
+       && (header_info->flags & HDR_OPT_EXTRACT)
        && (state->resent == 0 || (header_info->flags & HDR_OPT_RR))) {
        if (header_info->flags & HDR_OPT_RR) {
            rcpt = state->resent_recip;
@@ -432,6 +422,16 @@ static void output_header(void *context, int header_class,
        myfree((char *) addr_list);
        tok822_free_tree(tree);
     }
+
+    /*
+     * Pipe the unmodified message header through the header line folding
+     * routine.
+     */
+    for (line = start = STR(buf); line; line = next_line) {
+       next_line = split_at(line, '\n');
+       output_text(context, REC_TYPE_NORM, line, next_line ?
+                   next_line - line - 1 : strlen(line), offset);
+    }
 }
 
 /* enqueue - post one message */
index 797e6d2cca347d56d80fb56d93de5d526b96ec6d..054817accd5e687fa59e341ac2035188199e8196 100644 (file)
@@ -720,7 +720,8 @@ static char *extract_addr(SMTPD_STATE *state, SMTPD_TOKEN *arg,
      * Report trouble. Log a warning only if we are going to sleep+reject so
      * that attackers can't flood our logfiles.
      */
-    if ((arg->strval[0] == 0 && !allow_empty_addr) || arg->strval[0] == '@') {
+    if ((arg->strval[0] == 0 && !allow_empty_addr)
+       || (strict_rfc821 && arg->strval[0] == '@')) {
        msg_warn("Illegal address syntax from %s in %s command: %s",
                 state->namaddr, state->where, STR(arg->vstrval));
        err = "501 Bad address syntax";