From 946515bfe62796f6c0d6554e9e1e227f33253e7c Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Wed, 18 Jul 2018 22:16:38 +0100 Subject: I18N: Fix protocol recorded for a multi-SMTPUTF8-message connection. Bug 2287 --- src/src/smtp_in.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') 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 -- cgit v1.2.3