summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-07-18 22:16:38 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2018-07-18 22:24:40 +0100
commit946515bfe62796f6c0d6554e9e1e227f33253e7c (patch)
tree24fe295a0054cb9974aa3555dc21a9e1fd787a8b /src
parentd629c90c1c83ef1136008a4d6afeed9b6db903fc (diff)
I18N: Fix protocol recorded for a multi-SMTPUTF8-message connection. Bug 2287
Diffstat (limited to 'src')
-rw-r--r--src/src/smtp_in.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 0afb97ca6..6e2c45a8c 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -4671,13 +4671,15 @@ while (done <= 0)
case ENV_MAIL_OPT_UTF8:
if (smtputf8_advertised)
{
- int old_pool = store_pool;
-
DEBUG(D_receive) debug_printf("smtputf8 requested\n");
message_smtputf8 = allow_utf8_domains = TRUE;
- store_pool = POOL_PERM;
- received_protocol = string_sprintf("utf8%s", received_protocol);
- store_pool = old_pool;
+ if (Ustrncmp(received_protocol, US"utf8", 4) != 0)
+ {
+ int old_pool = store_pool;
+ store_pool = POOL_PERM;
+ received_protocol = string_sprintf("utf8%s", received_protocol);
+ store_pool = old_pool;
+ }
}
break;
#endif