1

I have tryied to find a solution for Postfix to handle punycode or to accept tlds with æ ø å- Can I some how enable this so it wont refuse the mailsending with "501 5.1.3 Bad recipient address postfix"

Really hope one of you guys have the answer.

i not sure if its postfix or some usermin/webmin fault. However it shows the problem that the (æ) turns in to ??

Its no problem sending over imap/pop3?

Server locale is:

    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=

Here is the log:

    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

Config:

    # 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
  • Postfix has [SMTPUTF8 support](http://www.postfix.org/SMTPUTF8_README.html) and it's enabled by default. Could you share your configuration, an email address that causes this error and the logs related? – Esa Jokinen May 25 '20 at 20:16
  • Sorry- im new in here should i share in the original post or where since "answer" clearly isnt the place :) – Michael W. Jensen May 26 '20 at 07:36
  • Now it's in the correct place, as a part of the original question. – Esa Jokinen May 26 '20 at 07:38

1 Answers1

0

Regarding punycode and email - as a general rule: Don't!

First off: Because it was never part of the email standard to begin with.

However there exists implementation for punycode for localpart of email adresse only, but it is not widely supported.

At least what I can gather from here:

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

Besides: Most of the world does not have the Scandinavian letters (ÆØÅ) on their keyboard, so why bother trying to setup server to accept punycoded email addresses? :-)

IMHO the hassle is not worth the trouble.

In any case: Does your postconf show smtputf8_enable = yes?

  • First thx for your time! I am aware of the standards in mailing. however client wants it to be easy for locale costumers to write the mail. :) There is no record of "smtputf8_enable = yes" in the main.cf – Michael W. Jensen May 26 '20 at 07:53
  • Well i did put it in the main an altso the auto detect- now it stil gives same error BUT it has the right letter in the logs Æ and not two ?? -b ut still illegal syntax :( – Michael W. Jensen May 26 '20 at 08:26
  • Well my first suggestion would be to add `smtputf8_enable = yes` to your config file as it is a precursor for what you are trying to achieve. :-) – Lasse Michael Mølgaard May 26 '20 at 09:44
  • ... and in Esa link to Postfix there are also mentioned support UTF8 domain names through `enable_idna2003_compatibility = yes`, but I guess we are getting into the experimental part of Postfix in that case? – Lasse Michael Mølgaard May 26 '20 at 09:53
  • Thx for the inputs, I have now enabled both- including `smtputf8_autodetect_classes = sendmail, verify` But its all cigar, and no smoke... I will reconsider the clients setup an 301 it back to ae instead. Thx for trying. – Michael W. Jensen May 27 '20 at 12:57