[exim-dev] [Bug 1567] New: Useful IDN string expansions

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Mike Cardwell
Fecha:  
A: exim-dev
Temas nuevos: [exim-dev] [Bug 1567] Useful IDN string expansions, [exim-dev] [Bug 1567] Useful IDN string expansions, [exim-dev] [Bug 1567] Useful IDN string expansions
Asunto: [exim-dev] [Bug 1567] New: Useful IDN string expansions
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1567
           Summary: Useful IDN string expansions
           Product: Exim
           Version: N/A
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: wishlist
          Priority: medium
         Component: String expansion
        AssignedTo: nigel@???
        ReportedBy: exim-users@???
                CC: exim-dev@???



Please consider adding string expansions for performing IDNA2008 and UTS46
encoding/decoding.

Use case: I have an existing database where hostnames are stored using their
unicode representation, rather than as ASCII. When somebody emails:

postmaster@tëst.example.com

It gets encoded to an ASCII representation, so by the time Exim receives it,
$domain will contain:

xn--tst-7ea3z.example.com

I'd like to decode that back to the unicode representation so I can look it up
in the database. E.g:

${lookup pgsql{SELECT * FROM hostnames WHERE
name='${quote_pgsql:${decode_uts46:$domain}}'}}

I can already handle this conversion using embedded Perl and Net::IDN::Encode,
but internationalised hostnames seem to me like something which Exim should
support natively.

It might make sense to supply some additional string expansions with more
generic names, eg "domain_to_ascii" and "domain_to_unicode" where Exim can
choose which algorithm would be sensible to use. UTS46 probably to start with
and then it can switch to IDNA2008 at some point in the future.

Another thought. Any existing variables which contain hostnames could have new
ascii_ and unicode_ variants. I.e:

$unicode_domain
$ascii_domain
$unicode_sender_host_name
$ascii_sender_host_name

And so on....


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email