]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.4.2 v2.4.2
authorWietse Venema <wietse@porcupine.org>
Wed, 30 May 2007 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 20:15:46 +0000 (15:15 -0500)
postfix/HISTORY
postfix/src/global/mail_version.h
postfix/src/postdrop/postdrop.c
postfix/src/util/get_hostname.c

index 65bb6baf822ad7ce321f54ca6e707cb33ceeff4e..de0699759f16b5d1688cdbb555c31223599f2ac0 100644 (file)
@@ -13461,3 +13461,17 @@ Apologies for any names omitted.
        was introduced it broke "agressive" recipient duplicate
        elimination with "enable_original_recipient = no".  File:
        cleanup/cleanup_out_recipient.c.
+
+20070529
+
+       Bugfix (introduced Postfix 2.3): the sendmail/postdrop
+       commands would hang when trying to submit a message larger
+       than the per-message size limit. File: postdrop/postdrop.c.
+
+20070530
+
+       Sabotage the saboteur who insists on breaking Postfix by
+       adding gethostbyname() calls that cause maildir delivery
+       to fail when the machine name is not found in /etc/hosts,
+       or that cause Postfix processes to hang when the network
+       is down.
index a46b605bcdfb5ae82893a10f315504c9d0678177..eb26de4b5b84c505c00a9dae546289424895fc9b 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20070524"
-#define MAIL_VERSION_NUMBER    "2.4.2-RC2"
+#define MAIL_RELEASE_DATE      "20070530"
+#define MAIL_VERSION_NUMBER    "2.4.2"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index 7668df8da803489e9585766a5b785cb73b94149d..92170708fe59f4442d32db923f99ec00872d6b76 100644 (file)
@@ -438,9 +438,11 @@ int     main(int argc, char **argv)
        if (REC_PUT_BUF(dst->stream, rec_type, buf) < 0) {
            /* rec_get() errors must not clobber errno. */
            saved_errno = errno;
-           while (rec_get_raw(VSTREAM_IN, buf, var_line_limit,
-                              REC_FLAG_NONE) > 0)
-                /* void */ ;
+           while ((rec_type = rec_get_raw(VSTREAM_IN, buf, var_line_limit,
+                                          REC_FLAG_NONE)) != REC_TYPE_END
+                  && rec_type != REC_TYPE_EOF)
+               if (rec_type == REC_TYPE_ERROR)
+                   msg_fatal("uid=%ld: malformed input", (long) uid);
            errno = saved_errno;
            break;
        }
index fcf4a7f7ffb760e01406453dd2f95cb1880b0299..eb2cfea06ad96b491034844626212b49cd736d35 100644 (file)
@@ -61,13 +61,23 @@ const char *get_hostname(void)
      * part of the socket interface library. We avoid the more politically-
      * correct uname() routine because that has no portable way of dealing
      * with long (FQDN) hostnames.
+     * 
+     * DO NOT CALL GETHOSTBYNAME FROM THIS FUNCTION. IT BREAKS MAILDIR DELIVERY
+     * AND OTHER THINGS WHEN THE MACHINE NAME IS NOT FOUND IN /ETC/HOSTS OR
+     * CAUSES PROCESSES TO HANG WHEN THE NETWORK IS DISCONNECTED.
+     * 
+     * POSTFIX NO LONGER NEEDS A FULLY QUALIFIED HOSTNAME. INSTEAD POSTFIX WILL
+     * USE A DEFAULT DOMAIN NAME "LOCALDOMAIN".
      */
     if (my_host_name == 0) {
+       /* DO NOT CALL GETHOSTBYNAME FROM THIS FUNCTION */
        if (gethostname(namebuf, sizeof(namebuf)) < 0)
            msg_fatal("gethostname: %m");
        namebuf[MAXHOSTNAMELEN] = 0;
+       /* DO NOT CALL GETHOSTBYNAME FROM THIS FUNCTION */
        if (valid_hostname(namebuf, DO_GRIPE) == 0)
            msg_fatal("unable to use my own hostname");
+       /* DO NOT CALL GETHOSTBYNAME FROM THIS FUNCTION */
        my_host_name = mystrdup(namebuf);
     }
     return (my_host_name);