Comments (6)
Hi,
this issue has been reported with large mailboxes... Currently, I don't have a quick fix for it.
from modoboa-webmail.
With the master HEAD version of webmail, I am able to read an inbox with more than 18000 emails.
I also tried to fullfill my inbox with big mails, but in my case, it works.
If somebody reproduce this bug, please, attach a full callstack.
from modoboa-webmail.
The bug is not reproductible with older versions of python (not reproductible on debian wheezy) and is due to a commit from september 2013 in python imaplib module.
This bug is due to a limitation added on server responses into the python's imaplib module : http://bugs.python.org/issue16039. Now the response line from an imap server must not exeed 10000 bytes. And in a case of a SEARCH or SORT on a mailbox which contains a lot of messages, this limit is reached.
By reading the IMAP rfc2683 pointed by the python's issue, I think there is a misinterpretation from team maintaining the imaplib module : the RFC defines this size limitation for clients commands and not for server responses.
The rfc2683 does not define any server response size limitation, it only underlines, in section 3.2.1, the risk that a client may generate requests that results in very large responses (so we are not a bug from dovecot imap server).
If you decide to replace the standard imaplib module with some other, then the new imap module must no rely on the standard imaplib if you want to be sure to not fall again in this bug.
I found two workarounds :
- You can simply change the default imap._MAXLINE value to a bigger value (e.g: multiply the original value by 10 or 100), At lease, one other opensource project has done it (e.g : IMAPdedup).
- This response size limitation has only been implemented in the IMAP4.readline function, and not in the IMAP4_SSL.readline, which means, you won't have the bug by using SSL. But then you can fall in the issue16039 the python's team tried to fix.
My suggestions are :
- set imaplib._MAXLINE to 100000,
- open a bug on python imaplib module,
- look for a python imap module, not based on imaplib.
from modoboa-webmail.
In fact, there is already a discution on this imaplib._MAXLIMIT on the python's team side : http://bugs.python.org/issue23647
So this limitation issue will probably disappear with newer python versions.
from modoboa-webmail.
the SSL workaround is not anymore present on latest python version (3.4.3), so it is not a good solution.
from modoboa-webmail.
Many thanks for this explanation!
I think we can begin with a "monkey patch" of the std imaplib (your suggestion). In the future, if we want a better webmail, we will have to implement (or find) a new client.
from modoboa-webmail.
Related Issues (20)
- Changing Parameters via CLI
- Embed webmailer into another website HOT 7
- getquota in imaputils has an unbound variable HOT 1
- Error While Sending Message HOT 16
- Error on Webmail HOT 1
- Problem with imap4-utf-7 on Debian 11 and Python 3.9 HOT 2
- Message's title in the sent tab isn't truncated HOT 1
- Email Headers aren't truncated.
- UnboundLocalError at /webmail/ local variable 'data' referenced before assignment HOT 2
- Image in webmail signature broken and added as attachment
- impossible to search sent email with to address HOT 6
- Documentation? Nice idea, easy to install (thanks to README) but how to use it? HOT 2
- Unable to access webmail when logging on new admin
- Formatting Emails
- why my filename cannot be decode by using urldecode? HOT 2
- Cyrillic flag names cause parser error
- Internal error with large number of messages selected in webmail
- Not able to send Mail HOT 14
- Send Button Stuck
- IMAP Notes Compatibility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modoboa-webmail.