]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.0.17 v2.0.17
authorWietse Venema <wietse@porcupine.org>
Mon, 19 Jan 2004 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 15:51:50 +0000 (15:51 +0000)
18 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/conf/postfix-script
postfix/conf/sample-filter.cf
postfix/conf/sample-smtpd.cf
postfix/makedefs
postfix/src/cleanup/cleanup_out_recipient.c
postfix/src/dns/dns_lookup.c
postfix/src/global/mail_queue.c
postfix/src/global/mail_version.h
postfix/src/master/master_ent.c
postfix/src/master/master_sig.c
postfix/src/nqmgr/qmgr_deliver.c
postfix/src/qmgr/qmgr_deliver.c
postfix/src/util/match_ops.c
postfix/src/util/msg_syslog.c
postfix/src/util/sys_defs.h
postfix/src/util/vstring_vstream.c

index 80eaa0dca3376303cd912645509c6098402cd8ec..7597d702daedbb1acaebd7842f31ea845cf879f6 100644 (file)
@@ -7899,6 +7899,63 @@ Apologies for any names omitted.
 
        Safety: set-gid commands don't trust TZ.  File: msg_syslog.c.
 
+20031027
+
+       Portability: MacOS X Bind8 compatibility. File: makedefs.
+
+20031110
+
+       Cleanup: don't report that $queue_directory/etc/filename
+       differs from /etc/filename when /etc/filename does not
+       exist.  File: conf/postfix-script.
+
+20031126
+
+       Bugfix: "panic: mymalloc: requested length 0" when master.cf
+       specified an invalid host name or address.  Postfix now
+       logs more specific information. File:  master/master_ent.c.
+       Reported by several people.
+
+20031215
+
+       Safety: updated mail_queue_id_ok() for long fast flush
+       logfile names. File: global/mail_queue.c.
+
+       Robustness: save and restore the resolver _res.options
+       settings before and after DNS lookup, to avoid surprises
+       in third-party code. This may eliminate some "localhost
+       not found" problems. File: dns/dns_lookup.c.
+
+20031222
+
+       Cleanup: shaved half the worst-case bits off the cleanup
+       duplicate address filter footprint. After discussion with
+       Victor Duchovni. File: cleanup/cleanup_out_recipient.c.
+
+20031223
+
+       Bugfix: restore errno after write failure in SIGCHLD handler.
+       Leandro Santi. File: master/master_sig.c.
+
+20040104
+
+       Workaround: MacOSX dumps core on the 20030913 TZ censoring
+       code. We explictly set TZ=UTC, which will produce incorrect
+       results when "mailq" formatting is moved from the showq
+       daemon to the postqueue command.   File: msg_syslog.c.
+
+       Bugfix: vstring_get() etc. now return VSTREAM_EOF when they
+       terminate prematurely, instead of returning the last
+       character stored.  This avoids mis-leading warnings. File:
+       global/vstring_vstream.c.
+
+20040115
+
+       Performance: allow delivery concurrency to increase even
+       while mail is deferred, as long as the delivery agent does
+       not report really serious trouble with the destination.
+       Files:  *qmgr/qmgr_deliver.c.
+
 Open problems:
 
        Doc: mention the proxy_interfaces parameter everywhere the
index 731f1a7117a300cf48645f94a0e487a431c874e2..01a5064e61827304e0d4d0b337d5990ff42d3249 100644 (file)
@@ -210,7 +210,10 @@ more flexible "reject_rbl_client" feature instead.
 
 [Obsolete 20021209] The "check_relay_domains" restriction is going
 away.  The SMTP server logs a warning and suggests using the more
-robust "reject_unauth_destination" instead.
+robust "reject_unauth_destination" instead. This means that Postfix
+by default no longer grants relay permissions on the basis of the
+client hostname, and that relay clients must be authorized via
+other means such as permit_mynetworks.
 
 [Obsolete 20020917] In regexp lookup tables, the form /pattern1/!/pattern2/
 is going away. Use the cleaner and more flexible "if !/pattern2/..endif"
