Symptoms
-
Going to Domains > example.com > Mail > [email protected] > Email Aliases contains an Email alias with NONASCII characters (like umlaut ä, ö, ü letters or symbols like "♥" or random sequences with leading "u")
-
Unable to remove the mail alias with NONASCII characters or to update the mail password, it fails with the following error message:
Error: mailmng-core failed: mailmng[850001]: Session mail DB info parsing error: Invalid or unsupported Unicode character or escape sequence found in string. UTF8 encoded characters and 'u' escape sequences are not supported. Error occured at offset 183, character ''.
Fatal error: std::runtime_error(Failed to read and parse session mail data from STDIN. See mail log for details.) -
Trying to rename the mail alias with NONASCII characters fails with the following error message:
Error: mailmng-outgoing failed: ERROR:outgoing: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
Search for related Knowledge Base articles
Cause
This is a Plesk bug with ID #PPP-46470 which will be fixed in future Plesk versions.
Note: Subscribe to this article to get notified once the fix will become available.
Resolution
-
Connect to the server via SSH
-
# plesk db dump psa > psa.backup.sql
- Access Plesk database
-
Find all the mail aliases with NONASCII characters (like umlaut ä, ö, ü letters, characters with accent or symbols like "♥" or random sequences with leading "u"):
# plesk db "select ma.id as 'Mail Alias ID',ma.alias as 'Mail Alias', m.mail_name as 'Mail Domain',d.name as 'Domain' from mail m, mail_aliases ma, domains d where d.id=m.dom_id and ma.mn_id=m.id and ma.alias regexp '[^ -~]'"
+---------------+------------+-------------+-------------+
| Mail Alias ID | Mail Alias | Mail Domain | Domain |
+---------------+------------+-------------+-------------+
| 7 | ülises | noreply | example.com |
+---------------+------------+-------------+-------------+ -
Delete mail alias including NONASCII characters:
# plesk db "delete from mail_aliases where id = 7"
-
Repair Mail:
# plesk repair mail example.com