Commit graph

107 commits

Author SHA1 Message Date
Enrique J. Hernández Blasco dc8012e3d3 oc-mail: Implement move a mail subfolder to root
By moving at IMAP level the mailbox and update the indexing DB
and local db path.
2015-02-05 23:48:46 +01:00
Enrique J. Hernández Blasco 57d591c427 oc: Set right container in dbFolder when moving a folder
The path attribute from SOGoCacheGCSFolder is properly updated
in the database but not when returning from path message as
the container is the old one.
2015-01-28 11:26:56 +01:00
Enrique J. Hernández 2dcb8fa732 Merge pull request #75 from Zentyal/ejhernandez/move-mail-folder-with-reserved-chars
oc-mail: Move mail folders with reserved chars
2015-01-26 23:39:15 +01:00
Enrique J. Hernández Blasco 0e8bf0d239 oc-mail: Move mail folders with reserved chars
The URL was incorrectly set when any of ;/?:@&=+$,# was used
in the folder name.

We have to mimetise what it is done in createFolder message selector.
That is, perform the IMAP4 encoding + URL encoding without CSS
encoding. The IMAP4 + CSS encoding (without URL encoding) is used to store the folder
in SOGo and OpenChange Indexing database as we do right now.
2015-01-26 15:55:22 +01:00
Jesús García Sáez 312084243b oc: improve modseqFromMessageChangeNumber to return an approximation.
Only for scenarios where we hadn't store the cn <-> modseq relationship
2015-01-23 18:19:24 +01:00
Jesús García Sáez 47be392d4f oc: avoid request change number until necessary
Minor changenumber leak, but avoid it anyway
2015-01-23 18:18:25 +01:00
Jesús García Sáez 34efcfee4e oc: synchroniseCache store modseq for last delete change number.
This will be the more frequent change number used to obtain updates
on the folder related with deleted messages
2015-01-23 18:17:45 +01:00
Jesús García Sáez 8e7f6d1aec oc: avoid change number leaking when refreshing folder.
Everytime a folder where its last operation was delete some email was
requesting change numbers that were not used.
2015-01-23 18:15:44 +01:00
Jesús García Sáez f9550b9181 oc: several uninitialized variables 2015-01-19 15:35:44 +01:00
Jesús García Sáez ba79234ceb Merge pull request #64 from Zentyal/ejhernandez/store-change-number-subfolders-cache
Store changeNumber maps with modseq in cache for subfolders
2014-12-03 16:05:51 +01:00
Enrique J. Hernández Blasco 067809ef1c Store changeNumber maps with modseq in cache for subfolders
By getting the root folder/container whose properties
are stored in OpenChange DB.

This makes the synchronisation of sub-folders faster as
when we evaluate restrictions for this folder, we are able
to get the modseq from where to get the latest messages
unseen by the client.
2014-12-01 23:19:38 +01:00
Jesús García Sáez 97201c56a4 abort if attemp to sync an UID in setChangekey fails 2014-12-01 10:47:16 +01:00
Enrique J. Hernández Blasco 7691d616a9 Attempt to sync an UID in setChangeKey to avoid crashing
This may happen if between sync cache and setChangeKey a modSeq
is making synchroniseCache not retrieve the newly stored message.

This should fix the following crash:

https://tracker.zentyal.org/issues/2673
2014-11-29 08:07:41 +01:00
Enrique J. Hernández Blasco a8b716fbaa oc: sync old messages as last resort if there are not in cache
This is happening when the lastModSeq is greater than the modseq
from an old message and that message is not in cache.

This is used as last resort before crashing and it is only used
in objectVersion as it is the first place to call on sync. Other
related properties would work.
2014-11-19 17:16:45 +01:00
Jesús García Sáez 973ab78761 oc: synchronize folders ChangeNumber <-> modseq 2014-11-19 17:12:32 +01:00
Enrique J. Hernández Blasco d076e04ad4 oc-mailfolder: Get seen flag directly from message in preloading
To avoid a loop and a server-call.

We are not using body.peek[text] directly because bodyContentPart message
is explicitly avoiding it.
2014-11-19 17:12:30 +01:00
Enrique J. Hernández Blasco 7e0cddc06b oc-mailfolder: Avoid setting seen flag on preloading message bodies
Fetching a body[text] property using IMAP makes IMAP server set seen flag.

