Postfix - 域中的收件人地址语法字符集错误

Postfix - 域中的收件人地址语法字符集错误

我曾尝试为 Postfix 找到一个解决方案来处理 punycode 或接受带有 æ ø å 的 tlds - 我可以以某种方式启用此功能,以便它不会拒绝发送带有“501 5.1.3 Bad mailboxes postfix”的邮件

真心希望你们中有人能给出答案。

我不确定是 postfix 还是 usermin/webmin 出了问题。但它显示了 (æ) 变成 ?? 的问题。

通过 imap/pop3 发送没有问题吗?

服务器区域设置为:

    LANG=da_DK.utf8
LANGUAGE=
LC_CTYPE="da_DK.utf8"
LC_NUMERIC="da_DK.utf8"
LC_TIME="da_DK.utf8"
LC_COLLATE="da_DK.utf8"
LC_MONETARY="da_DK.utf8"
LC_MESSAGES="da_DK.utf8"
LC_PAPER="da_DK.utf8"
LC_NAME="da_DK.utf8"
LC_ADDRESS="da_DK.utf8"
LC_TELEPHONE="da_DK.utf8"
LC_MEASUREMENT="da_DK.utf8"
LC_IDENTIFICATION="da_DK.utf8"
LC_ALL=

以下是日志:

    May 26 08:48:59 mail1 postfix/smtpd[28500]: warning: Illegal address syntax localhost[127.0.0.1] in RCPT command: <name@larsensd??kcenter.dk>
May 26 08:48:59 mail1 postfix/smtpd[28500]: lost connection after RCPT from localhost[127.0.0.1]
May 26 08:48:59 mail1 postfix/smtpd[28500]: disconnect from localhost[127.0.0.1] helo=1 mail=1 rcpt=0/1 commands=2/3

配置:

    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
#smtputf8_enable = yes
#smtputf8_autodetect_classes = all

# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/letsencrypt/live/domain.tld/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/domain.tld/privkey.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_protocols = all
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service inet:127.0.0.1:10023
smtp_tls_security_level = may
allow_percent_hack = no
message_size_limit = 100240000
mynetworks_style = subnet
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
smtpd_tls_security_level = may
smtp_sasl_security_options = 
hopcount_limit = 80

答案1

关于 punycode 和电子邮件 - 一般规则是:不要!

首先:因为它从来就不是电子邮件标准的一部分。

然而,目前存在针对电子邮件地址本地部分的 punycode 的实现,但并未得到广泛支持。

至少我可以从这里了解到:

https://stackoverflow.com/questions/7497468/can-punycode-encoded-email-addresses-clash-with-real-addresses

此外:世界上大多数人的键盘上都没有斯堪的纳维亚字母(ÆØÅ),所以为什么还要费心设置服务器来接受punycoded的电子邮件地址呢?:-)

我认为这种麻烦不值得。

无论如何:你的 postconf 显示吗smtputf8_enable = yes

相关内容