# HG changeset patch # User Timo Sirainen # Date 1209913948 -10800 # Node ID 768231eb84cf58bfc3e37a9e9bf027c0d67964ce # Parent ad0f32abda6d1a3a1963e2fa280f233a97fd2562 Added dict_db_config setting to point to a Berkeley DB config file. diff -r ad0f32abda6d -r 768231eb84cf doc/dovecot-db.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/dovecot-db.conf Sun May 04 18:12:28 2008 +0300 @@ -0,0 +1,11 @@ +# Example DB_CONFIG for Berkeley DB. Typically dict_db_config setting is used +# to point to this file. +# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/env/db_config.html + +# Maximum number of simultaneous transactions. +set_tx_max 1000 + +# http://www.oracle.com/technology/documentation/berkeley-db/db/ref/lock/max.html +#set_lk_max_locks 1000 +#set_lk_max_lockers 1000 +#set_lk_max_objects 1000 diff -r ad0f32abda6d -r 768231eb84cf dovecot-example.conf --- a/dovecot-example.conf Sun May 04 17:05:12 2008 +0300 +++ b/dovecot-example.conf Sun May 04 18:12:28 2008 +0300 @@ -1055,6 +1055,10 @@ #quota = mysql:/etc/dovecot-dict-quota.conf } +# Path to Berkeley DB's configuration file. See doc/dovecot-db.conf for an +# example. +#dict_db_config = + ## ## Plugin settings ## diff -r ad0f32abda6d -r 768231eb84cf src/master/dict-process.c --- a/src/master/dict-process.c Sun May 04 17:05:12 2008 +0300 +++ b/src/master/dict-process.c Sun May 04 18:12:28 2008 +0300 @@ -84,6 +84,12 @@ child_process_init_env(); env_put(t_strconcat("DICT_LISTEN_FROM_FD=", process->path, NULL)); + if (settings_root->defaults->dict_db_config != NULL) { + env_put(t_strconcat("DB_CONFIG=", + settings_root->defaults->dict_db_config, + NULL)); + } + dicts = array_get(&settings_root->dicts, &count); i_assert((count % 2) == 0); for (i = 0; i < count; i += 2) diff -r ad0f32abda6d -r 768231eb84cf src/master/master-settings-defs.c --- a/src/master/master-settings-defs.c Sun May 04 17:05:12 2008 +0300 +++ b/src/master/master-settings-defs.c Sun May 04 18:12:28 2008 +0300 @@ -124,5 +124,8 @@ DEF_STR(pop3_client_workarounds), DEF_STR(pop3_logout_format), + /* dict */ + DEF_STR(dict_db_config), + { 0, NULL, 0 } }; diff -r ad0f32abda6d -r 768231eb84cf src/master/master-settings.c --- a/src/master/master-settings.c Sun May 04 17:05:12 2008 +0300 +++ b/src/master/master-settings.c Sun May 04 18:12:28 2008 +0300 @@ -290,6 +290,9 @@ MEMBER(pop3_client_workarounds) "", MEMBER(pop3_logout_format) "top=%t/%p, retr=%r/%b, del=%d/%m, size=%s", + /* dict */ + MEMBER(dict_db_config) NULL, + /* .. */ }; diff -r ad0f32abda6d -r 768231eb84cf src/master/master-settings.h --- a/src/master/master-settings.h Sun May 04 17:05:12 2008 +0300 +++ b/src/master/master-settings.h Sun May 04 18:12:28 2008 +0300 @@ -136,6 +136,9 @@ const char *pop3_client_workarounds; const char *pop3_logout_format; + /* dict */ + const char *dict_db_config; + /* .. */ ARRAY_TYPE(listener) listens; ARRAY_TYPE(listener) ssl_listens;