dovecot-2.0: lmtp: BODY=* setting wasn't reset with RSET

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 23 23:51:56 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/c237fcea3f0c
changeset: 11624:c237fcea3f0c
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 23 21:51:46 2010 +0100
description:
lmtp: BODY=* setting wasn't reset with RSET

diffstat:

 src/lmtp/client.h   |  5 +++--
 src/lmtp/commands.c |  8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (49 lines):

diff -r c3ee4421e86a -r c237fcea3f0c src/lmtp/client.h
--- a/src/lmtp/client.h	Wed Jun 23 17:52:02 2010 +0100
+++ b/src/lmtp/client.h	Wed Jun 23 21:51:46 2010 +0100
@@ -33,6 +33,9 @@
 
 	struct mail_user *dest_user;
 	struct mail *first_saved_mail;
+
+	unsigned int mail_body_7bit:1;
+	unsigned int mail_body_8bitmime:1;
 };
 
 struct client {
@@ -62,8 +65,6 @@
 	struct lmtp_proxy *proxy;
 
 	unsigned int disconnected:1;
-	unsigned int mail_body_7bit:1;
-	unsigned int mail_body_8bitmime:1;
 };
 
 extern unsigned int clients_count;
diff -r c3ee4421e86a -r c237fcea3f0c src/lmtp/commands.c
--- a/src/lmtp/commands.c	Wed Jun 23 17:52:02 2010 +0100
+++ b/src/lmtp/commands.c	Wed Jun 23 21:51:46 2010 +0100
@@ -95,9 +95,9 @@
 
 	for (argv++; *argv != NULL; argv++) {
 		if (strcasecmp(*argv, "BODY=7BIT") == 0)
-			client->mail_body_7bit = TRUE;
+			client->state.mail_body_7bit = TRUE;
 		else if (strcasecmp(*argv, "BODY=8BITMIME") == 0)
-			client->mail_body_8bitmime = TRUE;
+			client->state.mail_body_8bitmime = TRUE;
 		else {
 			client_send_line(client,
 				"501 5.5.4 Unsupported options");
@@ -263,9 +263,9 @@
 		client->proxy = lmtp_proxy_init(client->set->hostname,
 						dns_client_socket_path,
 						client->output);
-		if (client->mail_body_8bitmime)
+		if (client->state.mail_body_8bitmime)
 			args = " BODY=8BITMIME";
-		else if (client->mail_body_7bit)
+		else if (client->state.mail_body_7bit)
 			args = " BODY=7BIT";
 		else
 			args = "";


More information about the dovecot-cvs mailing list