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
AgeCommit message (Collapse)Author
2022-06-08Fix missing default value for `failed` of outbox messagesChristoph Wurst
Messages that only exist in the browser might not have an initial value for `failed`, so when we update them in the outbox the server needs a default value for it. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-06-07Fix database platform check with Nextcloud <22Christoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-06-07Fix sending erroneous message repeatedlyChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-06-03ISchemaWrapper.getDatabasePlatform requires Nextcloud 22.2.4Daniel Kesselberg
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-31Send oldest outbox message firstChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-31Merge pull request #6592 from ↵Daniel
nextcloud/fix/outbox-job-send-message-deleted-account Fix sending outbox messages of deletd accounts
2022-05-31Merge pull request #6593 from nextcloud/fix/outbox-address-collectionDaniel
Fix collecting addresses in the background
2022-05-31Merge pull request #6600 from ↵Daniel
nextcloud/bug/noid/update-phpdoc-local-attachment-mapper Update phpdoc for local attachment and outbox
2022-05-31Update column definition for oci compatibilityDaniel Kesselberg
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-31Update phpdoc for local attachment and outboxDaniel Kesselberg
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-31Fix sending outbox message of deleted user accountsChristoph Wurst
A message of a deleted account currently triggers an error due to a missing return. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-31Fix collecting addresses in the backgroundChristoph Wurst
Nextcloud can inject the userId but only for web processes. Now that messages are sent also in the background and not just from a web request, the user ID can be null and make the address collection log an exception. Following the pattern that user ID should only be injected into a controller, the user ID is now passed as argument of the collector, making it suitable for background jobs too. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-31Fix sending outbox messages of deletd accountsChristoph Wurst
If the account of a local message has been deleted, we will be unable to locate it. This hard error aborts the outbox flush process and gets all other messages stuck as well. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-27Merge pull request #6543 from nextcloud/bug/6064/forward-attachmentsRichard Steinmetz
Skip not requested parts
2022-05-25Use UID ranges for IMAP fetch operations during syncChristoph Wurst
This does not show any measurable performance improvement but precents the issue that the IMAP command can be too long for some IMAP servers otherwise. Ref https://github.com/nextcloud/mail/commit/e22742731adc1c1c03c394029948c7fa67e31b74 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-25Skip not requested partsbug/6064/forward-attachmentsDaniel Kesselberg
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-23Add PHP8.1 supportChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-23Prevent causal read for outbox message and recipient insertsChristoph Wurst
The message and the recipients are inserted in one transaction but the recipients are read another time outside a transaction. Read-write split database clusters might not be in full sync mode and then reading the recipients gives partial or no results. The insert will assign the primary key value to the recipient entities. Therefore we can skip reading the data. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-20Merge pull request #6509 from ↵Daniel
nextcloud/enhancement/message-table-mailbox-id-uid-index Add messages table index for mailbox id + uid search
2022-05-20Do not log auth issues in background jobs as errorChristoph Wurst
The admin can't do anything about them. A warning is sufficient. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-20Add messages table index for mailbox id + uid searchChristoph Wurst
The message update query looks up rows by the mailbox id and the uid. There was only an index for the mailbox id, so the database still had to scan data for the matching UID. On a dev env with ~700k messages this brought down UPDATE queries from 200ms to 5ms. On a production system running v1.13.0 Beta 1 deadlocks happened before and are now gone. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-19Use truncate to speed up migrationbug/6468/delete-from-to-truncateDaniel Kesselberg
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-19Merge pull request #6462 from nextcloud/techdebt/dead-send-message-codeChristoph Wurst
Drop dead message sending code
2022-05-19Drop dead message sending codeChristoph Wurst
This code was used before the outbox. Now it's dead. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-19Merge pull request #6495 from nextcloud/fix/lost-outbox-attachmentsAnna
Fix attachment loss during outbox message update
2022-05-18Use workaround for boolean and ocibug/noid/is-html-null-ociDaniel Kesselberg
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-18Merge pull request #6460 from nextcloud/fix/sending-messages-to-groupsChristoph Wurst
Fix sending messages to groups
2022-05-18Fix attachment loss during outbox message updatefix/lost-outbox-attachmentsChristoph Wurst
Local messages had no `type` and AttachmentService::handleAttachments silently ignored them. Afterwards OutboxService::updateMessage saw an empty array of attachments and deleted the previous attachment(s). Now local attachments have a type, the outbox update no longer discards them and if we see an attachment without a type the process fails hard. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-18Merge pull request #6488 from nextcloud/debt/noid/reduce-log-spamChristoph Wurst
Reduce log messages by account auto detect
2022-05-17Use ICompositeExpression for self join to properly encode columnsbug/noid/self-join-ociDaniel Kesselberg
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-17Reduce log messages by account auto detectdebt/noid/reduce-log-spamDaniel Kesselberg
Account auto detect produce a lot of log messages spamming the log file. This pr will reduce the verbosity of the logged information Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-17Fix sending messages to groupsfix/sending-messages-to-groupsChristoph Wurst
Groups were expanded in the accounts controller. Since moving over to the outbox logic this feature was missing and internal group identifiers were passed to SMTP. With this patch groups are expanded again just before a message is sent. This means the group memberships are read as late as possible and editing an outbox message looks like the original message because members have not been expanded there yet. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-16Always serialize outbox message recipients into arraysChristoph Wurst
array_filter keeps the index of array elements prior to the filtering. So if you have a message with one *to* and one *cc* values, the *to* will have index 0 and *cc* has 1. json_encode will later consider the former as a simple PHP array and map it to a json array. Since the *cc* value has a non-0 index for its first element, it would convert the value to a json object and use the 1 index as key. By running the values through array_value we can re-index all recipient arrays before they run through json_encode. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-13Merge pull request #6436 from nextcloud/bug/noid/fix-column-typeChristoph Wurst
Fix column type on mysql
2022-05-13Fix column type on mysqlDaniel Kesselberg
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-12Merge pull request #6339 from nextcloud/fix/cut-long-preview-textChristoph Wurst
Cut long preview text into database column size
2022-05-12Merge pull request #6434 from nextcloud/fix/do-not-delete-outbox-recipientsChristoph Wurst
Do not delete outbox recipients during migration
2022-05-12Merge pull request #5944 from ↵Anna
nextcloud/fix/take-sso-into-consideration-when-provisioning Consider passwordless signins when provisioning accounts
2022-05-12Merge pull request #6325 from nextcloud/enhancement/cache-provisioningsAnna
Cache provisioning configs
2022-05-12Consider passwordless signings when provisioningAnna Larch
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-05-12Do not delete outbox recipients during migrationChristoph Wurst
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-12Cache provisioning configsAnna Larch
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-05-12Create new indices,Anna Larch
change columnst to bigint, create named foreign keys Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-05-12Merge pull request #6408 from ↵Anna
nextcloud/fix/message-headers-from-horde-memory-leak Fix memory leak when accessing Horde headers
2022-05-12Only print debug logs at debug verbosityChristoph Wurst
Ref https://symfony.com/doc/current/console/verbosity.html Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-12Fix memory leak when accessing Horde headersChristoph Wurst
Horde offers access to headers either unparsed, as stream or parsed into an object. Before the patch we used the latter. That has the current bug that it opens a PHP memory stream, parses into an object but leaves the stream open. If this is done thousands of times, there is a considerate amount of memory that doesn't get freed. With the patch we request just the stream, trigger the parsing ourselves and close the stream afterwards. This frees the memory. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-05-12Merge pull request #6410 from nextcloud/fix/initial-sync-memory-leak-cacheChristoph Wurst
Turn off cache for initial sync to prevent a memory leak
2022-05-12Merge pull request #6409 from nextcloud/fix/message-body-stream-memory-leakChristoph Wurst
Close streams after reading message parts
2022-05-12Merge pull request #6419 from ↵Christoph Wurst
nextcloud/enhancement/performance-logger-memory-consumption Include memory consumption in performance logging
2022-05-12Turn off cache for initial sync to prevent a memory leakChristoph Wurst
The cache implementation doesn't persist its values until the shutdown of the process. For each iteration of the initial synchronization we have to create one instance of the cache. Those two facts combined mean that for each iteration Horde builds a new set of cache data for the mailbox and therefore creates a memory leak. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>