On Fri, Jul 03, 2026 at 01:51:07AM +0200, Gerald Galster via Postfix-users 
wrote:

> A common tool for conversion is idn2:
> 
>   $ idn2 vestskovsløbet.dk
>   xn--vestskovslbet-knb.dk
> 
>   $ idn2 -d xn--vestskovslbet-knb.dk
>   vestskovsløbet.dk

If you need an IDNA2008 power-tool, I offer my "idnaparse" utility, it
actually adheres to IDNA2008, adding optional support for mappings, emoji,
mixing in specific forms of non-ldh ASCII labels, debugging malformed
u-labels, ...

    https://hackage.haskell.org/package/idnaparse-1.0.0.0

To install "cabal install idnaparse".  Sample output:

    $ printf "%s\n" "vestskovsløbet.dk" | idnaparse | jq -r .presentation
    xn--vestskovslbet-knb.dk

    $ printf "%s\n" "xn--vestskovslbet-knb.dk" | idnaparse | jq -r .output.text
    vestskovsløbet.dk

For a label-by-label view:

    $ ( printf "%s\n" "_domainkey.vestskovsløbet.dk" \
                      "0----0.xn--vestskovslbet-knb.dk" \
                      "\\027[H\\027[2J.vestskovsløbet.dk" ) |
        idnaparse --forms +attr,rldh | jq -rc '... extract essential details 
...'
    _domainkey.vestskovsløbet.dk
    ["ATTRLEAF","ULABEL","LDH"]
    _domainkey.xn--vestskovslbet-knb.dk
    ["ATTRLEAF","ULABEL","LDH"]
    _domainkey.vestskovsløbet.dk

    0----0.xn--vestskovslbet-knb.dk
    ["RLDH","ALABEL","LDH"]
    0----0.xn--vestskovslbet-knb.dk
    ["RLDH","ULABEL","LDH"]
    0----0.vestskovsløbet.dk

    \027[H\027[2J.vestskovsløbet.dk
    {"reason":"FormNotAllowed","label":0,"form":"OCTET"}

> Does the receiver's MUA transparently convert domain names?

One thing to be aware of is that DKIM signers are prone to "normalising"
IDNA domains in headers changing explicit A-label forms back to U-label
forms, perhaps in conformance with some RFC text, but as a result making
the mail undeliverable in some cases. :-(

So you can try to bypass SMTPUTF8 issues when mailing "приклад.example"
by using the A-label form "xn--80aikifvh.example", but the DKIM signer
will helpfully change it back to "приклад.example".

-- 
    Viktor.  🇺🇦 Слава Україні!
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to