From: Mark Martinec on
postfix-2.8-20100323,
FreeBSD ports: mail/postfix-current, databases/db50
/etc/make.conf: WITH_BDB_VER=50


--- src/util/dict_db.c~ 2010-01-02 22:28:08.000000000 +0100
+++ src/util/dict_db.c 2010-06-11 15:50:48.000000000 +0200
@@ -676,5 +676,5 @@
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 == 4 && DB_VERSION_MINOR > 0)
+#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0 || DB_VERSION_MAJOR == 5)
if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0)
msg_fatal("open database %s: %m", db_path);


Seems to work fine.
There wasn't any API change in db->open between 4.8 and 5.0
as far as I can tell.

Mark

From: Wietse Venema on
Mark Martinec:
> postfix-2.8-20100323,
> FreeBSD ports: mail/postfix-current, databases/db50
> /etc/make.conf: WITH_BDB_VER=50

A similar change was included in the June 8th releases of Postfix
2.6.7 and 2.7.1.

Wietse

>
> --- src/util/dict_db.c~ 2010-01-02 22:28:08.000000000 +0100
> +++ src/util/dict_db.c 2010-06-11 15:50:48.000000000 +0200
> @@ -676,5 +676,5 @@
> 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 == 4 && DB_VERSION_MINOR > 0)
> +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0 || DB_VERSION_MAJOR == 5)
> if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0)
> msg_fatal("open database %s: %m", db_path);
>
>
> Seems to work fine.
> There wasn't any API change in db->open between 4.8 and 5.0
> as far as I can tell.
>
> Mark
>
>

From: Brian Evans - Postfix List on
On 6/11/2010 10:28 AM, Mark Martinec wrote:
> postfix-2.8-20100323,

> Seems to work fine.
> There wasn't any API change in db->open between 4.8 and 5.0
> as far as I can tell.
>
> Mark
You must have missed the ChangeLog on the website:

20100601

Cleanup: Postfix LDAP client support for RFC 2255 LDAP URLs.
Victor Duchovni. Files: proto/ldap_table global/dict_ldap.c.

Safety: Postfix processes log a warning when a matchlist
has a #comment at the end of a line (for example mynetworks
or relay_domains). File: util/match_list.c.

Portability: Berkeley DB 5.x has the same API as Berkeley
DB 4.1 and later. File: util/dict_db.c.