diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/src/transports/smtp.c | 13 | ||||
-rw-r--r-- | src/src/utf8.c | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 0ca6b4e42..65bb1de22 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -1486,6 +1486,19 @@ if (continue_hostname == NULL) delayed till here so that $sending_interface and $sending_port are set. */ helo_data = expand_string(ob->helo_data); +#ifdef EXPERIMENTAL_INTERNATIONAL + if (helo_data) + { + uschar * errstr = NULL; + if ((helo_data = string_domain_utf8_to_alabel(helo_data, &errstr)), errstr) + { + errstr = string_sprintf("failed to expand helo_data: %s", errstr); + set_errno(addrlist, ERRNO_EXPANDFAIL, errstr, DEFER, FALSE, NULL); + yield = DEFER; + goto SEND_QUIT; + } + } +#endif /* The first thing is to wait for an initial OK response. The dreaded "goto" is nevertheless a reasonably clean way of programming this kind of logic, diff --git a/src/src/utf8.c b/src/src/utf8.c index 6d0c5029b..6bc0c2ed5 100644 --- a/src/src/utf8.c +++ b/src/src/utf8.c @@ -54,6 +54,7 @@ string_domain_alabel_to_utf8(const uschar * alabel, uschar ** err) uschar * s1; uschar * s; int rc; + if ( (rc = idna_to_unicode_8z8z(CCS alabel, CSS &s1, IDNA_USE_STD3_ASCII_RULES)) != IDNA_SUCCESS) { |