Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5098:176c28ad604c HEAD
Added mail_log_max_lines_per_sec setting.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 02 Feb 2007 13:20:23 +0200 |
parents | 55bebf61cfdd |
children | d75d8a0cb231 |
files | dovecot-example.conf src/master/mail-process.c src/master/master-settings-defs.c src/master/master-settings.c src/master/master-settings.h |
diffstat | 5 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dovecot-example.conf Fri Feb 02 13:14:37 2007 +0200 +++ b/dovecot-example.conf Fri Feb 02 13:20:23 2007 +0200 @@ -267,6 +267,11 @@ # variables you can use. #mail_log_prefix = "%Us(%u): " +# 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. +#mail_log_max_lines_per_sec = 10 + # Don't use mmap() at all. This is required if you store indexes to shared # filesystems (NFS or clustered filesystem). #mmap_disable = no
--- a/src/master/mail-process.c Fri Feb 02 13:14:37 2007 +0200 +++ b/src/master/mail-process.c Fri Feb 02 13:20:23 2007 +0200 @@ -480,7 +480,7 @@ } if (!dump_capability) { - log_fd = log_create_pipe(&log, 10); + log_fd = log_create_pipe(&log, set->mail_log_max_lines_per_sec); if (log_fd == -1) return FALSE; } else {
--- a/src/master/master-settings-defs.c Fri Feb 02 13:14:37 2007 +0200 +++ b/src/master/master-settings-defs.c Fri Feb 02 13:20:23 2007 +0200 @@ -96,6 +96,7 @@ DEF(SET_STR, mail_plugins), DEF(SET_STR, mail_plugin_dir), DEF(SET_STR, mail_log_prefix), + DEF(SET_STR, mail_log_max_lines_per_sec), /* imap */ DEF(SET_INT, imap_max_line_length),
--- a/src/master/master-settings.c Fri Feb 02 13:14:37 2007 +0200 +++ b/src/master/master-settings.c Fri Feb 02 13:20:23 2007 +0200 @@ -247,6 +247,7 @@ MEMBER(mail_plugins) "", MEMBER(mail_plugin_dir) MODULEDIR"/imap", MEMBER(mail_log_prefix) "%Us(%u): ", + MEMBER(mail_log_max_lines_per_sec) 10, /* imap */ MEMBER(imap_max_line_length) 65536,
--- a/src/master/master-settings.h Fri Feb 02 13:14:37 2007 +0200 +++ b/src/master/master-settings.h Fri Feb 02 13:20:23 2007 +0200 @@ -104,6 +104,7 @@ const char *mail_plugins; const char *mail_plugin_dir; const char *mail_log_prefix; + unsigned int mail_log_max_lines_per_sec; /* imap */ unsigned int imap_max_line_length;