Prereq: "3.0.11" diff -cr --new-file /var/tmp/postfix-3.0.11/src/global/mail_version.h ./src/global/mail_version.h *** /var/tmp/postfix-3.0.11/src/global/mail_version.h 2017-10-28 10:13:52.000000000 -0400 --- ./src/global/mail_version.h 2018-01-27 07:57:56.000000000 -0500 *************** *** 20,27 **** * 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.0.11" #ifdef SNAPSHOT #define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE --- 20,27 ---- * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ ! #define MAIL_RELEASE_DATE "20180127" ! #define MAIL_VERSION_NUMBER "3.0.12" #ifdef SNAPSHOT #define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff -cr --new-file /var/tmp/postfix-3.0.11/HISTORY ./HISTORY *** /var/tmp/postfix-3.0.11/HISTORY 2017-10-28 08:29:55.000000000 -0400 --- ./HISTORY 2018-01-21 17:11:10.000000000 -0500 *************** *** 21876,21878 **** --- 21876,21903 ---- 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. + + 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. diff -cr --new-file /var/tmp/postfix-3.0.11/html/FORWARD_SECRECY_README.html ./html/FORWARD_SECRECY_README.html *** /var/tmp/postfix-3.0.11/html/FORWARD_SECRECY_README.html 2014-01-27 17:18:47.000000000 -0500 --- ./html/FORWARD_SECRECY_README.html 2017-12-26 10:52:21.000000000 -0500 *************** *** 317,325 ****
  # 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
  # chmod 644 dh512.pem dh1024.pem dh2048.pem
  
--- 317,325 ----
  # 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
  # chmod 644 dh512.pem dh1024.pem dh2048.pem
  
diff -cr --new-file /var/tmp/postfix-3.0.11/html/SMTPD_ACCESS_README.html ./html/SMTPD_ACCESS_README.html *** /var/tmp/postfix-3.0.11/html/SMTPD_ACCESS_README.html 2014-10-01 13:25:10.000000000 -0400 --- ./html/SMTPD_ACCESS_README.html 2017-12-26 10:52:21.000000000 -0500 *************** *** 251,257 **** relay policy Reject RCPT TO information ! < 2.10 Not available smtpd_recipient_restrictions ≥ --- 251,257 ---- relay policy Reject RCPT TO information ! < 2.10 Not available smtpd_recipient_restrictions ≥ *************** *** 259,265 **** relay policy Reject RCPT TO information ! < 2.10 Required smtpd_data_restrictions ≥ 2.0 Optional --- 259,265 ---- relay policy Reject RCPT TO information ! < 2.10 Required smtpd_data_restrictions ≥ 2.0 Optional diff -cr --new-file /var/tmp/postfix-3.0.11/proto/FORWARD_SECRECY_README.html ./proto/FORWARD_SECRECY_README.html *** /var/tmp/postfix-3.0.11/proto/FORWARD_SECRECY_README.html 2014-01-27 17:17:03.000000000 -0500 --- ./proto/FORWARD_SECRECY_README.html 2017-12-26 10:51:58.000000000 -0500 *************** *** 317,325 ****
  # 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
  # chmod 644 dh512.pem dh1024.pem dh2048.pem
  
--- 317,325 ----
  # 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
  # chmod 644 dh512.pem dh1024.pem dh2048.pem
  
