Karl Fleischmann [Thu, 25 Apr 2024 15:19:05 +0000 (17:19 +0200)]
lib-index: mail_index_modseq_update_to_highest() - Prepare function to replace modseq manipulation functions
With dropping the in-memory per-flag tracking of the modseqs the
manipulation functions will lose their benefit. This commit prepares a
switch to using mail_index_modseq_update_to_highest() in their stead.
Aki Tuomi [Tue, 9 Apr 2024 10:07:04 +0000 (13:07 +0300)]
fts: Adding setting for maximum message body size
Solr maximum message size for indexing Set a limit fts_message_max_size
on message body size. Messages are capped at the maximum size for indexing.
This Defaults to zero which means no limit (the existing behaviour).
Example setting:
fts_message_max_size = 10M
Based on work by John Fawcett <john@voipsupport.it>
John Fawcett [Wed, 3 Jan 2024 13:48:43 +0000 (14:48 +0100)]
fts-solr: Limit fetches to SOLR_MAX_MULTI_ROWS
Solr place upper bound on number of rows to be returned from solr for single
mailbox search When dovecot sends a search to solr it uses the rows parameter.
For multiple mailbox search the value used is SOLR_MAX_MULTI_ROWS , hardcoded to
100000. For single mailbox search the value used is uidnext. This patch
introduces an upper limit for single mailbox search using the same upper bound
as for multiple mailbox searches, SOLR_MAX_MULTI_ROWS, while leaving the
existing functionality of sending the uidnext value if it is smaller. This is
just to place a more reasonable upper bound since uidnext can get much larger
than 100000. The following url points to the Solr documentation for query
parameters that describes the rows parameter:
https://solr.apache.org/guide/solr/latest/query-guide/common-query-parameters.html
John Fawcett [Wed, 3 Jan 2024 13:42:51 +0000 (14:42 +0100)]
fts-tika: Allow username and password in fts_tika
Allows specification of username and password in the fts_tika setting for basic
auth against tika server. For example
fts_tika = https://user:password@tika_server:443/tika
Timo Sirainen [Mon, 22 Apr 2024 08:05:09 +0000 (11:05 +0300)]
lib-imap-client: Handle better when QRESYNC capable server doesn't send CLOSED imap-resp-code
QRESYNC RFC specifies that the [CLOSED] imap-resp-code MUST always be sent
if server advertises CONDSTORE or QRESYNC capability. However, at least some
Zimbra versions don't do this. Workaround by reconnecting to the server
automatically.
Timo Sirainen [Mon, 22 Apr 2024 07:59:37 +0000 (10:59 +0300)]
lib-imap-client: Fix automatic reconnecting with delayed logins
reconnect_command_count was always set to 1, because there was always
the command that triggered the connection. It was never reset to 0,
which caused reconnects to never happen.
Timo Sirainen [Tue, 9 Apr 2024 13:00:32 +0000 (16:00 +0300)]
fs-metawrap, fs-compress, fs-crypt: fs_set_metadata() - Pass metadata to both parent files
These fses have a "super_read" file, which is used for some purposes.
The metadata should be also passed to them, so they get the same useful
internal metadata that can be used to optimize reads.
Timo Sirainen [Mon, 8 Apr 2024 19:17:44 +0000 (22:17 +0300)]
lib: istream-multiplex - Fix potential hang when channel buffer gets full
If some bytes were read into the wanted channel, but more input was
attempted to be read into another channel's buffer that was already full,
the read should have returned what bytes were already successfully read.
Instead, 0 (more input needed) was returned.
Timo Sirainen [Wed, 27 Mar 2024 10:55:09 +0000 (12:55 +0200)]
master: Redirect stdout to /dev/null, unless logging is configured to /dev/stdout
Previous behavior was to redirect to /dev/null, unless -F parameter was
used. This made its behavior rather inconsistent, because -F is commonly
used with e.g. systemd.
It was supposed to return a cached table, but instead it now allocated a new
one every time from mail_user's pool. This kept growing memory usage after
every mail_user_var_expand_table() call.
Timo Sirainen [Mon, 11 Mar 2024 12:30:00 +0000 (14:30 +0200)]
*-login: Fix error code for "Maximum number of connections from user+IP exceeded"
IMAP now reports it as [LIMIT] rather than [UNAVAILABLE].
This change also causes proxy_session_finished event's error_code to
change: [UNAVAILABLE] maps to proxy_dest_auth_temp_failed, while [LIMIT]
maps to proxy_dest_auth_failed.
Stephan Bosch [Mon, 8 May 2023 23:04:45 +0000 (01:04 +0200)]
lib-storage: mail - Group binary part properties into a struct for mail_get_binary_stream().
This makes several additional properties available from
mail_get_binary_stream(). This also changes mail_get_binary_size() into
mail_get_binary_properties().