IDN (Internationalized Domain Names)

hi,i have a problem with IDN! I understand the server supports only ASCII characters.
how to solve?

Mar 19 13:36:27 box postfix/smtpd[22800]: NOQUEUE: reject: RCPT from gateway.startcom.org[212.117.158.94]: 554 5.7.1 postmaster@xn--8dbbfrp.co.il: Relay access denied; from=certmaster@startcom.org to=postmaster@xn--8dbbfrp.co.il proto=SMTP helo=gateway.startcom.org


/etc/opendkim/KeyTable:חוכמה.co.il חוכמה.co.il:mail:/home/user-data/mail/dkim/mail.private
/etc/opendkim/SigningTable:*@חוכמה.co.il חוכמה.co.il

/etc/zones/%D7%97%D7%95%D7%9B%D7%9E%D7%94.co.il.txt.signed
/etc/zones/%D7%97%D7%95%D7%9B%D7%9E%D7%94.co.il.txt.ds

Unfortunately there is no simple fix. More work need to be done on Mail-in-a-Box for IDNs to work.

I am not strong in python, but I think I found the problem

diff --git a/management/mailconfig.py b/management/mailconfig.py
index b95ee87..cf4b5bf 100755
--- a/management/mailconfig.py
+++ b/management/mailconfig.py
@@ -58,7 +58,8 @@ def sanitize_idn_email_address(email):
        # values into the database.
        try:
                localpart, domainpart = email.split("@")
-               domainpart = domainpart.encode("ascii").decode("idna")
+               domainpart = domainpart.encode("idna").decode("ascii")
                return localpart + "@" + domainpart
        except:
                # Domain part is already Unicode or not IDNA-valid, so

It’s not that simple. See the commit log message:

The idea was also to do this in a way that would be nice for future SMTPUTF8 support:

(not yet available in the Postfix version we’re using).

I tested by sending email out from this “punny code” email account and got some reply back; However, sending email to this “punny code” domain from Gmail still doesn’t work (same as Chinese domain).

I am trying to get some help from friends and asking them to send some email; will see whether it works from non-Gmail account to Chinese domain or punny code.

@JoshData
Just tested with friends sending me emails to both IDN email address and Punny code address; the one to punny code address works.

Is there a setting in MailInaBox we have to turn on to make this work? Where do I see the logs of “relay rejected” for incoming mail? Or, the MAIB doesn’t have capacity in handing IDN name yet? But, IDN domain website being resolved no issue on MAIB and webside is displayed properly.

Are we somehow missing this part dealing with email? This is found in above code dealing with domain name and website. Or is this more POSTIX/Dovecot issue converting IDNA to ASCII? It might be a conversion from IDN to Punny code, since actual email account is currently only handled by punny code. When I try to create an account in Thunderbird or MAIB, it doesn’t support IDN name, only punny code account.

zone = zone.format(domain=domain.encode(“idna”).decode(“ascii”), primary_domain=env[“PRIMARY_HOSTNAME”].encode(“idna”).decode(“ascii”))

Thanks.

hmmm. as per one friend , he’s been able to send one email to my IDN name and it’s received by me at my Punny code account. Not sure whether this works occasionally pending on remote SMTP system???