diff -cr --new-file /var/tmp/postfix-3.0.11/proto/SMTPD_ACCESS_README.html ./proto/SMTPD_ACCESS_README.html *** /var/tmp/postfix-3.0.11/proto/SMTPD_ACCESS_README.html 2014-10-01 13:24:18.000000000 -0400 --- ./proto/SMTPD_ACCESS_README.html 2017-12-26 10:51:58.000000000 -0500 *************** *** 251,257 **** relay policy Reject RCPT TO information ! < 2.10 Not available smtpd_recipient_restrictions ≥ --- 251,257 ---- relay policy Reject RCPT TO information ! < 2.10 Not available smtpd_recipient_restrictions ≥ *************** *** 259,265 **** relay policy Reject RCPT TO information ! < 2.10 Required smtpd_data_restrictions ≥ 2.0 Optional --- 259,265 ---- relay policy Reject RCPT TO information ! < 2.10 Required smtpd_data_restrictions ≥ 2.0 Optional diff -cr --new-file /var/tmp/postfix-3.0.11/src/local/mailbox.c ./src/local/mailbox.c *** /var/tmp/postfix-3.0.11/src/local/mailbox.c 2015-01-11 15:30:20.000000000 -0500 --- ./src/local/mailbox.c 2018-01-21 17:14:02.000000000 -0500 *************** *** 97,103 **** int deliver_status; int copy_flags; VSTRING *biff; ! long end; struct stat st; uid_t spool_uid; gid_t spool_gid; --- 97,103 ---- int deliver_status; int copy_flags; VSTRING *biff; ! off_t end; struct stat st; uid_t spool_uid; gid_t spool_gid; *************** *** 202,208 **** 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); mail_copy_status = mail_copy(COPY_ATTR(state.msg_attr), mp->fp, copy_flags, "\n", why); } --- 202,209 ---- msg_warn("specify \"%s = no\" to ignore mailbox ownership mismatch", VAR_STRICT_MBOX_OWNER); } else { ! 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); } diff -cr --new-file /var/tmp/postfix-3.0.11/src/smtpd/smtpd_check.c ./src/smtpd/smtpd_check.c *** /var/tmp/postfix-3.0.11/src/smtpd/smtpd_check.c 2017-01-01 11:35:27.000000000 -0500 --- ./src/smtpd/smtpd_check.c 2017-12-20 20:27:08.000000000 -0500 *************** *** 4034,4040 **** static void forbid_whitelist(SMTPD_STATE *state, const char *name, int status, const char *target) { ! if (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"); --- 4034,4040 ---- static void forbid_whitelist(SMTPD_STATE *state, const char *name, int status, const char *target) { ! 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"); diff -cr --new-file /var/tmp/postfix-3.0.11/src/util/dict_db.c ./src/util/dict_db.c *** /var/tmp/postfix-3.0.11/src/util/dict_db.c 2017-06-13 12:17:36.000000000 -0400 --- ./src/util/dict_db.c 2017-12-20 20:33:17.000000000 -0500 *************** *** 615,620 **** --- 615,621 ---- struct stat st; DB *db = 0; char *db_path = 0; + VSTRING *db_base_buf = 0; int lock_fd = -1; int dbfd; *************** *** 671,676 **** --- 672,678 ---- #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,752 **** 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); #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) 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) FREE_RETURN(dict_surrogate(class, path, open_flags, dict_flags, "open database %s: %m", db_path)); #else #error "Unsupported Berkeley DB version" #endif if ((errno = db->fd(db, &dbfd)) != 0) msg_fatal("get database file descriptor: %m"); #endif --- 737,758 ---- 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, 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, 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 diff -cr --new-file /var/tmp/postfix-3.0.11/src/virtual/mailbox.c ./src/virtual/mailbox.c *** /var/tmp/postfix-3.0.11/src/virtual/mailbox.c 2016-08-22 17:24:31.000000000 -0400 --- ./src/virtual/mailbox.c 2018-01-21 17:11:30.000000000 -0500 *************** *** 132,138 **** VAR_STRICT_MBOX_OWNER); } else { if (vstream_fseek(mp->fp, (off_t) 0, SEEK_END) < 0) ! msg_fatal("%s: seek queue file %s: %m", myname, VSTREAM_PATH(mp->fp)); mail_copy_status = mail_copy(COPY_ATTR(state.msg_attr), mp->fp, copy_flags, "\n", why); --- 132,138 ---- VAR_STRICT_MBOX_OWNER); } else { if (vstream_fseek(mp->fp, (off_t) 0, SEEK_END) < 0) ! 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);