On Sun, Feb 14, 2021 at 10:49:52AM -0500, John Levine wrote:
> I'm using postfix 3.5.8 on FreeBSD 12.2, the packaged version
> 
> I have set up a Chinese EAI domain with some Chinese addresses.
> 
> The domain is in virtual_alias_domains, and I have an address map:
> 
> # virtual addresses
> 回声@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s     echo
> #@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s      echo
> 回声@声.电子邮件测试.中国        echo
> #@声.电子邮件测试.中国 echo
> 
> (The echo user sends back a copy of the message, for debugging.)
> 
> When I send a message locally to the EAI address it works.  When I send a 
> message to the same
> address from outside via SMTP, it says it's not in the table.  Any 
> suggestions?

The problem does not reproduce. That is, Postfix
accepts mail for 回声@声.电子邮件测试.中国 and
回声@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s, successfully looks
up both virtual aliases, and attempts to deliver both to a local user
"echo" (which in my case does not exist).

I saved your virtual alias map to file, and replaced 'echo' with
'echo@localhost' so that mail would not leave the test machine.

    $ cat /etc/postfix/jl-virtual
    回声@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s     echo@localhost
    #@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s        echo@localhost
    回声@声.电子邮件测试.中国       echo@localhost
    #@声.电子邮件测试.中国  echo@localhost

    $ postmap /etc/postfix/jl-virtual

Verification:

    $ postmap -s hash:/etc/postfix/jl-virtual
    回声@声.电子邮件测试.中国      echo@localhost
    回声@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s   echo@localhost

Postfix configuration:

    $ postconf -x virtual_alias_maps virtual_alias_domains smtputf8_enable 
smtpd_relay_restrictions smtpd_recipient_restrictions
    virtual_alias_maps = hash:/etc/postfix/jl-virtual
    virtual_alias_domains = 声.电子邮件测试.中国 
xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s
    smtputf8_enable = yes
    smtpd_relay_restrictions = reject_unauth_destination
    smtpd_recipient_restrictions =

SMTP commands, to show that 'known' aliases are found, and that 'unknown'
aliases are properly rejected:

    $ cat /tmp/echo.smtp
    ehlo wzv.porcupine.org
    mail from:<> SMTPUTF8
    rcpt to:<回声@声.电子邮件测试.中国>
    rcpt to:<回声@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s>
    rcpt to:<whatever@声.电子邮件测试.中国>
    rcpt to:<whate...@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s>
    data
    whatever
    .
    quit

Test with netcat:

    # nc  -w 5 127.0.0.1 25 </tmp/echo.smtp
    220 wzv.porcupine.org ESMTP Postfix
    250-wzv.porcupine.org
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-XCLIENT NAME ADDR PROTO HELO REVERSE_NAME PORT LOGIN DESTADDR DESTPORT
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250-DSN
    250-SMTPUTF8
    250 CHUNKING
    250 2.1.0 Ok
    250 2.1.5 Ok
    250 2.1.5 Ok
    550 5.1.1 <whatever@声.电子邮件测试.中国>: Recipient address rejected: User unknown 
in virtual alias table
    550 5.1.1 <whate...@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s>: 
Recipient address rejected: User unknown in virtual alias table
    354 End data with <CR><LF>.<CR><LF>
    250 2.0.0 Ok: queued as 4Ddw0z4T2fz4w8j
    221 2.0.0 Bye

maillog:

Feb 14 12:57:07 wzv postfix/smtpd[249245]: connect from localhost[127.0.0.1]
Feb 14 12:57:07 wzv postfix/smtpd[249245]: improper command pipelining after 
EHLO from localhost[127.0.0.1]: ...omitted...
Feb 14 12:57:07 wzv postfix/smtpd[249245]: 4Ddw0z4T2fz4w8j: 
client=localhost[127.0.0.1]
Feb 14 12:57:07 wzv postfix/smtpd[249245]: 4Ddw0z4T2fz4w8j: reject: RCPT from 
localhost[127.0.0.1]: 550 5.1.1 <whatever@声.电子邮件测试.中国>: Recipient address 
rejected: User unknown in virtual alias table; from=<> 
to=<whatever@声.电子邮件测试.中国> proto=ESMTP helo=<wzv.porcupine.org>
Feb 14 12:57:07 wzv postfix/smtpd[249245]: 4Ddw0z4T2fz4w8j: reject: RCPT from 
localhost[127.0.0.1]: 550 5.1.1 
<whate...@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s>: Recipient address 
rejected: User unknown in virtual alias table; from=<> 
to=<whate...@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s> proto=ESMTP 
helo=<wzv.porcupine.org>
Feb 14 12:57:07 wzv postfix/cleanup[249248]: 4Ddw0z4T2fz4w8j: 
message-id=<4ddw0z4t2fz4...@wzv.porcupine.org>
Feb 14 12:57:07 wzv postfix/qmgr[249239]: 4Ddw0z4T2fz4w8j: from=<>, size=292, 
nrcpt=2 (queue active)
Feb 14 12:57:07 wzv postfix/smtpd[249245]: disconnect from localhost[127.0.0.1] 
ehlo=1 mail=1 rcpt=2/4 data=1 quit=1 commands=6/8
Feb 14 12:57:07 wzv postfix/local[249249]: 4Ddw0z4T2fz4w8j: 
to=<echo@localhost>, 
orig_to=<回声@xn--zbs01c.xn--5nqx41au4nqohsp3axcg.xn--fiqs8s>, relay=local, 
delay=0.01, delays=0.01/0/0/0, dsn=5.1.1, status=bounced (unknown user: "echo")
Feb 14 12:57:08 wzv postfix/local[249254]: 4Ddw0z4T2fz4w8j: 
to=<echo@localhost>, orig_to=<回声@声.电子邮件测试.中国>, relay=local, delay=1.1, 
delays=0.01/0/0/1.1, dsn=5.1.1, status=bounced (unknown user: "echo")
Feb 14 12:57:08 wzv postfix/qmgr[249239]: 4Ddw0z4T2fz4w8j: removed

        Wietse

Reply via email to