summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/messages.py
AgeCommit message (Collapse)Author
2015-03-30[bug] fix early append notificationKali Kaneko
There's a workaround for "slow" APPENDS to an inbox, and it is that we have a flag to allow returning early when JUST the mdoc (the meta-document) has been written. However, this was givin a problem when doing a FETCH right after an APPEND (with notify_just_mdoc=True) has been done. This commit fixes it by making the FETCH command first check if there's an ongoing pending write, and queueing itself right after the write queue has been completed. This fixes the testFullAppend regression. Releases: 0.4.0
2015-03-30[bug] re-add fix for multiple headersKali Kaneko
This fix stores as multi-line headers that are repeated, and that were being discarded when storing them in a regular dict. It had been removed during the last refactor. I also store headers now as a case-insensitive dict, which solves other problems with the implementation of the twisted imap. Releases: 0.4.0
2015-03-03[refactor] remove dead code in IMAP implementationKali Kaneko
while updating the tests, I found that IMAPMessageCollection was not actually being used: all the work is done in IMAPMailbox, using directly the MessageCollection instance. So, this extra level of abstraction was finally not used. Releases: 0.9.0
2015-02-11re-add support for basic multipart messagesKali Kaneko
2015-02-11lots of little fixes after meskio's reviewKali Kaneko
mostly having to do with poor, missing or outdated documentation, naming of confusing things and reordering of code blocks for improved readability.
2015-02-11imap: implement setting of message flagsKali Kaneko
2015-02-11imap: complete FETCH implementationKali Kaneko
2015-02-11Complete IMAP implementation, update testsKali Kaneko
2015-02-11tests for mail.mail module: MessageKali Kaneko
2015-02-11cleanup imap implementationKali Kaneko
2015-02-11Serializable Models + Soledad AdaptorKali Kaneko
2015-02-11adapt to soledad 0.7 async APIKali Kaneko
2014-10-13Get keys from OpenPGP email headerRuben Pollan
2014-09-03remove uid from signatureKali Kaneko
2014-08-21Fixed some PEP8 warnings on the messages fileBruno Wagner Goncalves
2014-08-21MessageCollection iterators must instantiate LeapMessage with the collectionBruno Wagner Goncalves
2014-02-20Fix regression on "duplicate drafts" issue.Kali Kaneko
Not a permanent solution, but it looks for fdoc matching a given msgid to avoid duplication of drafts in thunderbird folders.
2014-02-20mail parsing performance improvementsKali Kaneko
Although the do_parse function is deferred to threads, we were actually waiting till its return to fire the callback of the deferred, and hence the "append ok" was being delayed. During massive appends, this was a tight loop contributing as much as 35 msec, of a total of 100 msec average. Several ineficiencies are addressed here: * use pycryptopp hash functions. * avoiding function calling overhead. * avoid duplicate call to message.as_string * make use of the string size caching capabilities. * avoiding the mail Parser initialization/method call completely, in favor of the module helper to get the object from string. Overall, these changes cut parsing to 50% of the initial timing by my measurements with line_profiler, YMMV.
2014-02-20catch empty rdocKali Kaneko
2014-02-20fix rdoc duplicationKali Kaneko
2014-02-17avoid unneeded db index updates and rdoc creationKali Kaneko
2014-02-17remove early notification on append for nowKali Kaneko
this can be done to save some msec, but additional measures have to be taken to avoid inconsistencies with reads right after this is done. we could make those wait until a second deferred is done, for example.
2014-02-17docstring fixesKali Kaneko
2014-02-17remove all refs during removal, and protect from empty docsKali Kaneko
2014-02-17defer appends tooKali Kaneko
and cut some more time by firing the callback as soon as we've got an UID.
2014-02-17defer fetch to threadKali Kaneko
also, dispatch query for all headers to its own method.
2014-02-17fix several bugs in copy/storeKali Kaneko
2014-02-17fine grained locks for putsKali Kaneko
2014-02-17separate better dirty/new flags; add cdocsKali Kaneko
2014-02-17remove hdoc copy since it's in its own structure nowKali Kaneko
2014-02-17make fdoc, hdoc, chash 'public' propertiesKali Kaneko
2014-02-17change internal storage and keying scheme in memstoreKali Kaneko
2014-02-17long-due update to unittests!Kali Kaneko
So we're safe under the green lights before further rewriting. :)
2014-02-17take recent count from memstoreKali Kaneko
2014-02-17prefetch flag docsKali Kaneko
2014-02-17defer parse to threadKali Kaneko
2014-02-04fixes after reviewKali Kaneko
* Some more docstring completion/fixes. * Removed unneeded str coertion. * Handle mailbox name in logs. * Separate manhole boilerplate into its own file.
2014-02-02fix missing content after in-memory addKali Kaneko
because THE KEYS WILL BE STRINGS AFTER ADDED TO SOLEDAD Can I remember that? * Fix copy from local folders * Fix copy when we already have a copy of the message in the inbox, marked as deleted. * Fix also bad deferred.succeed in add_msg when it already exist.
2014-01-31Restore expected TypeError.Kali Kaneko
I must have removed this to get rid of a error with some test sample during the testing of the branch, but it's absolutely needed so that mime attachments get shown properly. If the TypeError raises inapropiately due to some malformed part_map, then we will have to catch it using a workaround somewhere else.
2014-01-31remove wrong unicode conversionKali Kaneko
2014-01-31properly implement deferreds in several commandsKali Kaneko
Passing along a deferred as an observer whose callback will be called with the proper result. Returning to thread in the appropiate points. just let's remember that twisted APIs are not thread safe! SoledadStore process_item also properly returned to thread. Changed @deferred to @deferred_to_thread so it results less confusing to read. "know the territory". aha!
2014-01-31prime-uidsKali Kaneko
We pre-fetch the uids from soledad on mailbox initialization
2014-01-30fix badly terminated headersKali Kaneko
2014-01-30Fix indexing error that was rendering attachments unusableKali Kaneko
Also, check for empty body-doc
2014-01-30Fix copy and deletion problemsKali Kaneko
* reorganize and simplify STORE command processing * add the notification after the processing of the whole sequence
2014-01-30docstring fixesKali Kaneko
Also some fixes for None comparisons.
2014-01-28fix find_charset rebaseKali Kaneko
2014-01-28handle last_uid property in memory storeKali Kaneko
2014-01-28recent-flags use the memory storeKali Kaneko
2014-01-28flags use the memstoreKali Kaneko
* add new/dirty deferred dict to notify when written to disk * fix eventual duplication after copy * fix flag flickering on first retrieval.