mail-server icon indicating copy to clipboard operation
mail-server copied to clipboard

[bug]: Domains containing special characters

Open dervomsee opened this issue 1 year ago • 4 comments

What happened?

I'm experimenting with a clean server setup, where the primary domain is straß6.de (IDN domain xn--stra6-oqa.de). The domain contains the special character ß (https://en.wikipedia.org/wiki/%C3%9F) and there are several bugs or problems when going through the server setup. Mostly i cannot use straß6.de and have to use xn--stra6-oqa.de. Usernames containing a ß are also leading to bugs.

Is this in the current state of the development a issue or will it be fixed later. Or are IDN domains in JMAP not supported? If you are interested in more testing i can continue or i switch to a "normal" domain to play with the new mailserver setup.

Here a small list of bugs i remember.

How can we reproduce the problem?

I can reproduce the problem by doing the following steps:

  1. The initial configuration script fails:
✔ What is your server hostname? · mail.straß6.de
Do you want the TLS certificates for mail.straß6.de to be obtained automatically from Let's Encrypt using ACME? no
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/yasna-0.5.2/src/writer/mod.rs:672:9:
IA5 string must be ASCII
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  1. Account creation with username "cornelius_straß" works, but account manament fails:
$ stalwart-cli account delete cornelius_straß
Request failed: {"type":"about:blank","status":404,"title":"Not found","detail":"Account not found."}
  1. Domain can be created, but cannot be used. "stalwart-cli domain create straß6.de" works but the following fails:
$ stalwart-cli account create -d "Cornelius" -a "cornelius@straß6.de" cornelius pw_test
Request failed: 'straß6.de' does not exist. ("notFound")

Version

v0.5.x

What database are you using?

RocksDB

What blob storage are you using?

RocksDB

Where is your directory located?

Internal

What operating system are you using?

Docker

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

dervomsee avatar Jan 10 '24 21:01 dervomsee

Thanks for the report. This will be tested and fixed as currently only the SMTP Antispam component has been tested with international domains.

mdecimus avatar Jan 15 '24 12:01 mdecimus

Ok, thanks for the feedback.

dervomsee avatar Jan 17 '24 16:01 dervomsee

Can confirm that the bug still exists in 0.7.0 and is somewhat more serious in that the mail server is not able to receive email sent to an address that contains non-ASCII characters no matter how the address is formatted, with or without punycode.

I have domain xn--mkel-load.net which resolves into mäkelä.net. It is possible to add both domain and email alias in the punycode form, but received mail is still rejected for a missing local domain when mail is sent to xn--mkel-load.net. Probably because the sender does the conversion to mäkelä.net. I have tested this with iOS mail, Gmail and Microsoft Outlook.

As mentioned above, it is not possible to add a matching alias as it is not possible to add domain mäkelä.net. Both the Web Interface and stalwart-cli convert it to "m%c3%a4kel%c3%a4.net" which doesn't match anything when incoming mail is checked.

This behavior doesn't look quite consistent

$ stalwart-cli domain create 'mäkelä.net'
Successfully created domain "mäkelä.net"
$ stalwart-cli account add-email jum juhani@mäkelä.net
Request failed: mäkelä.net not found.)

juhanima avatar Apr 11 '24 18:04 juhanima

This is kind-of tedious to have to add the two different labels of the same domain to the config for it to be handled properly.

Avamander avatar Jun 28 '24 10:06 Avamander