dovecot-sieve-1.1: If mail_debug is enabled, log also if the scr...

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 18 13:32:46 EEST 2008


details:   http://hg.dovecot.org/dovecot-sieve-1.1/rev/af18c7215bde
changeset: 54:af18c7215bde
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Apr 18 13:32:43 2008 +0300
description:
If mail_debug is enabled, log also if the script isn't found.

diffstat:

1 file changed, 4 insertions(+)
src/cmusieve-plugin.c |    4 ++++

diffs (21 lines):

diff -r 841220f564e4 -r af18c7215bde src/cmusieve-plugin.c
--- a/src/cmusieve-plugin.c	Tue Apr 01 16:52:33 2008 +0300
+++ b/src/cmusieve-plugin.c	Fri Apr 18 13:32:43 2008 +0300
@@ -25,6 +25,8 @@ static const char *get_sieve_path(void)
 	if (script_path != NULL) {
 		if (*script_path == '\0') {
 			/* disabled */
+			if (getenv("DEBUG") != NULL)
+				i_info("cmusieve: Empty script path, disabled");
 			return NULL;
 		}
 		script_path = home_expand(script_path);
@@ -47,6 +49,8 @@ static const char *get_sieve_path(void)
 	if (stat(script_path, &st) < 0) {
 		if (errno != ENOENT)
 			i_error("stat(%s) failed: %m", script_path);
+		else if (getenv("DEBUG") != NULL)
+			i_info("cmusieve: %s doesn't exist", script_path);
 
 		/* use global script instead, if one exists */
 		script_path = getenv("SIEVE_GLOBAL_PATH");


More information about the dovecot-cvs mailing list