dovecot-2.2-pigeonhole: lib-sieve: message body: Explicitly prev...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Wed Dec 30 20:39:19 UTC 2015


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/edf27ea6c07e
changeset: 2184:edf27ea6c07e
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Wed Dec 30 21:34:33 2015 +0100
description:
lib-sieve: message body: Explicitly prevent attempting text extraction from header and multipart body parts.

diffstat:

 src/lib-sieve/sieve-message.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 63034e62482b -r edf27ea6c07e src/lib-sieve/sieve-message.c
--- a/src/lib-sieve/sieve-message.c	Wed Dec 30 17:21:35 2015 +0100
+++ b/src/lib-sieve/sieve-message.c	Wed Dec 30 21:34:33 2015 +0100
@@ -971,7 +971,9 @@
 
 	/* Extract text if requested */
 	result_buf = buf;
-	if ( extract_text ) {
+	if ( extract_text && body_part->children == NULL &&
+		!body_part->epilogue ) {
+
 		if ( mail_html2text_content_type_match
 			(body_part->content_type) ) {
 			struct mail_html2text *html2text;
@@ -1240,7 +1242,7 @@
 				/* Save headers for message/rfc822 part */
 				if ( header_part != NULL ) {
 					sieve_message_part_save
-						(renv, buf, header_part, extract_text);
+						(renv, buf, header_part, FALSE);
 					header_part = NULL;
 				}
 


More information about the dovecot-cvs mailing list