]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.1.8 v3.1.8
authorWietse Venema <wietse@porcupine.org>
Sat, 27 Jan 2018 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sun, 28 Jan 2018 18:14:13 +0000 (13:14 -0500)
postfix/HISTORY
postfix/html/FORWARD_SECRECY_README.html
postfix/html/SMTPD_ACCESS_README.html
postfix/proto/FORWARD_SECRECY_README.html
postfix/proto/SMTPD_ACCESS_README.html
postfix/src/dns/dns_lookup.c
postfix/src/global/mail_version.h
postfix/src/local/mailbox.c
postfix/src/smtpd/smtpd_check.c
postfix/src/util/dict_db.c
postfix/src/virtual/mailbox.c

index c41f5c54cc8ae52e8b87b9a4775fe7c2378b21ee..25c05fe685d22f4baa27e3c99b8b00063f8f341f 100644 (file)
@@ -22366,3 +22366,35 @@ Apologies for any names omitted.
        Bugfix (introduced: Postfix 3.0) missing dynamicmaps support
        in the Postfix sendmail command broke authorized_submit_users
        with a dynamically-loaded map type. File: sendmail/sendmail.c.
+
+20171116
+
+       Bugfix (introduced: Postfix 2.1): don't log warnings 
+       that some restriction returns OK, when the access map
+       DISCARD feature is in effect. File: smtpd/smtpd_check.c.
+
+20171215
+
+       Bugfix (introduced: 20170611): the DB_CONFIG bugfix broke
+       Berkeley DB configurations with a relative pathname.  File:
+       util/dict_db.c.
+
+20171218
+
+       Workaround: reportedly, some res_query(3) implementation
+       can return -1 with h_errno==0. Instead of terminating with
+       a panic, the Postfix DNS client now logs a warning and sets
+       h_errno to TRY_AGAIN. File: dns/dns_lookup.c.
+
+20171226
+
+       Documentation patches by Sven Neuhaus. Files:
+       proto/FORWARD_SECRECY_README.html, proto/SMTPD_ACCESS_README.html.
+
+20180106
+
+       Cleanup: missing mailbox seek-to-end error check in the
+       local(8) delivery agent. File: local/mailbox.c.
+
+       Cleanup: incorrect mailbox seek-to-end error message in the
+       virtual(8) delivery agent. File: virtual/mailbox.c.
index a7c2f24e290ae90c1c24b5e54d9646fa8ddd484b..d1364ef542daf1255dc36e24995f69c9c17095f8 100644 (file)
@@ -322,9 +322,9 @@ few seconds to a few minutes): </p>
 <pre>
 # cd /etc/postfix
 # umask 022
-# openssl dhparam -out dh512.tmp 512 && mv dh512.tmp dh512.pem
-# openssl dhparam -out dh1024.tmp 1024 && mv dh1024.tmp dh1024.pem
-# openssl dhparam -out dh2048.tmp 2048 && mv dh2048.tmp dh2048.pem
+# openssl dhparam -out dh512.tmp 512 &amp;&amp; mv dh512.tmp dh512.pem
+# openssl dhparam -out dh1024.tmp 1024 &amp;&amp; mv dh1024.tmp dh1024.pem
+# openssl dhparam -out dh2048.tmp 2048 &amp;&amp; mv dh2048.tmp dh2048.pem
 # chmod 644 dh512.pem dh1024.pem dh2048.pem
 </pre>
 </blockquote>
index 411440c7af5a9eb94a5f9fcbe72f8ed82063c847..83235574a890a89e7055cb495dce83af4ba590c5 100644 (file)
@@ -251,7 +251,7 @@ Reject MAIL FROM information </td> </tr>
 relay policy</td>
 <td rowspan="2"> Reject RCPT TO information </td> </tr>
 
-<tr> <td> &lt 2.10</td> <td> Not available </td> 
+<tr> <td> &lt; 2.10</td> <td> Not available </td> 
 </tr>
 
 <tr> <td rowspan="2"> <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> </td> <td> &ge;
@@ -259,7 +259,7 @@ relay policy</td>
 relay policy</td>
 <td rowspan="2"> Reject RCPT TO information </td> </tr>
 
