Skip to content
Snippets Groups Projects
Commit 8fe5d7a2 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

Sieve plugin: only refer to user log for compile error details when there is...

Sieve plugin: only refer to user log for compile error details when there is actually a compile error.
parent 831fd560
No related branches found
No related tags found
No related merge requests found
......@@ -275,16 +275,15 @@ static struct sieve_binary *lda_sieve_open
if ( *error_r == SIEVE_ERROR_NOT_FOUND ) {
if ( debug )
sieve_sys_debug(svinst, "script file %s is missing", script_path);
} else if ( *error_r == SIEVE_ERROR_NOT_VALID &&
script_path == srctx->user_script && srctx->userlog != NULL ) {
sieve_sys_error(svinst,
"failed to open script %s "
"(view user logfile %s for more information)",
script_path, srctx->userlog);
} else {
if ( script_path == srctx->user_script && srctx->userlog != NULL ) {
sieve_sys_error(svinst,
"failed to open script %s "
"(view user logfile %s for more information)",
script_path, srctx->userlog);
} else {
sieve_sys_error(svinst,
"failed to open script %s", script_path);
}
sieve_sys_error(svinst,
"failed to open script %s", script_path);
}
return NULL;
......@@ -304,11 +303,12 @@ static struct sieve_binary *lda_sieve_recompile
( script_path == srctx->main_script ? "main_script" : NULL );
struct sieve_error_handler *ehandler;
struct sieve_binary *sbin;
bool debug = srctx->mdctx->dest_user->mail_debug;
/* Warn */
sieve_sys_warning(svinst, "encountered corrupt binary: re-compiling script %s",
script_path);
sieve_sys_warning(svinst,
"encountered corrupt binary: re-compiling script %s", script_path);
/* Recompile */
......@@ -320,7 +320,12 @@ static struct sieve_binary *lda_sieve_recompile
if ( (sbin=sieve_compile
(svinst, script_path, script_name, ehandler, error_r)) == NULL ) {
if ( script_path == srctx->user_script && srctx->userlog != NULL ) {
if ( *error_r == SIEVE_ERROR_NOT_FOUND ) {
if ( debug )
sieve_sys_debug(svinst, "script file %s is missing for re-compile",
script_path);
} else if ( *error_r == SIEVE_ERROR_NOT_VALID &&
script_path == srctx->user_script && srctx->userlog != NULL ) {
sieve_sys_error(svinst,
"failed to re-compile script %s "
"(view user logfile %s for more information)",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.