Page 1 of 1

Let's have UTF8 on Mailboxes

Posted: Sat 4. May 2024, 14:23
by amarc
Quick fix but very useful. For example if IMAP Mailbox (at least in my case) is named with ŠĐŽČĆ letter in them they can't be opened via Webmail.


Fix is to add in /etc/dovecot/dovecot.conf:

Instead:

Code: Select all

mail_location = maildir:/var/mail/vhosts/%d/%n[/b]
Like this:

Code: Select all

mail_location = maildir:/var/mail/vhosts/%d/%n:UTF-8
So just additional :UTF-8

I am not sure if this is one of files that get overwritten on update so maybe someone can suggest better location for this fix ?

Re: Let's have UTF8 on Mailboxes

Posted: Mon 13. May 2024, 13:38
by Alexander
Hello,

sorry, but I can not reproduce the underling issue here.

1) I have create the domain "šđžčć.com"
2) I have added the email address test@šđžčć.com
3) I was able to login into this account without any issues via Roundcube (1.6.6), Snappymail (2.36.0), or the outdated RainLoop and could access existing emails.

The path is "/var/mail/vhosts/xn--4dall33a0e.com/test/"

Re: Let's have UTF8 on Mailboxes

Posted: Thu 16. May 2024, 21:23
by amarc
Hi Alexander,

I had issues with IMAP folders with those chars, not actual domains/usernames.

Actually those folders were migrated from Plesk based hosting (not via your script but with simple rsync) and issue arise until I added this to dovecot. Not sure what would it be if I simply created those folders on Keyhelp via IMAP client (or Roundcube)

Re: Let's have UTF8 on Mailboxes

Posted: Wed 20. Aug 2025, 13:27
by rmeyer2099
Hi,

I just wasted half a day on that ...

I migrated from PLESK to Keyhelp using the Migration Tool / Task last weekend.

Today a user complained that some email folders are empty.

It affects all sub-folders with üäö or "&".

Example:

inbox-->Kunden-->Key_&_Help
inbox-->Kunden-->Küchen-Helfer

Both folders are displayed in Thunderbird or Roundcube Webmail
but they can not be accessed / are shown as empty.

To reproduce, migrate from Plesk
with a default setting in docecot.conf:

mail_location = maildir:/var/qmail/mailnames/%Ld/%Ln/Maildir:UTF-8

to keyhelp:

mail_location = maildir:/var/mail/vhosts/%d/%n (that is dovecot default --> use "7UTF" to encode folder names)

Problem:

Dovecot is trying to encode a "Key_&_Help" request sent from Thunderbird
as 7UTF --> "Key_&-_Help" (+ "-") but it can not find that folder "Key_&-_Help" ...