Email Address Internationalization for qmail. MAV from chkuser modified accordingly

November 20, 2024 by Roberto Puzzanghera 0 comments

We now have support for EAI (RFC 5336 SMTP Email Address Internationalization), as I accomodated the patch of Arnt Gulbrandsen into my qmail distribution (Nov 03, 2024 and later versions). This means that from now on addresses containing UTF8 characters like mimì@domain.tld or even आर्न्ट@यूनिवर्सल.भारत will be accepted provided that the remote server advertises the SMTPUTF8 verb after the MAIL FROM. If the remote server doesn't advertise SMTPUTF8 capabilities, then the conversation goes as in the past with no allowed UTF8 characters in the email addresses, with a few exceptions for special chars like $%?*^~&/\£#+_-.=

I also had to modify the Mail Address Verification program shipped by chkuser because, if activated by defining the CHKUSER_SENDER_FORMAT and/or CHKUSER_RCPT_FORMAT variables, it accepted only ASCII characters plus a small set of additional UTF8 in user and domain names. And since I was there I simplyfied the code dropping a couple of functions and variables.

These are the relevant changes to chkuser from the administrator point of view:

  • The new variable CHKUSER_INVALID_UTF8_CHARS defines the UTF8 characters which are not accepted in the user and domain name even when the SMTPUTF8 protocol is in effect. It defaults to (),:;<>@[]
  • CHKUSER_ALLOWED_CHARS defines the set of characters which are considered valid in sender and recipient names when the SMTP conversation goes as in the past with only ASCII characters. It defaults to $%?*^~&/\£#+_-.=
  • CHKUSER_ALLOWED_CHARS replaces the old CHKUSER_ALLOW_SENDER_CHAR_xx and CHKUSER_ALLOW_RCPT_CHAR_xx variables, which have been dropped (24 variables were too much).
  • CHKUSER_ALLOW_SENDER_SRS and CHKUSER_ALLOW_RCPT_SRS have been dropped as nowadays we are always accepting the '+' '#' '=' for the SRS. These characters must be present inside CHKUSER_ALLOWED_CHARS.

As always, you can set these variables by editing the chkuser_settings.h file (look at the bottom of that file), but in most cases the default values are fine.

Have fun!

Add a comment

Recent comments
See also...
Recent posts

RSS feeds