UTF-8 domains not added in Postfix when adding UTF-8 domain

For a client I had to create a virtual server with domain name containing special characters (UTF-8) for example domain-containing-é.com

Now the domain itself got added, and the ASCII converted domain got set up internally. So far so good.

But then I had to receive e-mail on this domain name. So I set up info@domain-containing-é.com

Some mail servers (GMail for example) now actually use the real UTF-8 domain name if Postfix says it supports UTF-8.

But then you get a "Relay Access Denied" error because the UTF-8 domain is not included in /etc/postfix/virtual.

I was able to solve the issue in 2 different ways:

  • First I was able to fix it by disabling UTF-8 support by setting smtputf8_enable = no (and restarting Postfix). GMail would then just use the ASCII encoded version instead. This works. (But I think e-mail addresses containing UTF-8 in local part won't work anymore this way though?)
  • But a better fix was to keep it enabled (because of full UTF-8 support) and then just include the UTF-8 versions (next to the existing ASCII encoded versions) inside /etc/postfix/virtual and then running postmap /etc/postfix/virtual to update the database (and restarting Postfix)

I think this might be a Virtualmin related bug, because I think the fix would be to include the real UTF-8 domains as well in Postfix when creating e-mail addresses?



It seems like Gmail is doing it wrong if it's sending email to the UTF-8 domain name (without the xn-- prefix), as real domains can only contain ASCII characters. On the other hand, I haven't seen a formal spec that explains one way or another what the expected behavior is here ..