[exim-cvs] I18N: change default on smtp transport, to downc…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Exim Git Commits Mailing List
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] I18N: change default on smtp transport, to downconvert-when-needed
Gitweb: https://git.exim.org/exim.git/commitdiff/b16c9f8bdcfd4cce490af9e493489e128f5c8f52
Commit:     b16c9f8bdcfd4cce490af9e493489e128f5c8f52
Parent:     b6df68c68ad86cafb9531bb6c25fac648d0e706b
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Thu May 7 14:11:49 2020 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Thu May 7 14:55:47 2020 +0100


    I18N: change default on smtp transport, to downconvert-when-needed
---
 doc/doc-docbook/spec.xfpt            |  5 +++--
 doc/doc-txt/ChangeLog                | 10 ++++++++++
 src/src/transports/smtp.c            |  2 +-
 test/confs/4211                      |  5 +++--
 test/confs/4221                      |  5 +++--
 test/scripts/4200-International/4203 |  2 +-
 test/scripts/4200-International/4204 |  4 ++--
 test/scripts/4200-International/4206 |  4 ++--
 8 files changed, 25 insertions(+), 12 deletions(-)


diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 4069c29..af28f0c 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -25672,7 +25672,7 @@ The &%tls_verify_certificates%& option must also be set.
If both this option and &%tls_try_verify_hosts%& are unset
operation is as if this option selected all hosts.

-.option utf8_downconvert smtp integer&!! unset
+.option utf8_downconvert smtp integer&!! -1
.cindex utf8 "address downconversion"
.cindex i18n "utf8 address downconversion"
If built with internationalization support,
@@ -25680,7 +25680,8 @@ this option controls conversion of UTF-8 in message envelope addresses
to a-label form.
If, after expansion, the value is 1, 0, or -1 then this value overrides
any value previously set for the message. Otherwise, any previously
-set value is used.
+set value is used. To permit use of a previous value,
+set this option to an empty string.
For details on the values see section &<<SECTi18nMTA>>&.


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 6109a14..3cd92b8 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -189,6 +189,16 @@ JH/41 Bug 2571: Fix SPA authenticator.  Running as a server, an offset supplied
       being used.  A malicious client could thus cause an out-of-bounds read and
       possibly gain authentication.  Fix by adding the check.


+JH/42 Internationalisation: change the default for downconversion in the smtp
+      transport to be "if needed".  Previously it was "as previously set" for
+      the message, which usually meant "if needed" for message-submission but
+      "no" for everything else.  However, MTAs have been seen using SMTPUTF8
+      even when the envelope addresses did not need it, resulting in forwarding
+      failures to non-supporting MTAs.  A downconvert in such cases will be
+      a no-op on the addresses, merely dropping the use of SMTPUTF8 by the
+      transport.  The change does mean that addresses needing conversion will
+      be converted when previously a delivery failure would occur.
+


 Exim version 4.93
 -----------------
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c
index 6795a0b..8492a7f 100644
--- a/src/src/transports/smtp.c
+++ b/src/src/transports/smtp.c
@@ -241,7 +241,7 @@ smtp_transport_options_block smtp_transport_option_defaults = {
   .tls_verify_cert_hostnames =    US"*",
 #endif
 #ifdef SUPPORT_I18N
-  .utf8_downconvert =        NULL,
+  .utf8_downconvert =        US"-1",
 #endif
 #ifndef DISABLE_DKIM
  .dkim =
diff --git a/test/confs/4211 b/test/confs/4211
index d4aaa44..0448883 100644
--- a/test/confs/4211
+++ b/test/confs/4211
@@ -114,9 +114,10 @@ local_delivery:
   return_path_add


 rmt_smtp:
-  driver = smtp
+  driver =        smtp
   hosts_try_fastopen =    :
-  hosts_require_tls = *
+  hosts_require_tls =    *
   tls_try_verify_hosts = :
+  utf8_downconvert =    0


# End
diff --git a/test/confs/4221 b/test/confs/4221
index d4aaa44..61205cd 100644
--- a/test/confs/4221
+++ b/test/confs/4221
@@ -114,9 +114,10 @@ local_delivery:
return_path_add

 rmt_smtp:
-  driver = smtp
+  driver =    smtp
   hosts_try_fastopen =    :
-  hosts_require_tls = *
+  hosts_require_tls =    *
   tls_try_verify_hosts = :
+  utf8_downconvert =    0


# End
diff --git a/test/scripts/4200-International/4203 b/test/scripts/4200-International/4203
index 310cbd7..914ed91 100644
--- a/test/scripts/4200-International/4203
+++ b/test/scripts/4200-International/4203
@@ -6,7 +6,7 @@ exim -DSERVER=server -DOPTION="" -bd -oX PORT_D
****
#
# forwarding fails when target does not support SMTPUTF8
-exim -bs -odi
+exim -DSTRICT=0 -bs -odi
EHLO client.ffail
MAIL FROM: <यहलोगहिन्दीक्योंनहींबोलसकतेहैं@japanese.なぜみんな日本語を話してくれないのか.local> SMTPUTF8
RCPT TO: <userz@???>
diff --git a/test/scripts/4200-International/4204 b/test/scripts/4200-International/4204
index 3063f5a..f8efcc3 100644
--- a/test/scripts/4200-International/4204
+++ b/test/scripts/4200-International/4204
@@ -41,7 +41,7 @@ exim -DSERVER=server -DOPTION="" -bd -oX PORT_D
****
#
# Recipient verify callout, fail
-exim -bs -odi -DCONTROL="verify=recipient/callout"
+exim -bs -odi -DCONTROL="verify=recipient/callout" -DSTRICT=0
EHLO client.ffail
MAIL FROM: <CALLER@???énopuedensimplementehablarenEspañol.local> SMTPUTF8
RCPT TO: <userS@???>
@@ -49,7 +49,7 @@ QUIT
****
#
# Recipient+random verify callout, fail
-exim -bs -odi -DCONTROL="verify=recipient/callout=random"
+exim -bs -odi -DCONTROL="verify=recipient/callout=random" -DSTRICT=0
EHLO client.ffail
MAIL FROM: <CALLER@???ạisaohọkhôngthểchỉnóitiếngViệt.local> SMTPUTF8
RCPT TO: <userT@???>
diff --git a/test/scripts/4200-International/4206 b/test/scripts/4200-International/4206
index 4c558f4..658f2cb 100644
--- a/test/scripts/4200-International/4206
+++ b/test/scripts/4200-International/4206
@@ -39,14 +39,14 @@ exim -DSERVER=server -DNOTDAEMON -qqff
exim -DSERVER=server -DOPTION="" -bd -oX PORT_D
****
# sender verify callout, fail
-exim -bs -odi -DCONTROL="verify=sender/callout"
+exim -bs -odi -DCONTROL="verify=sender/callout" -DSTRICT=0
EHLO client.sfail
MAIL FROM: <userA@???> SMTPUTF8
RCPT TO: <user.यष्टिमधु@test.ex>
QUIT
****
# sender+random verify callout, fail
-exim -bs -odi -DCONTROL="verify=sender/callout=random"
+exim -bs -odi -DCONTROL="verify=sender/callout=random" -DSTRICT=0
EHLO client.sfail
MAIL FROM: <userB.જેઠીમધ@test.ex> SMTPUTF8
RCPT TO: <user.ქართული@test.ex>