dovecot-1.1: Added dict_db_config setting to point to a Berkeley...

dovecot at dovecot.org dovecot at dovecot.org
Sun May 4 18:12:34 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/768231eb84cf
changeset: 7481:768231eb84cf
user:      Timo Sirainen <tss at iki.fi>
date:      Sun May 04 18:12:28 2008 +0300
description:
Added dict_db_config setting to point to a Berkeley DB config file.

diffstat:

6 files changed, 30 insertions(+)
doc/dovecot-db.conf               |   11 +++++++++++
dovecot-example.conf              |    4 ++++
src/master/dict-process.c         |    6 ++++++
src/master/master-settings-defs.c |    3 +++
src/master/master-settings.c      |    3 +++
src/master/master-settings.h      |    3 +++

diffs (83 lines):

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 @@ 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
 ##
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 @@ static int dict_process_start(struct dic
 	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 @@ 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 }
 };
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 @@ 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,
+
 	/* .. */
 };
 
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 @@ 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;


More information about the dovecot-cvs mailing list