From 87a9a69613c8b164156e87ea4fae7ccc10b7f513 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Fri, 19 Dec 2008 16:12:57 +0100 Subject: [PATCH] Substituted mail_get_headers for mail_get_headers_utf8 for those occasions where utf8 is of no concern. --- src/lib-sieve/plugins/enotify/ntfy-mailto.c | 2 +- src/lib-sieve/plugins/vacation/cmd-vacation.c | 10 +++++----- src/lib-sieve/tst-exists.c | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/lib-sieve/plugins/enotify/ntfy-mailto.c b/src/lib-sieve/plugins/enotify/ntfy-mailto.c index 620a82d7a..ba5374c78 100644 --- a/src/lib-sieve/plugins/enotify/ntfy-mailto.c +++ b/src/lib-sieve/plugins/enotify/ntfy-mailto.c @@ -616,7 +616,7 @@ static bool ntfy_mailto_action_execute const char *const *headers; /* Is the message an automatic reply ? */ - if ( mail_get_headers_utf8 + if ( mail_get_headers (msgdata->mail, "auto-submitted", &headers) >= 0 ) { const char *const *hdsp = headers; diff --git a/src/lib-sieve/plugins/vacation/cmd-vacation.c b/src/lib-sieve/plugins/vacation/cmd-vacation.c index 55a92020c..6a6a46831 100644 --- a/src/lib-sieve/plugins/vacation/cmd-vacation.c +++ b/src/lib-sieve/plugins/vacation/cmd-vacation.c @@ -828,7 +828,7 @@ static bool act_vacation_send rfc2822_header_field_printf(f, "Subject", "%s", str_sanitize(ctx->subject, 256)); - references = mail_get_headers_utf8 + references = mail_get_headers (aenv->msgdata->mail, "references", &headers); if ( msgdata->id != NULL ) { @@ -922,7 +922,7 @@ static bool act_vacation_commit /* Are we trying to respond to a mailing list ? */ hdsp = _list_headers; while ( *hdsp != NULL ) { - if ( mail_get_headers_utf8 + if ( mail_get_headers (msgdata->mail, *hdsp, &headers) >= 0 && headers[0] != NULL ) { /* Yes, bail out */ sieve_result_log(aenv, @@ -934,7 +934,7 @@ static bool act_vacation_commit } /* Is the message that we are replying to an automatic reply ? */ - if ( mail_get_headers_utf8 + if ( mail_get_headers (msgdata->mail, "auto-submitted", &headers) >= 0 ) { /* Theoretically multiple headers could exist, so lets make sure */ hdsp = headers; @@ -949,8 +949,8 @@ static bool act_vacation_commit } } - /* Check for non-standard precedence header */ - if ( mail_get_headers_utf8 + /* Check for the non-standard precedence header */ + if ( mail_get_headers (msgdata->mail, "precedence", &headers) >= 0 ) { /* Theoretically multiple headers could exist, so lets make sure */ hdsp = headers; diff --git a/src/lib-sieve/tst-exists.c b/src/lib-sieve/tst-exists.c index fa25143da..a2760ae13 100644 --- a/src/lib-sieve/tst-exists.c +++ b/src/lib-sieve/tst-exists.c @@ -122,11 +122,12 @@ static int tst_exists_operation_execute /* Iterate through all requested headers to match (must find all specified) */ hdr_item = NULL; matched = TRUE; - while ( matched && (result=sieve_coded_stringlist_next_item(hdr_list, &hdr_item)) + while ( matched && + (result=sieve_coded_stringlist_next_item(hdr_list, &hdr_item)) && hdr_item != NULL ) { const char *const *headers; - if ( mail_get_headers_utf8 + if ( mail_get_headers (renv->msgdata->mail, str_c(hdr_item), &headers) < 0 || headers[0] == NULL ) { matched = FALSE; -- GitLab