@@ -330,7 +333,7 @@ mail relay traffic from outbound traffic. This eliminates a problem
 where inbound mail deliveries could become resource starved in the
 presence of a high volume of outbound mail.
 
-[Feature 20021013] The body_checks_max_size parameter limits the
+[Feature 20021013] The body_checks_size_limit parameter limits the
 amount of text per message body segment (or attachment, if you
 prefer to use that term) that is subjected to body_checks inspection.
 The default limit is 50 kbytes. This speeds up the processing of
@@ -483,7 +486,8 @@ or html/uce.html for details.
 IP address blacklisting. Based on code by LaMont Jones.  The old
 "reject_maps_rbl" is now implemented as a wrapper around the
 reject_rbl_client code, and logs a warning that "reject_maps_rbl"
-is going away.
+is going away. To upgrade, specify "reject_rbl_client domainname"
+once for each domain name that is listed in maps_rbl_domains.
 
 [Feature 20020923] "reject_rhsbl_sender rbl.domain.tld" for sender
 domain blacklisting. Also: reject_rhsbl_client and reject_rhsbl_recipient
@@ -741,7 +745,7 @@ mime_header_checks (for MIME headers), and nested_header_checks
 (for headers of attached email messages except MIME headers).  By
 default, all headers are matched with header_checks.
 
-[Feature 20021013] The body_checks_max_size parameter limits the
+[Feature 20021013] The body_checks_size_limit parameter limits the
 amount of text per message body segment (or attachment, if you
 prefer to use that term) that is subjected to body_checks inspection.
 The default limit is 50 kbytes. This speeds up the processing of
index 036c8b60f0119f1da5de9638c4e8bb1f520d9c6f..72cd2c08b01564b4af36af2d9c04ee5e90a3c17c 100644 (file)
@@ -200,8 +200,10 @@ check)
        do
                test -d $dir && find $dir -type f -print | while read path
                do
-                       cmp -s $path /$path || 
-                           $WARN $queue_directory/$path and /$path differ
+                       test -e /$path && {
+                           cmp -s $path /$path || 
+                               $WARN $queue_directory/$path and /$path differ
+                       }
                done
        done
 
index ccc56fa64531c42cfaa0a1c1e2cf3d5d9f33a6f5..d037e0e01fad2e9a64692eb8b0984af3ea14157f 100644 (file)
@@ -159,11 +159,11 @@ nested_header_checks = $header_checks
 #
 body_checks = regexp:/etc/postfix/body_checks
 
-# The body_checks_max_size parameter controls how much text in a
+# The body_checks_size_limit parameter controls how much text in a
 # message body segment (or attachment, if you prefer to use that
 # term) is subjected to body_checks inspection.
 # 
 # By default, only the first 50 kbytes of a message body segment are
 # inspected with body_checks patterns.
 # 
-body_checks_max_size = 51200
+body_checks_size_limit = 51200
index 2f05ba7d92c21b3d57430747c589fb414dcc0785..c719f2946995b2483de80a90048aadbbf4621213 100644 (file)
@@ -396,7 +396,7 @@ smtpd_sender_restrictions =
 #        $virtual_alias_domains, or $virtual_mailbox_domains.
 #      - to destinations matching $relay_domains or subdomain thereof,
 #        except for addresses with sender-specified routing.
-#   reject_unauth_destination: reject mail unless it is sent
+#  *reject_unauth_destination: reject mail unless it is sent
 #      - to destinations matching $inet_interfaces, $mydestination,
 #        $virtual_alias_domains, or $virtual_mailbox_domains.
 #      - to destinations matching $relay_domains or subdomain thereof,
index 0531121f61334edbcdee546d27989f46764727fb..0827f00e3c2b8853c875c7af039c2bb1ea4c42bc 100644 (file)
@@ -251,14 +251,18 @@ ReliantUNIX-?.5.43) SYSTYPE=ReliantUnix543
                SYSLIBS="-lresolv -lsocket -lnsl"
                ;;
 Rhapsody.5*|Darwin.*)
