From 3792833c6969193900f2a5e8bcd19e745b522011 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Tue, 6 Jan 2009 01:30:55 +0100 Subject: [PATCH] Fixed various result error messages. --- src/lib-sieve/plugins/enotify/ntfy-mailto.c | 5 ++-- src/lib-sieve/plugins/imapflags/tag-flags.c | 25 ++++++++++--------- src/lib-sieve/plugins/vacation/cmd-vacation.c | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/lib-sieve/plugins/enotify/ntfy-mailto.c b/src/lib-sieve/plugins/enotify/ntfy-mailto.c index 663751dd8..576ddf108 100644 --- a/src/lib-sieve/plugins/enotify/ntfy-mailto.c +++ b/src/lib-sieve/plugins/enotify/ntfy-mailto.c @@ -841,14 +841,14 @@ static bool ntfy_mailto_send recipients = array_get(&mtctx->recipients, &count); if ( count == 0 ) { sieve_enotify_warning(nlog, - "notify mailto uri specifies no recipients; action has no effect."); + "notify mailto uri specifies no recipients; action has no effect"); return TRUE; } /* Just to be sure */ if ( senv->smtp_open == NULL || senv->smtp_close == NULL ) { sieve_enotify_warning(nlog, - "notify mailto method has no means to send mail."); + "notify mailto method has no means to send mail"); return TRUE; } @@ -1012,3 +1012,4 @@ static bool ntfy_mailto_action_execute + diff --git a/src/lib-sieve/plugins/imapflags/tag-flags.c b/src/lib-sieve/plugins/imapflags/tag-flags.c index aa80745f8..22218fe44 100644 --- a/src/lib-sieve/plugins/imapflags/tag-flags.c +++ b/src/lib-sieve/plugins/imapflags/tag-flags.c @@ -416,19 +416,20 @@ static bool seff_flags_pre_execute const char *const *keyword = array_idx(&ctx->keywords, i); const char *kw_error; - if ( trans->box != NULL && - mailbox_keyword_is_valid(trans->box, *keyword, &kw_error) ) - array_append(&trans->keywords, keyword, 1); - else { - char *error = ""; - if ( kw_error != NULL && *kw_error != '\0' ) { - error = t_strdup_noconst(kw_error); - error[0] = i_tolower(error[0]); - } + if ( trans->box != NULL ) { + if ( mailbox_keyword_is_valid(trans->box, *keyword, &kw_error) ) + array_append(&trans->keywords, keyword, 1); + else { + char *error = ""; + if ( kw_error != NULL && *kw_error != '\0' ) { + error = t_strdup_noconst(kw_error); + error[0] = i_tolower(error[0]); + } - sieve_result_warning(aenv, - "specified IMAP keyword '%s' is invalid (ignored): %s", - str_sanitize(*keyword, 64), error); + sieve_result_warning(aenv, + "specified IMAP keyword '%s' is invalid (ignored): %s", + str_sanitize(*keyword, 64), error); + } } } } diff --git a/src/lib-sieve/plugins/vacation/cmd-vacation.c b/src/lib-sieve/plugins/vacation/cmd-vacation.c index 9715e1eb4..6e6ccd054 100644 --- a/src/lib-sieve/plugins/vacation/cmd-vacation.c +++ b/src/lib-sieve/plugins/vacation/cmd-vacation.c @@ -836,7 +836,7 @@ static bool act_vacation_send /* Check smpt functions just to be sure */ if ( senv->smtp_open == NULL || senv->smtp_close == NULL ) { - sieve_result_warning(aenv, "vacation action has no means to send mail."); + sieve_result_warning(aenv, "vacation action has no means to send mail"); return TRUE; } -- GitLab