changeset 7416:4c093cfa8756 HEAD

Disable log throttling while mail_debug=yes
author Timo Sirainen <tss@iki.fi>
date Sat, 15 Mar 2008 05:02:08 +0200
parents 58c0b1f833f3
children e8df909de851
files dovecot-example.conf src/master/mail-process.c
diffstat 2 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dovecot-example.conf	Fri Mar 14 08:24:19 2008 +0200
+++ b/dovecot-example.conf	Sat Mar 15 05:02:08 2008 +0200
@@ -301,7 +301,8 @@
 
 # Max. number of lines a mail process is allowed to log per second before it's
 # throttled. 0 means unlimited. Typically there's no need to change this
-# unless you're using mail_log plugin, which may log a lot.
+# unless you're using mail_log plugin, which may log a lot. This setting is
+# ignored while mail_debug=yes to avoid pointless throttling.
 #mail_log_max_lines_per_sec = 10
 
 # Don't use mmap() at all. This is required if you store indexes to shared
--- a/src/master/mail-process.c	Fri Mar 14 08:24:19 2008 +0200
+++ b/src/master/mail-process.c	Sat Mar 15 05:02:08 2008 +0200
@@ -535,7 +535,7 @@
 	uid_t uid;
 	gid_t gid;
 	ARRAY_DEFINE(extra_args, const char *);
-	unsigned int i, count, left, process_count;
+	unsigned int i, count, left, process_count, throttle;
 	int ret, log_fd, nice, chdir_errno;
 	bool home_given, nfs_check;
 
@@ -640,7 +640,9 @@
 	}
 
 	if (!dump_capability) {
-		log_fd = log_create_pipe(&log, set->mail_log_max_lines_per_sec);
+		throttle = set->mail_debug ? 0 :
+			set->mail_log_max_lines_per_sec;
+		log_fd = log_create_pipe(&log, throttle);
 		if (log_fd == -1)
 			return MASTER_LOGIN_STATUS_INTERNAL_ERROR;
 	} else {