modoboa / modoboa-webmail

The webmail of Modoboa
MIT License
73 stars 48 forks source link

Can't delete message #27

Open minhvietbui opened 9 years ago

minhvietbui commented 9 years ago

Hi, I have a problem with webmail. When user is full quota, he can't delete message, error display "Object object". How to resolve problem? thank you very much.

tonioo commented 9 years ago

Hi, which version are you using ?

minhvietbui commented 9 years ago

My server using version 1.3.2 , in imaputils.py i was inserted "MAXLINE = 1000000 if hasattr(imaplib, "_MAXLINE") and getattr(imaplib, "_MAXLINE") < MAXLINE: setattr(imaplib, "_MAXLINE", MAXLINE)", quota user is 100 MB with less than 150 messages.

tonioo commented 9 years ago

And does it change something ?

minhvietbui commented 9 years ago

No any thing change.

minhvietbui commented 9 years ago

I find reason for this problem. When quota full function _cmd(self, name, _args, _kwargs) in imaputils.py return error. I was edit query user_query in dovecot-sql.conf.ext : user_query = SELECT '/%d/%n' AS home, as uid, as gid, concat(':bytes=', mb.quota, 'M') AS quota_rule, 'Trash:ignore' AS quota_rule2 FROM admin_mailbox mb INNER JOIN admin_domain dom ON mb.domain_id=dom.id WHERE mb.address='%n' AND dom.name='%d' . And I can move message to trash when quota full.

yiminfantw commented 6 years ago

I think this could still happen in 1.9.0 or later. My config is Ubuntu 16.04, Modoboa 1.9.1 and external LDAP. I had a test by reaching an user's quota and I can reproduce the "Object object" issue when deleting user email. Current workaround is increasing user quota and email can then be deleted. Any idea? Thx

tonioo commented 6 years ago

@yiminfantw yes, I haven't officialized the proposed SQL query. You can try to apply it and see if it fixes the problem.