-<tr> <td> &lt 2.10</td> <td> Required </td> </tr>
+<tr> <td> &lt; 2.10</td> <td> Required </td> </tr>
 
 <tr> <td> <a href="postconf.5.html#smtpd_data_restrictions">smtpd_data_restrictions</a> </td> <td> &ge; 2.0 </td> <td>
 Optional </td> <td>
index 36110b8d82a5939b1ed303344bcb317d8fe1ea8f..3db4ee843afc310b5309a8b823c78b8dc0b1bd55 100644 (file)
@@ -322,9 +322,9 @@ few seconds to a few minutes): </p>
 <pre>
 # cd /etc/postfix
 # umask 022
-# openssl dhparam -out dh512.tmp 512 && mv dh512.tmp dh512.pem
-# openssl dhparam -out dh1024.tmp 1024 && mv dh1024.tmp dh1024.pem
-# openssl dhparam -out dh2048.tmp 2048 && mv dh2048.tmp dh2048.pem
+# openssl dhparam -out dh512.tmp 512 &amp;&amp; mv dh512.tmp dh512.pem
+# openssl dhparam -out dh1024.tmp 1024 &amp;&amp; mv dh1024.tmp dh1024.pem
+# openssl dhparam -out dh2048.tmp 2048 &amp;&amp; mv dh2048.tmp dh2048.pem
 # chmod 644 dh512.pem dh1024.pem dh2048.pem
 </pre>
 </blockquote>
index ef45e1dd412351d67c29aa1d3a8451fefde5a722..5952bb278e1e8d3b23974cf023668cecac0e221c 100644 (file)
@@ -251,7 +251,7 @@ Reject MAIL FROM information </td> </tr>
 relay policy</td>
 <td rowspan="2"> Reject RCPT TO information </td> </tr>
 
-<tr> <td> &lt 2.10</td> <td> Not available </td> 
+<tr> <td> &lt; 2.10</td> <td> Not available </td> 
 </tr>
 
 <tr> <td rowspan="2"> smtpd_recipient_restrictions </td> <td> &ge;
@@ -259,7 +259,7 @@ relay policy</td>
 relay policy</td>
 <td rowspan="2"> Reject RCPT TO information </td> </tr>
 
-<tr> <td> &lt 2.10</td> <td> Required </td> </tr>
+<tr> <td> &lt; 2.10</td> <td> Required </td> </tr>
 
 <tr> <td> smtpd_data_restrictions </td> <td> &ge; 2.0 </td> <td>
 Optional </td> <td>
