--- postfix-3.3.1/src/util/dict_db.c	2017-12-27 22:53:13.000000000 +0100
+++ postfix-3.3.1.new/src/util/dict_db.c	2018-08-15 12:03:07.209743884 +0200
@@ -743,7 +743,7 @@
     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 || \
+#if DB_VERSION_MAJOR > 4 || \
 	(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)
