** .pp
** Also see $$use_domain and $$hidden_host.
*/
+#ifdef HAVE_LIBIDN
+ { "idn_decode", DT_BOOL, R_BOTH, OPTIDNDECODE, 1},
+ /*
+ ** .pp
+ ** When \fIset\fP, Mutt will show you international domain names decoded.
+ ** Note: You can use IDNs for addresses even if this is \fIunset\fP.
+ ** This variable only affects decoding. (IDN only)
+ */
+ { "idn_encode", DT_BOOL, R_BOTH, OPTIDNENCODE, 1},
+ /*
+ ** .pp
+ ** When \fIset\fP, Mutt will encode international domain names using
+ ** IDN. Unset this if your SMTP server can handle newer (RFC 6531)
+ ** UTF-8 encoded domains. (IDN only)
+ */
+#endif /* HAVE_LIBIDN */
{ "ignore_linear_white_space", DT_BOOL, R_NONE, OPTIGNORELWS, 0 },
/*
** .pp
** generated unless the user explicitly sets one using the ``$my_hdr''
** command.
*/
-#ifdef HAVE_LIBIDN
- { "use_idn", DT_BOOL, R_BOTH, OPTUSEIDN, 1},
- /*
- ** .pp
- ** When \fIset\fP, Mutt will show you international domain names decoded.
- ** Note: You can use IDNs for addresses even if this is \fIunset\fP.
- ** This variable only affects decoding.
- */
-#endif /* HAVE_LIBIDN */
#ifdef HAVE_GETADDRINFO
{ "use_ipv6", DT_BOOL, R_NONE, OPTUSEIPV6, 1},
/*
#ifdef HAVE_LIBIDN
is_idn_encoded = check_idn (domain);
- if (is_idn_encoded && option (OPTUSEIDN))
+ if (is_idn_encoded && option (OPTIDNDECODE))
{
if (idna_to_unicode_8z8z (domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
goto cleanup;
* produce a non-matching domain! Thus we only want to do the
* idna_to_ascii_8z() if the original domain was IDNA encoded.
*/
- if (is_idn_encoded && option (OPTUSEIDN))
+ if (is_idn_encoded && option (OPTIDNDECODE))
{
if (idna_to_ascii_8z (reversed_domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
{
goto cleanup;
#ifdef HAVE_LIBIDN
- if (idna_to_ascii_8z (domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
- goto cleanup;
- mutt_str_replace (&domain, tmp);
+ if (option (OPTIDNENCODE))
+ {
+ if (idna_to_ascii_8z (domain, &tmp, IDNA_ALLOW_UNASSIGNED) != IDNA_SUCCESS)
+ goto cleanup;
+ mutt_str_replace (&domain, tmp);
+ }
#endif /* HAVE_LIBIDN */
mailbox = safe_malloc (mutt_strlen (user) + mutt_strlen (domain) + 2);