-               SYSTYPE=RHAPSODY5
+               SYSTYPE=MACOSX
                # Use the native compiler by default
                : ${CC=cc}
-               AWK=gawk
                case $RELEASE in
-                1.[0-3]) ;;
+                1.[0-3]) AWK=gawk
+                         ;;
+                [2-6].*) AWK=awk
+                         SYSLIBS=-flat_namespace
+                         ;;
                       *) AWK=awk
                          SYSLIBS=-flat_namespace
+                         CCARGS="$CCARGS -DBIND_8_COMPAT -DNO_NETINFO"
                          ;;
                esac
                ;;
index 97129487edc0599d4a130b732fdfb2764d75649d..e610349bf1bbee36ddd43b40f31b3a955e8747bc 100644 (file)
@@ -73,8 +73,11 @@ void    cleanup_out_recipient(CLEANUP_STATE *state, const char *orcpt,
      * onto the same mailbox. The recipient will use our original recipient
      * message header to figure things out.
      */
+#define STREQ(x, y) (strcmp((x), (y)) == 0)
+
     if (cleanup_virt_alias_maps == 0) {
-       if (been_here(state->dups, "%s\n%s", orcpt, recip) == 0) {
+       if ((STREQ(orcpt, recip) ? been_here(state->dups, "%s", orcpt) :
+            been_here(state->dups, "%s\n%s", orcpt, recip)) == 0) {
            cleanup_out_string(state, REC_TYPE_ORCP, orcpt);
            cleanup_out_string(state, REC_TYPE_RCPT, recip);
            state->rcpt_count++;
@@ -83,7 +86,8 @@ void    cleanup_out_recipient(CLEANUP_STATE *state, const char *orcpt,
        argv = cleanup_map1n_internal(state, recip, cleanup_virt_alias_maps,
                                  cleanup_ext_prop_mask & EXT_PROP_VIRTUAL);
        for (cpp = argv->argv; *cpp; cpp++) {
-           if (been_here(state->dups, "%s\n%s", orcpt, *cpp) == 0) {
+           if ((STREQ(orcpt, *cpp) ? been_here(state->dups, "%s", orcpt) :
+                been_here(state->dups, "%s\n%s", orcpt, *cpp)) == 0) {
                cleanup_out_string(state, REC_TYPE_ORCP, orcpt);
                cleanup_out_string(state, REC_TYPE_RCPT, *cpp);
                state->rcpt_count++;
index 4ff4fe2bd50f422492c65fdbe17c940e58dcf86f..81a1dda734b1cbf28a6979b864d63fe20cf88052 100644 (file)
@@ -141,6 +141,7 @@ static int dns_query(const char *name, int type, int flags,
 {
     HEADER *reply_header;
     int     len;
+    unsigned long saved_options = _res.options;
 
     /*
      * Initialize the name service.
@@ -167,6 +168,7 @@ static int dns_query(const char *name, int type, int flags,
      * only if the name server told us so.
      */
     len = res_search((char *) name, C_IN, type, reply->buf, sizeof(reply->buf));
+    _res.options = saved_options;
     if (len < 0) {
        if (why)
            vstring_sprintf(why, "Name service error for name=%s type=%s: %s",
index bb00522fc112d1de14bf70de3aa4cb8cdfc3204b..f88a6c1a70e320b933281c85cc5549e354b2ce98 100644 (file)
@@ -285,33 +285,16 @@ int     mail_queue_id_ok(const char *queue_id)
 {
     const char *cp;
 
-    if (*queue_id == 0 || strlen(queue_id) > 100)
+    if (*queue_id == 0 || strlen(queue_id) > VALID_HOSTNAME_LEN)
        return (0);
 
     /*
-     * OK if in in time+inum form.
+     * OK if in time+inum form or in host_domain_tld form.
      */
-    for (cp = queue_id; /* void */ ; cp++) {
-       if (*cp == 0)
-           return (1);
-       if (!ISALNUM(*cp))
-           break;
-    }
-
-    /*
-     * BAD if in time.pid form.
-     */
-    for (cp = queue_id; /* void */ ; cp++) {
-       if (*cp == 0)
+    for (cp = queue_id; *cp; cp++)
+       if (!ISALNUM(*cp) && *cp != '_')
            return (0);
-       if (!ISDIGIT(*cp) && *cp != '.')
-           break;
-    }
-
-    /*
-     * OK if in valid hostname form.
-     */
-    return (valid_hostname(queue_id, DONT_GRIPE));
+    return (1);
 }
 
 /* mail_queue_enter - make mail queue entry with locally-unique name */
index 50982e690154c4976890b9ffd177bc175fe85791..34da12f75ea6f967ba00f28a493a31f2460b4cd6 100644 (file)
   * 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      "20030913"
+#define MAIL_RELEASE_DATE      "20040119"
 
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "2.0.16"
+#define DEF_MAIL_VERSION       "2.0.17"
 extern char *var_mail_version;
 
  /*
index 11ff16cc94bcd161cea417724155fd8c1911b305..8c22bb91c952709b43f338b1c8940d47f434784b 100644 (file)
@@ -303,7 +303,9 @@ MASTER_SERV *get_master_ent()
            MASTER_INET_ADDRLIST(serv) = (INET_ADDR_LIST *)
                mymalloc(sizeof(*MASTER_INET_ADDRLIST(serv)));
            inet_addr_list_init(MASTER_INET_ADDRLIST(serv));
-           inet_addr_host(MASTER_INET_ADDRLIST(serv), host);
+           if (inet_addr_host(MASTER_INET_ADDRLIST(serv), host) == 0)
+               msg_fatal("%s: line %d: bad hostname or network address: %s",
+                         VSTREAM_PATH(master_fp), master_line, host);
            inet_addr_list_uniq(MASTER_INET_ADDRLIST(serv));
            serv->listen_fd_count = MASTER_INET_ADDRLIST(serv)->used;
        } else if (strcasecmp(saved_interfaces, DEF_INET_INTERFACES) == 0) {
index 4475e43b17b865dc3aeb91aa67d29fb211be58b1..bef31e0f6d7544015c7a3a6977fa28031641f300 100644 (file)
@@ -121,8 +121,19 @@ static void master_sigchld(int sig, int code, struct sigcontext * scp)
 
 static void master_sigchld(int unused_sig)
 {
+    int     saved_errno = errno;
+
+    /*
+     * WARNING WARNING WARNING.
+     * 
+     * This code runs at unpredictable moments, as a signal handler. Don't put
+     * any code here other than for setting a global flag, or code that is
+     * intended to be run within a signal handler. Restore errno in case we
+     * are interrupting the epilog of a failed system call.
+     */
     if (write(SIG_PIPE_WRITE_FD, "", 1) != 1)
        msg_warn("write to SIG_PIPE_WRITE_FD failed: %m");
+    errno = saved_errno;
 }
 
 /* master_sig_event - called upon return from select() */
index 4f355d04862383b9b75b265926d0837fd812a792..13d2dbd8d5de1a82cf852953f8e70ad946f2d329 100644 (file)
@@ -275,7 +275,7 @@ static void qmgr_deliver_update(int unused_event, char *context)
      * No problems detected. Mark the transport and queue as alive. The queue
      * itself won't go away before we dispose of the current queue entry.
      */
-    if (status == 0) {
+    if (VSTRING_LEN(reason) == 0) {
        qmgr_transport_unthrottle(transport);
        qmgr_queue_unthrottle(queue);
     }
index 2bba1ab1e9a1a5702589ce183de9b00bf033acc0..de4610c8a74964db331a59979af0bceb3b3105d4 100644 (file)
@@ -270,7 +270,7 @@ static void qmgr_deliver_update(int unused_event, char *context)
      * No problems detected. Mark the transport and queue as alive. The queue
      * itself won't go away before we dispose of the current queue entry.
      */
-    if (status == 0) {
+    if (VSTRING_LEN(reason) == 0) {
        qmgr_transport_unthrottle(transport);
        qmgr_queue_unthrottle(queue);
     }
index d1586f7be6a423c446110c4bc650b6dc4e7aa0cd..5d9e6a5d249d85f0159e4348072b319c93d6f50f 100644 (file)
@@ -69,7 +69,7 @@
 #endif
 
 #ifndef INADDR_NONE
-#define INADDR_NONE 0xffffff
+#define INADDR_NONE 0xffffffff
 #endif
 
 /* Utility library. */
index 5af7cb950da55b685274f01c930960e3d856945a..f5b2b87a2897c007b5151c4c9d6e5f455792d74c 100644 (file)
@@ -174,7 +174,7 @@ void    msg_syslog_init(const char *name, int logopt, int facility)
      * This scrubbing code is in the wrong place.
      */
     if (unsafe())
-       putenv("TZ=");
+       putenv("TZ=UTC");
     tzset();
     openlog(name, LOG_NDELAY | logopt, facility);
     if (first_call) {
index ea568a132c5e87145e26c05c18014433f72bba51..1e3b4ee42507eb0777f2dc0d51c22e2fff4096e4 100644 (file)
@@ -98,7 +98,9 @@
 #define NORETURN       void
 #define PRINTFLIKE(x,y)
 #define SCANFLIKE(x,y)
+#ifndef NO_NETINFO
 #define HAS_NETINFO
+#endif
 #define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
 #define NATIVE_MAILQ_PATH "/usr/bin/mailq"
 #define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
index 2f644bf1dc7f994310a49c280dac302ffe942031..20ec1a1316defb87cc5fd608941ea365c90f8525 100644 (file)
@@ -95,7 +95,7 @@ int     vstring_get(VSTRING *vp, VSTREAM *fp)
            break;
     }
     VSTRING_TERMINATE(vp);
-    return (VSTRING_GET_RESULT(vp));
+    return (c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp));
 }
 
 /* vstring_get_nonl - read line from file, strip newline */
@@ -108,7 +108,7 @@ int     vstring_get_nonl(VSTRING *vp, VSTREAM *fp)
     while ((c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != '\n')
        VSTRING_ADDCH(vp, c);
     VSTRING_TERMINATE(vp);
-    return (c == '\n' ? c : VSTRING_GET_RESULT(vp));
+    return (c == '\n' || c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp));
 }
 
 /* vstring_get_null - read null-terminated string from file */
@@ -121,7 +121,7 @@ int     vstring_get_null(VSTRING *vp, VSTREAM *fp)
     while ((c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != 0)
        VSTRING_ADDCH(vp, c);
     VSTRING_TERMINATE(vp);
-    return (c == 0 ? c : VSTRING_GET_RESULT(vp));
+    return (c == 0 || c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp));
 }
 
 /* vstring_get_bound - read line from file, keep newline, up to bound */
@@ -140,7 +140,7 @@ int     vstring_get_bound(VSTRING *vp, VSTREAM *fp, int bound)
            break;
     }
     VSTRING_TERMINATE(vp);
-    return (VSTRING_GET_RESULT(vp));
+    return (c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp));
 }
 
 /* vstring_get_nonl_bound - read line from file, strip newline, up to bound */
@@ -156,7 +156,7 @@ int     vstring_get_nonl_bound(VSTRING *vp, VSTREAM *fp, int bound)
     while (bound-- > 0 && (c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != '\n')
        VSTRING_ADDCH(vp, c);
     VSTRING_TERMINATE(vp);
-    return (c == '\n' ? c : VSTRING_GET_RESULT(vp));
+    return (c == '\n' || c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp));
 }
 
 /* vstring_get_null_bound - read null-terminated string from file */
@@ -172,7 +172,7 @@ int     vstring_get_null_bound(VSTRING *vp, VSTREAM *fp, int bound)
     while (bound-- > 0 && (c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != 0)
        VSTRING_ADDCH(vp, c);
     VSTRING_TERMINATE(vp);
-    return (c == 0 ? c : VSTRING_GET_RESULT(vp));
+    return (c == 0 || c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp));
 }
 
 #ifdef TEST