This commit fetches the flag beforehand to restore the previous state
once the body has been fetched.
2014-11-19 17:12:30 +01:00
Kamen Mazdrashki dc8b73b12b oc/MailFolder: Add more logging so we can trace invalid message kyes 2014-11-19 17:12:28 +01:00
Kamen Mazdrashki 18acdf20a6 oc: Make sure we always use NSString keys in 'messages' dictionary
Different types for keys in Dictionaries leads to not finding
expected entry - we should make sure that everythime we set/get
entry from a dictionary, key object type is same
2014-11-19 17:12:27 +01:00
Ludovic Marcotte 5f9fb4e1c4 Big refactor for new caching mechanism. 2014-05-13 21:06:59 -04:00
Ludovic Marcotte 41e6fb89d3 Renamed constants in preparation for the big cache cleanup 2014-05-13 17:54:02 -04:00
Ludovic Marcotte a24d809e40 Minor code/copyright/authors cleanups 2014-01-09 21:06:31 -05:00
Ludovic Marcotte 29eed182a7 Updated the OpenChange code related to UTF-7 changes for IMAP folders 2013-09-25 10:41:07 -04:00
Ludovic Marcotte 93f9a7273e Now handle mem context when saving messages and removed useless debugging. 2013-03-13 15:04:11 -04:00
Ludovic Marcotte 4f38b5cf3f Alse use hex-formatted keys for deleted mails. 2013-02-14 15:59:19 -05:00
Ludovic Marcotte 4804337a01 Now pass the memory context when copying/moving folders. 2012-12-07 13:30:50 -05:00
Ludovic Marcotte 2017536beb move_copy_messages now uses the openchange's memory context.
This fixes strange crashes when dealing with invitations and
other stuff. More work will need to be done in this regard. Also
kept the old code just in case for now. Will be cleaned up shortly
after more people test it.
2012-12-03 09:18:17 -05:00
Wolfgang Sourdeau ef5119f765 crash: do not attempt to store nil body part keys, for emails having no text body 2012-10-15 08:04:26 -04:00
Wolfgang Sourdeau 526f83d3c9 synchroniseCache: register new mail message ids and version numbers in batch with the new methods in MAPIStoreFolder and MAPIStoreMapping 2012-10-12 23:29:38 -04:00
Wolfgang Sourdeau dd1a8e9285 only preload message bodies of normal messages, ignore FAI ones 2012-10-10 10:38:50 -04:00
Wolfgang Sourdeau 5b7cbb6350 Use NSString instances as keys rather than NSNumber, to work around a performance issue with GNUstep < 1.24 2012-10-09 16:39:24 -04:00
Wolfgang Sourdeau a549773554 Implemented a mechanism to preload body parts for email messages 2012-10-06 13:02:39 -04:00
Wolfgang Sourdeau 37ccb0875c Check whether the "INBOX" folder has the "noinferiors" flag set before declaring that it accepts subfolder creation 2012-09-26 11:50:28 -04:00
Wolfgang Sourdeau fc62d76b1f Monotone-Parent: 7c8fce0426b2ec4def5226f16a9bcf2cff5dcfb9
Monotone-Revision: 1cc99cc487a5bfdb791d4067042b904d7eb47795

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-09-07T16:46:18
Monotone-Branch: ca.inverse.sogo
2012-09-07 16:46:18 +00:00
Wolfgang Sourdeau bde4b22ba7 Monotone-Parent: 572391072fa416635b9921d39ed76478ed762097
Monotone-Revision: 105b571703ff5c4cc1024854ef8a1d987aef2bf1

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-17T19:04:57
Monotone-Branch: ca.inverse.sogo
2012-08-17 19:04:57 +00:00
Wolfgang Sourdeau fb297c913c Monotone-Parent: 1fb3121c84e0bb2773973fcfde109c7b26530951
Monotone-Revision: e2f910a1982b774a3f5dfd586d968821441f2076

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-17T17:56:25
Monotone-Branch: ca.inverse.sogo
2012-08-17 17:56:25 +00:00
Wolfgang Sourdeau e09972700b Monotone-Parent: c24e0fd5407c5155f41caca1fbb44c9686e3bc0f
Monotone-Revision: d9117c53c33a58d47b6b3993f78e09e431f47f96

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-15T19:01:24
Monotone-Branch: ca.inverse.sogo
2012-08-15 19:01:24 +00:00
Wolfgang Sourdeau ab001192d6 Monotone-Parent: 85e37dbc7e87a173193494e6234f460788904318
Monotone-Revision: 107e4e5ebd41e916769f1be7ce070d725d255f0d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-15T15:24:42
Monotone-Branch: ca.inverse.sogo
2012-08-15 15:24:42 +00:00
Wolfgang Sourdeau 47afdfcd40 Monotone-Parent: de4fcfa81509a5dd3cc5acd2a1c6ba7c97653649
Monotone-Revision: 85e37dbc7e87a173193494e6234f460788904318

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-15T13:13:15
Monotone-Branch: ca.inverse.sogo
2012-08-15 13:13:15 +00:00
Wolfgang Sourdeau 45974ec74b Monotone-Parent: 5599b85afd7e2707325836a3b533b900d96b8b0c
Monotone-Revision: 570b17715b63da450bef9fde6d9c95288911034f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-15T01:02:08
Monotone-Branch: ca.inverse.sogo
2012-08-15 01:02:08 +00:00
Wolfgang Sourdeau 992c95f9a0 Monotone-Parent: 22a3b958acddeb274e788d95f5da332880c64d78
Monotone-Revision: 1036da510d0360f1e473b578044e95ac7792871f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-14T20:15:15
Monotone-Branch: ca.inverse.sogo
2012-08-14 20:15:15 +00:00
Wolfgang Sourdeau c4ad9891b3 Monotone-Parent: 62face8d68b60cbdfeed3e1857fabd32fceffb4c
Monotone-Revision: daeccf44f2750bfeb36858cb6386c86f90cc252a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-13T17:49:50
Monotone-Branch: ca.inverse.sogo
2012-08-13 17:49:50 +00:00
Wolfgang Sourdeau b3c66a0996 Monotone-Parent: 3227626c75075b7ce019ef85ce3b7ddbd4c461f7
Monotone-Revision: 7bc959b7bdbff70b4793f01076b797130e83fd01

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-13T14:08:49
Monotone-Branch: ca.inverse.sogo
2012-08-13 14:08:49 +00:00
Wolfgang Sourdeau 9ec0b9d3d6 Monotone-Parent: 2fea5fbc833aa109f5048dda8ddd9884c91385e1
Monotone-Revision: 3227626c75075b7ce019ef85ce3b7ddbd4c461f7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-13T03:58:14
Monotone-Branch: ca.inverse.sogo
2012-08-13 03:58:14 +00:00
Wolfgang Sourdeau 32af60c24f Monotone-Parent: 9f415bbce0de3939851adeff8e3f25986b8630f7
Monotone-Revision: 1bf1a3f87feb2c04469fcff28770c25704ee5aab

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-10T14:08:40
Monotone-Branch: ca.inverse.sogo
2012-08-10 14:08:40 +00:00
Wolfgang Sourdeau b13fe70beb Monotone-Parent: 5a88c883713608f144b55bfcc8139174ad4ab129
Monotone-Revision: 9f415bbce0de3939851adeff8e3f25986b8630f7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-08-09T21:35:09
Monotone-Branch: ca.inverse.sogo
2012-08-09 21:35:09 +00:00
Wolfgang Sourdeau 95a443d89a Monotone-Parent: 3f8608c82d9c379cc9e0fea6ffe853cc1949a24b
Monotone-Revision: 905276f295d6f28a6946297f6a7af9ad60f71842

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-06-29T17:59:38
Monotone-Branch: ca.inverse.sogo
2012-06-29 17:59:38 +00:00
Wolfgang Sourdeau 36ded79755 Monotone-Parent: 86ef6adf2b0443af39cafaac0b9a9d66fb753576
Monotone-Revision: 3f20830a3de3ff870541d0f05c25b39079b08e65

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-03-16T21:10:33
Monotone-Branch: ca.inverse.sogo
2012-03-16 21:10:33 +00:00
Wolfgang Sourdeau ff26754291 Monotone-Parent: f4e8a715d67a12fea729843b1401f636ce05ed66
Monotone-Revision: 86ef6adf2b0443af39cafaac0b9a9d66fb753576

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-03-16T21:09:10
Monotone-Branch: ca.inverse.sogo
2012-03-16 21:09:10 +00:00
Wolfgang Sourdeau 3ad93f3257 Monotone-Parent: 0d1809a8a5fbb980e78d197e8f5c0c634b960a2e
Monotone-Revision: cd4c34d79c62c8b6a1f9ccfb14ea9a79442034c6

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-03-16T20:51:51
Monotone-Branch: ca.inverse.sogo
2012-03-16 20:51:51 +00:00