index fe59aa64745215e853360f0755602e8c2c3225b8..e144dab6262b1f18199ca4f124fdcfc788953989 100644 (file)
@@ -397,6 +397,14 @@ static int dns_res_search(const char *name, int class, int type,
        /* Prepare for returning a null-padded server reply. */
        memset(answer, 0, anslen);
     len = res_query(name, class, type, answer, anslen);
+    /* Begin API creep workaround. */
+    if (len < 0 && h_errno == 0) {
+       SET_H_ERRNO(TRY_AGAIN);
+       msg_warn("res_query(\"%s\", %d, %d, %p, %d) returns %d with h_errno==0"
+                " -- setting h_errno=TRY_AGAIN",
+                name, class, type, answer, anslen, len);
+    }
+    /* End API creep workaround. */
     if (len > 0) {
        SET_H_ERRNO(0);
     } else if (keep_notfound && NOT_FOUND_H_ERRNO(h_errno)) {
index 3cd566de420704320c4bc964aac3353d5f9972a6..5df75bc5c21034867a0a7f7a798ec6792ee20640 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      "20171028"
-#define MAIL_VERSION_NUMBER    "3.1.7"
+#define MAIL_RELEASE_DATE      "20180127"
+#define MAIL_VERSION_NUMBER    "3.1.8"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index 887333c62791d0fb87389d5a48c4f33da17c9b5f..d4f01bf714bc829841a884cf0ca0f836a28d4f8a 100644 (file)
@@ -97,7 +97,7 @@ static int deliver_mailbox_file(LOCAL_STATE state, USER_ATTR usr_attr)
     int     deliver_status;
     int     copy_flags;
     VSTRING *biff;
-    long    end;
+    off_t   end;
     struct stat st;
     uid_t   spool_uid;
     gid_t   spool_gid;
@@ -202,7 +202,8 @@ static int deliver_mailbox_file(LOCAL_STATE state, USER_ATTR usr_attr)
            msg_warn("specify \"%s = no\" to ignore mailbox ownership mismatch",
                     VAR_STRICT_MBOX_OWNER);
        } else {
-           end = vstream_fseek(mp->fp, (off_t) 0, SEEK_END);
+           if ((end = vstream_fseek(mp->fp, (off_t) 0, SEEK_END)) < 0)
+               msg_fatal("seek mailbox file %s: %m", mailbox);
            mail_copy_status = mail_copy(COPY_ATTR(state.msg_attr), mp->fp,
                                         copy_flags, "\n", why);
        }
index 4b7bbc8081d640a45099c9462e1416b609e873d7..00060230132aae17ee88a60a51e27ac5e2d27a65 100644 (file)
@@ -4053,7 +4053,7 @@ static int is_map_command(SMTPD_STATE *state, const char *name,
 static void forbid_whitelist(SMTPD_STATE *state, const char *name,
                                     int status, const char *target)
 {
-    if (status == SMTPD_CHECK_OK) {
+    if (state->discard == 0 && status == SMTPD_CHECK_OK) {
        msg_warn("restriction %s returns OK for %s", name, target);
        msg_warn("this is not allowed for security reasons");
        msg_warn("use DUNNO instead of OK if you want to make an exception");
index e3d34106074245fea278acf5758b54b8f7e9386d..956d2c3f52c2d0c5ad346a2232f03d57f9b33e02 100644 (file)
@@ -615,6 +615,7 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags,
     struct stat st;
     DB     *db = 0;
     char   *db_path = 0;
+    VSTRING *db_base_buf = 0;
     int     lock_fd = -1;
     int     dbfd;
 
@@ -671,6 +672,7 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags,
 #define FREE_RETURN(e) do { \
        DICT *_dict = (e); if (db) DICT_DB_CLOSE(db); \
        if (lock_fd >= 0) (void) close(lock_fd); \
+       if (db_base_buf) vstring_free(db_base_buf); \
        if (db_path) myfree(db_path); return (_dict); \
     } while (0)
 
@@ -735,18 +737,22 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags,
        msg_panic("db_create null result");
     if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0)
        msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM);
+    db_base_buf = vstring_alloc(100);
 #if DB_VERSION_MAJOR == 6 || DB_VERSION_MAJOR == 5 || \
        (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0)
-    if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0)
+    if ((errno = db->open(db, 0, sane_basename(db_base_buf, db_path),
+                         0, type, db_flags, 0644)) != 0)
        FREE_RETURN(dict_surrogate(class, path, open_flags, dict_flags,
                                   "open database %s: %m", db_path));
 #elif (DB_VERSION_MAJOR == 3 || DB_VERSION_MAJOR == 4)
-    if ((errno = db->open(db, db_path, 0, type, db_flags, 0644)) != 0)
+    if ((errno = db->open(db, sane_basename(db_base_buf, db_path), 0,
+                         type, db_flags, 0644)) != 0)
        FREE_RETURN(dict_surrogate(class, path, open_flags, dict_flags,
                                   "open database %s: %m", db_path));
 #else
 #error "Unsupported Berkeley DB version"
 #endif
+    vstring_free(db_base_buf);
     if ((errno = db->fd(db, &dbfd)) != 0)
        msg_fatal("get database file descriptor: %m");
 #endif
index 51e646de7af1e487d0902745030a39714249e540..a8042f200c1bec9a537ac6388f9998ebc096ba39 100644 (file)
@@ -132,7 +132,7 @@ static int deliver_mailbox_file(LOCAL_STATE state, USER_ATTR usr_attr)
                     VAR_STRICT_MBOX_OWNER);
        } else {
            if (vstream_fseek(mp->fp, (off_t) 0, SEEK_END) < 0)
-               msg_fatal("%s: seek queue file %s: %m",
+               msg_fatal("%s: seek mailbox file %s: %m",
                          myname, VSTREAM_PATH(mp->fp));
            mail_copy_status = mail_copy(COPY_ATTR(state.msg_attr), mp->fp,
                                         copy_flags, "\n", why);