1

Topic: Roundcube folder name issue

==== Required information ====
- iRedMail version: 0.8.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: centos6.2
- Related log if you're reporting an issue:
====

Hi Zhang,

We got a lot users with Big5 name email folders on old server migrated to new server, centos can show those Big5 folder names during migration script process.
But after migration, Roundcube cannot recognize those folders even we set webmail to traditional chinese interface and set big5 for email default charset.
It seems Roundcube only recognize big5 for email, not for folder name, any idea to fix the issue? Thanks.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Roundcube folder name issue

How did you migrate these mailboxes? If old server uses Maildir/ format, you can simply copy them to new server.

Reference: http://tools.ietf.org/html/rfc3501#section-5.1

3

Re: Roundcube folder name issue

Hi Zhang,

Those mail folders were created by openwebmail in mbox format, we use mb2md convert them to mdir format. During the convert script process, we can see those traditional chinese show ok.

But after that roundcube webmail cannot recognize them. If we change browser encode to big5 then those folder names show ok in webmail but all other non big5 links are broken. we tried change default charset for email to big5 in main.inc.php but it does not work for folder name, any idea? Thanks for your suggestion.

4

Re: Roundcube folder name issue

Which mb2md script? This one? http://dovecot.org/tools/mb2md.pl

As mentioned in the link in my previous reply, IMAP folder name must be encoded in UTF7, it's defined in RFC. So i guess your mb2md script doesn't convert it. Probably the author didn't test CJK at all. smile

If you're familiar with PHP, you can find below one, it creates folder with UTF7 encoded characters instead of Chinese characters directly: http://php.net/manual/en/function.imap- … ailbox.php

And, example in Python programming language:

>>> s = u'简体中文'
>>> s.encode('utf-7')
'+e4BPU04tZYc-'

So the folder '简体中文' shown in webmail must be '.&e4BPU04tZYc-' on file system. e.g. /path/to/folder/INBOX/.&e4BPU04tZYc-/.

Hope it helps.

5

Re: Roundcube folder name issue

Hi Zhang,

Thanks for your helpful hints. yes, the issue was because dovecot mb2md does not convert international folder names to utf8.
Since we do not know user passwords we are not able to use that php script.

we have used iconv script to convert names to utf8 and they can show in roundcube webmail, but when click to subscribe them, roundcube says those folder (such as ".&WDFQ+Q-sample", etc) not exist.

we have tried using "doveadm mailbox mutf7 ..." to convert those utf8 names to mutf7 name but it seems the command only show mutf7 string result (like .&WDFQ+Q-sample") on screen but did not convert folders actually. Moreover, it did not handle names with space properly and breaks such name into separate lines.
Is mutf7 encoding be the must for imap and is there any script tool can achieve this? Thanks!

6

Re: Roundcube folder name issue

Hi Zhang,

when we run # doveadm mailbox mutf7 -8 .*
it shows:
.Parts Quotation
.&U1qcMg-
.&WDFQ+Q-sample

seems ok but when ll -a, it does not show such mutf names. Also roundcube keep saying those mutf folders not exist. thanks!

7

Re: Roundcube folder name issue

pang wrote:

Moreover, it did not handle names with space properly and breaks such name into separate lines.

You have to quote file/directory name which contains space or other special characters with single/double quotes. For example, "name with space".

pang wrote:

Is mutf7 encoding be the must for imap and is there any script tool can achieve this?

I'm afraid you have to use utf7 as defined in RFC. Actually, as mentioned in RFC, IMAP uses modified utf7.

8

Re: Roundcube folder name issue

Hi Zhang,

We managed to solved the encoding issue by using php mbstring function, thanks very much for your helpful assistance smile

btw, how to import user email forwarding settings? does it only controlled by vmail.alias.goto fileld?
I see this field is a duplicate copy of local user email address, just add forwarding address to make the field as "user@local.com, external1@a.com, external2@b.com"?

Also roundcube Chinese fonts a bit ugly, is it just load centos default font and do you have any idea to make it more beautiful? Thanks.

9

Re: Roundcube folder name issue

pang wrote:

btw, how to import user email forwarding settings? does it only controlled by vmail.alias.goto fileld?

Yes.

pang wrote:

I see this field is a duplicate copy of local user email address, just add forwarding address to make the field as "user@local.com, external1@a.com, external2@b.com"?

Yes.

pang wrote:

Also roundcube Chinese fonts a bit ugly, is it just load centos default font and do you have any idea to make it more beautiful? Thanks.

It's a web browser issue, not Roundcube. So please change the default font (for Chinese characters) in your web browser instead. smile