modoboa/modoboa-webmail

Virtual namespace breaks webmail

BigMichi1 opened this issue · 3 comments

today we configured in dovecot the virtual folders. after that when we open webmail we are not able and getting this exception

Django Version:	1.11.16
Exception Type:	IndexError
Exception Value:	list index out of range
Exception Location:	/srv/modoboa/env/lib/python3.6/site-packages/modoboa_webmail/lib/imaputils.py in load_namespaces, line 310
Python Executable:	/usr/bin/uwsgi-core
Python Version:	3.6.7
Python Path:	
['.',
 '',
 '/srv/modoboa/env/lib/python36.zip',
 '/srv/modoboa/env/lib/python3.6',
 '/srv/modoboa/env/lib/python3.6/lib-dynload',
 '/usr/lib/python3.6',
 '/srv/modoboa/env/lib/python3.6/site-packages']

Traceback:

/srv/modoboa/env/lib/python3.6/site-packages/modoboa_webmail/lib/imaputils.py in load_namespaces
            if ns[pos] == "NIL": 
▼ Local vars
Variable	Value
data	[b'(("" "/")("Virtual/" "/")) (("Shared/" "/")) NIL']
item	'public'
m	<_sre.SRE_Match object; span=(0, 17), match='(("Shared/" "/"))'>
ns	['(("Shared/" "/"))', 'NIL']
pos	2
self	<modoboa_webmail.lib.imaputils.IMAPconnector object at 0x7f3b6eeb80b8>

when we disable the virtual namespace again everything is fine, so we can access the webmail ui, when we are than enable the namespace again and just reload the webmail ui the folder ius shown and can be used. after that logging out and logging in it is again broken with the above exception

@BigMichi1 What is your dovecot version please?

Dovecot is at version 2.2.33.2

@BigMichi1 Thank you. I've found the issue :)