Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/IMAP
AgeCommit message (Collapse)Author
2021-06-15Lower the chunk size for IMAP syncsChristoph Wurst
In #3110 I lowered the chances of too long IMAP commands by splitting the sync process. As we've seen in production it's still possible that certain accounts run into the issue that their chunked UID list is producing an IMAP command that is too long. So I'm once again lower the chances by lowering the chunk size. This could have a tiny effect on sync performance as it now takes more chunks to check for the changed/vanished messages of one account. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-06-15Specify which account had a sync errorChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-06-15Document MailboxSync::persist argumentsChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-26Add bg job for label syncAnna Larch
Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-05-07Fix reading missing mailbox statsChristoph Wurst
Apparently there are occasions where we can't read the number of messages of a mailbox. In that case the account setup fails with ``General error: 1364 Field 'messages' doesn't have a default value"`` on MySQL. This adds sane fallback values for the two mailbox stats. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-04-26Reintroduce unread counter in app navigationRichard Steinmetz
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2021-03-01Do now allow messages to be their own parents in threadingChristoph Wurst
A message may send its own ID in the `references` header. In that case the threading algorithm must ignore the closed loop and not set the message as its own parent, to prevent an infinite loop later when checking for anchestors. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-19Merge pull request #4318 from jmechnich/fix-for-unreadable-mailboxesChristoph Wurst
ignore folders which cause errors on access
2021-02-19Merge pull request #4534 from nextcloud/fix/avoid-horde-header-queryChristoph Wurst
Avoid usage of Horde header query as it causes issues with php8
2021-02-18Add attachment dl method, add parts query wrapperAnna Larch
Signed-off-by: Anna Larch <anna@nextcloud.com>
2021-02-18Avoid usage of Horde header query as it causes issues with php8Christoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-18ignore folders which cause errors on accessjmechnich
Signed-off-by: jmechnich <joerg.mechnich@gmail.com>
2020-12-17Add forward as attachmentChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16Add original attachments when forwarding a mailCyrille Bollu
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-30Store special mailboxes as preference of the accountChristoph Wurst
… instead of using a fragile autodetection every time we need one of those. We will still try to auto-detect the mailboxes but the users will have to option to change the destinations. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-30Use a Github action for integration testsChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-14Merge pull request #3560 from ↵Christoph Wurst
IchbinkeinReh/fix-mailbox-does-not-support-mod-sequences Catch more errors in sync function to recover from "Mailbox does not support mod-sequences" error on partial sync
2020-10-14Catch mailbox does not support mod-sequences error and force a full sync if ↵Patrick Bender
it occurs Signed-off-by: Patrick Bender <patrick@bender-it-services.de>
2020-10-13Fix documented type errorsChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-09Fix more type and nullable errorsChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-08Fix nullable return types reported by PsalmChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-04Migrate \OCA\Mail\IMAP\* to the logger interfaceChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-30Merge pull request #3683 from nextcloud/enhancement/thread-export-commandGreta
Add a CLI command to export thread data
2020-09-29Remove debugging code that stops the threading process for some accountsChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-29Optionally redact the exported thread dataChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-29Add a CLI command to export all threading dataChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-23Add debug output to sync processes triggered via the CLIChristoph Wurst
Just like a CLI priority inbox model training gives all the details, we want to have the same to diagnose slow/faulty account syncs. This changes the console logger adapter for the PSR logger and adds it to the sync process. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-01Add rename mailbox optionGretaD
Signed-off-by: GretaD <gretadoci@gmail.com>
2020-09-01Detect and persist the personal namespaceChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24Rework the routingChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-11Move some usage of the old Folder to the more versatile MailboxChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-10Add delete action for foldersGretaD
Signed-off-by: GretaD <gretadoci@gmail.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-13Merge pull request #3357 from ↵Christoph Wurst
nextcloud/enhancement/threading-two-similar-threads Do not combine threads with identical subjects
2020-07-13Build threads after each IMAP syncChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-10Do not merge two threads that have the same subjectChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-08Add performance logging to threadingChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-08Implement the jwz threading algorithmChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-03Store the `references`, `in-reply-to` and the thread root idChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-28Fix usage of wrong constant for sync newChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-27Fix sync'ing with many known UIDsChristoph Wurst
When looking for changed and vanished UIDs we typically have to send the list of the known UIDs to the IMAP server to know what went missing meanwhile. With the number of UIDs sent, the size of the IMAP command grows. At some point the server will just refuse the command due to its size. To circumvent this scenario, this patch splits the sync process into new, changed and vanished. New is cheap in terms of data sent, so it stays untouched. Changed and vanished will now split the known UIDs list into chunks and retrieve partial sync results that way. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-05-19Ensure "subscribed" flag is transferred from imap serverHolger Dehnhardt
Signed-off-by: Holger Dehnhardt <holger@dehnhardt.org> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-28Fix endless initial sync due to empty partial pageChristoph Wurst
The initial message cache sync estimates the UID range of the next message page so it can fetch messages efficiently. There was an uncovered edge case where the next page might not return any message, simple because there is a larger gap between the existing UIDs. Therefore the sync process was aborted as incomplete over and over as it could not make any progress and the number of known messages never reached the total number of messages on IMAP. This patch changes the logic so it retries the next page if the current one is empty. To break a possibly infinite recursion there is a check about reaching the highest UID reported by the server. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-27Merge pull request #2980 from nextcloud/enhancement/incomplete-sync-progressChristoph Wurst
Log the progress of an incomplete sync
2020-04-24Log the progress of an incomplete syncChristoph Wurst
This is helpful to determine whether the initial sync just takes long or got stuck. Ref https://github.com/nextcloud/mail/issues/2976#issuecomment-618833115 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-24Fix the namespace of UidValidityChangedExceptionChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-16Fix lower bound when fetching a range of IMAP messages for the syncChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-14Update to nextcloud coding standard v0.3.0Christoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-07Lower the memory footprint of the initial message cache syncChristoph Wurst
The initial message sync has to fetch potentially large amounts of data and insert that into the database. To work around limitations with sync requests triggered by web requests the process had already been made interruptable and resumable. This means we never insert all the data right away. Yet, the IMAP code fetched all UIDs before we capped it to a maximum number of results per sync attempt. Depending on the mailbox size this operation could require and allocate a lot of memory. On some setup with lower memory limits, the process was aborted by the web server due to a php memory exhaustion. This patch modifies the IMAP code to optimize the memory usage by limiting the amount of data that is fetched with each initial sync attempt. The algorithm works as follows. IMAP allows us to search in a range with a lower an upper bound UID. While we know the highest known UID from the current cache values, we can't derive the range for the next page from that as UIDs are not continuous but might have holes due to deleted messages. If we assume that messages of a mailbox are roughly distributed equally across the assigned UIDs we can guess the max UID for the next range. So we ask the server for min and max UIDs. The min or our known highest UID is always the lower bound. Then we can calculate the distribution rate from the min, max and number of messages and build the upper bound. On everage this will fetch about the expected number of messages. It could be more, but it could also be less. It shouldn't matter in most cases. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26Refactor message flag logic into a service methodChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26Remove unused importsChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>