Age | Commit message (Collapse) | Author |
|
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>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
nextcloud/fix/outbox-job-send-message-deleted-account
Fix sending outbox messages of deletd accounts
|
|
Fix collecting addresses in the background
|
|
nextcloud/bug/noid/update-phpdoc-local-attachment-mapper
Update phpdoc for local attachment and outbox
|
|
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
|
|
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
|
|
A message of a deleted account currently triggers an error due to a
missing return.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
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>
|
|
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>
|
|
Skip not requested parts
|
|
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>
|
|
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
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>
|
|
nextcloud/enhancement/message-table-mailbox-id-uid-index
Add messages table index for mailbox id + uid search
|
|
The admin can't do anything about them. A warning is sufficient.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
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>
|
|
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
|
|
Drop dead message sending code
|
|
This code was used before the outbox. Now it's dead.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Fix attachment loss during outbox message update
|
|
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
|
|
Fix sending messages to groups
|
|
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>
|
|
Reduce log messages by account auto detect
|
|
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
|
|
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>
|
|
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>
|
|
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>
|
|
Fix column type on mysql
|
|
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
|
|
Cut long preview text into database column size
|
|
Do not delete outbox recipients during migration
|
|
nextcloud/fix/take-sso-into-consideration-when-provisioning
Consider passwordless signins when provisioning accounts
|
|
Cache provisioning configs
|
|
Signed-off-by: Anna Larch <anna@nextcloud.com>
|
|
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
Signed-off-by: Anna Larch <anna@nextcloud.com>
|
|
change columnst to bigint, create named foreign keys
Signed-off-by: Anna Larch <anna@nextcloud.com>
|
|
nextcloud/fix/message-headers-from-horde-memory-leak
Fix memory leak when accessing Horde headers
|
|
Ref https://symfony.com/doc/current/console/verbosity.html
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
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>
|
|
Turn off cache for initial sync to prevent a memory leak
|
|
Close streams after reading message parts
|
|
nextcloud/enhancement/performance-logger-memory-consumption
Include memory consumption in performance logging
|
|
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>
|