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[]: 554 5.7.1 Relay access denied; proto=SMTP

/etc/opendkim/KeyTable:חוכמה חוכמה
/etc/opendkim/SigningTable:*@חוכמה חוכמה


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/ b/management/
index b95ee87..cf4b5bf 100755
--- a/management/
+++ b/management/
@@ -58,7 +58,8 @@ def sanitize_idn_email_address(email):
        # values into the database.
                localpart, domainpart = email.split("@")
-               domainpart = domainpart.encode("ascii").decode("idna")
+               domainpart = domainpart.encode("idna").decode("ascii")
                return localpart + "@" + domainpart
                # 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.

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”))


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???