]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Added dict_db_config setting to point to a Berkeley DB config file.
authorTimo Sirainen <tss@iki.fi>
Sun, 4 May 2008 15:12:28 +0000 (18:12 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 4 May 2008 15:12:28 +0000 (18:12 +0300)
--HG--
branch : HEAD

doc/dovecot-db.conf [new file with mode: 0644]
dovecot-example.conf
src/master/dict-process.c
src/master/master-settings-defs.c
src/master/master-settings.c
src/master/master-settings.h

diff --git a/doc/dovecot-db.conf b/doc/dovecot-db.conf
new file mode 100644 (file)
index 0000000..165dc13
--- /dev/null
@@ -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
index e388638cc5f55fffa1dd64f6bc29ae850cdeb7d5..f0f9137690f7a98ff4bbef5bf2092b57b824a1a0 100644 (file)
@@ -1055,6 +1055,10 @@ dict {
   #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
 ##
index 088124a0ae5bfd2f5f03a61a318ee2cd3d61d3d0..eb7fcf7e5407388239e7c2b9a6a566d08b6b75f3 100644 (file)
@@ -84,6 +84,12 @@ static int dict_process_start(struct dict_process *process)
        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)
index af28d633475de4d008fd4431803cdc49ab94b80e..8cb56718bbe589814a0273d5fbe5d30400604414 100644 (file)
@@ -124,5 +124,8 @@ static struct setting_def setting_defs[] = {
        DEF_STR(pop3_client_workarounds),
        DEF_STR(pop3_logout_format),
 
+       /* dict */
+       DEF_STR(dict_db_config),
+
        { 0, NULL, 0 }
 };
index 9ec1edc4366081a02b8960547b00d9446992c1b7..c3211781b2397ba4c9d2c5c31a3585b5e7fb823e 100644 (file)
@@ -290,6 +290,9 @@ struct settings default_settings = {
        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,
+
        /* .. */
 };
 
index 2a3d582033adfd4305c026e123ef0557a41d620d..29da4e36fc8d3e1d08cfea999cf7993ef990b626 100644 (file)
@@ -136,6 +136,9 @@ struct settings {
        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;