using the SMTPUTF8 option on their MAIL FROM commands, in one connection.
Previously the "utf8" would be re-prepended for every additional message.
+JH/19 Reject MAIL FROM commands with SMTPUTF8 when the facility was not advertised.
+ Previously thery were accepted, resulting in issues when attempting to
+ forward messages to a non-supporting MTA.
+
Exim version 4.91
-----------------
if (dsn_advertised)
{
/* Check if the dsn envid has been already set */
- if (dsn_envid != NULL)
+ if (dsn_envid)
{
synprot_error(L_smtp_syntax_error, 501, NULL,
US"ENVID can be specified once only");
#ifdef SUPPORT_I18N
case ENV_MAIL_OPT_UTF8:
- if (smtputf8_advertised)
+ if (!smtputf8_advertised)
{
- DEBUG(D_receive) debug_printf("smtputf8 requested\n");
- message_smtputf8 = allow_utf8_domains = TRUE;
- 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;
- }
+ synprot_error(L_smtp_syntax_error, 501, NULL,
+ US"SMTPUTF8 used when not advertised");
+ goto COMMAND_LOOP;
+ }
+
+ DEBUG(D_receive) debug_printf("smtputf8 requested\n");
+ message_smtputf8 = allow_utf8_domains = TRUE;
+ 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
1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <usery@test.ex> R=localuser
1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
1999-03-02 09:44:33 End queue run: pid=pppp -qqff
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
killdaemon
exim -DSERVER=server -DNOTDAEMON -qqff
****
+#
+#
+# Attempt to use when not advertised
+exim -DSERVER=server -DOPTION=: -bd -oX PORT_D
+****
+client 127.0.0.1 PORT_D
+??? 220
+EHLO client
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250 HELP
+MAIL FROM: <someone@some.domain> SMTPUTF8
+??? 501
+QUIT
+??? 221
+****
+killdaemon
+#
+#
no_msglog_check
354 Enter message, ending with "." on a line by itself\r
250 OK id=10HmaX-0005vi-00\r
221 the.local.host.name closing connection\r
+Connecting to 127.0.0.1 port 1225 ... connected
+??? 220
+<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO client
+??? 250-
+<<< 250-the.local.host.name Hello client [127.0.0.1]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-8BITMIME
+<<< 250-8BITMIME
+??? 250-PIPELINING
+<<< 250-PIPELINING
+??? 250 HELP
+<<< 250 HELP
+>>> MAIL FROM: <someone@some.domain> SMTPUTF8
+??? 501
+<<< 501 SMTPUTF8 used when not advertised
+>>> QUIT
+??? 221
+<<< 221 the.local.host.name closing connection
+End of script