]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Tue, 30 Nov 2021 10:47:52 +0000 (12:47 +0200)]
Release v2.3.17.1
Timo Sirainen [Wed, 1 Dec 2021 12:46:04 +0000 (14:46 +0200)]
dsync: Fix -I max-size to actually be the max-size rather than min-size
The -I max-size parameter was supposed to be used to skip mails that are
larger than max-size. Instead, it skipped mails that were smaller.
Timo Sirainen [Tue, 9 Nov 2021 12:42:24 +0000 (13:42 +0100)]
man: Add missing parameters to doveadm-sync
Timo Sirainen [Tue, 30 Nov 2021 16:02:14 +0000 (18:02 +0200)]
dsync: Remove -D parameter that disables syncing mailbox renames
It hasn't been necessary for a long time, and its behavior seems to be
broken.
Timo Sirainen [Tue, 9 Nov 2021 12:41:37 +0000 (13:41 +0100)]
dsync: Add back various missing parameters
Also add them to the usage string.
Broken by
5676c510bfa9217df05e9b7cb000ae3554d66f22
Timo Sirainen [Mon, 1 Nov 2021 12:33:49 +0000 (08:33 -0400)]
master: Use MASTER_SERVICE_FLAG_DISABLE_SSL_SET
This prevents startup failures if ssl_ca has a large number of certificates.
Broken by
36ff43f1a9aff8594d08f791e77ea13390fd569f
Timo Sirainen [Mon, 1 Nov 2021 12:33:14 +0000 (08:33 -0400)]
lib-master: Add MASTER_SERVICE_FLAG_DISABLE_SSL_SET
Timo Sirainen [Thu, 28 Oct 2021 15:07:39 +0000 (17:07 +0200)]
dsync: Add back missing -T parameter
Broken by
5676c510bfa9217df05e9b7cb000ae3554d66f22
Timo Sirainen [Wed, 27 Oct 2021 10:06:10 +0000 (12:06 +0200)]
lib-ssl-iostream: Fix assert-crash when OpenSSL returns syscall error without errno
Incomplete fix in
f41874b3dec541478a85275698a91f089f537df2
Fixes:
Panic: file istream-openssl.c: line 51 (i_stream_ssl_read_real): assertion failed: (errno != 0)
Aki Tuomi [Tue, 28 Sep 2021 09:40:29 +0000 (12:40 +0300)]
NEWS: Add news for 2.3.17
Timo Sirainen [Tue, 28 Sep 2021 21:04:29 +0000 (00:04 +0300)]
lib-storage: When search parses message headers, deinitialize the parsing properly
index_mail_parse_header() was being called only for the actual headers.
This prevented it from being called with hdr=NULL to indicate that the
parsing is finished and should be deinitialized. Move the
index_mail_parse_header() to be called earlier so it's called also with
hdr=NULL.
Not deinitilizing the parsing could have caused assert-crashes later on in
some situations.
Fixes:
Panic: file index-mail-headers.c: line 667 (index_mail_get_raw_headers): assertion failed: (mail->mail.mail.lookup_abort >= MAIL_LOOKUP_ABORT_NOT_IN_CACHE)
Panic: file ../../../src/lib/array.h: line 244 (array_idx_i): assertion failed: (idx < array->buffer->used / array->element_size)
Panic: file index-mail.c: line 1203 (index_mail_parse_body_finish): assertion failed: (!success)
Timo Sirainen [Wed, 13 Oct 2021 08:45:05 +0000 (11:45 +0300)]
lib-index: Add mail_index_alloc_cache_find()
Timo Sirainen [Thu, 7 Oct 2021 15:11:00 +0000 (18:11 +0300)]
maildir: Fix crash when closing a mailbox that isn't open
This could have happened at least with virtual plugin.
Timo Sirainen [Wed, 6 Oct 2021 12:38:55 +0000 (15:38 +0300)]
imap: Fix handling client initialization error
It should send "OK Logged in" + BYE, not PREAUTH.
Broken by
714ff4342e39e309ff184905cd2f714def6177a3
Timo Sirainen [Fri, 8 Oct 2021 13:02:04 +0000 (16:02 +0300)]
imap: Move client_add_input() content to calling functions
Timo Sirainen [Fri, 8 Oct 2021 12:57:50 +0000 (15:57 +0300)]
imap: Move IMAPLOGINTAG environment handling
It can only happen with stdio clients when they don't have CLIENT_INPUT,
so it makes more sense to exist in the calling function.
Timo Sirainen [Wed, 6 Oct 2021 12:43:09 +0000 (15:43 +0300)]
imap-login: proxy: Don't forward untagged BYE responses to the client
It will just cause confusion, especially when connections are retried.
It could end up looking like:
x login user pass
* BYE Internal error occurred. Refer to server log for more information.
* BYE Internal error occurred. Refer to server log for more information.
* BYE Internal error occurred. Refer to server log for more information.
* BYE Internal error occurred. Refer to server log for more information.
x NO [UNAVAILABLE] Account is temporarily unavailable.
Timo Sirainen [Fri, 8 Oct 2021 12:53:21 +0000 (15:53 +0300)]
lib-storage: mail_storage_service_lookup() - Fix memory leak when returning -2
This was also visible as event leaks.
Timo Sirainen [Thu, 7 Oct 2021 11:52:12 +0000 (14:52 +0300)]
virtual: Fix assert-crash when backend mbox mailbox is deleted while virtual mailbox is open
The code wrongly thought that metadata lookup couldn't fail because it was
already successfully looked up. But the backend storage could still try to
refresh the mailbox to verify whether it still exists or not, and fail if
it was deleted.
This seems to have affected only the mbox mailbox format.
Broken by
710346bcb884b464c8ed128870fdc1999c13dfd3
Timo Sirainen [Thu, 30 Sep 2021 13:38:23 +0000 (15:38 +0200)]
lib-http: test-http-client-errors - Revert previous retry changes
The real bug is found now, so the previous fix attempt isn't useful.
Reverts
ed1264368a5435c3080871380156978a8951fe26
Timo Sirainen [Thu, 30 Sep 2021 13:32:24 +0000 (15:32 +0200)]
lib-http: test-http-client-errors - Reset USR1 notification signal between tests
The "connection refused" test already set the signal as being received,
which caused the "connection refused backoff" test to randomly fail since it
thought the signal was immediately received.
Timo Sirainen [Wed, 6 Oct 2021 10:20:12 +0000 (13:20 +0300)]
lib: Fix data_stack_get_alloc_size() and data_stack_get_used_size()
It only worked correctly if data stack hadn't been grown. This resulted
in wrong numbers in the data_stack_grow event.
Timo Sirainen [Fri, 1 Oct 2021 12:08:45 +0000 (15:08 +0300)]
virtual: Fix leaking mailboxes if virtual mailbox can't be opened
Fixes also a crash at deinit:
Panic: file mail-user.c: line 232 (mail_user_deinit): assertion failed: ((*user)->refcount == 1)
Siavash Tavakoli [Mon, 4 Oct 2021 10:14:04 +0000 (11:14 +0100)]
driver-pgsql: Fix error leak
sergey.kitov [Thu, 30 Sep 2021 15:42:08 +0000 (18:42 +0300)]
stats: Remove metric from stats dump, when removing dynamically.
sergey.kitov [Wed, 29 Sep 2021 11:58:22 +0000 (14:58 +0300)]
stats: Improve error message for doveadm stats add.
sergey.kitov [Wed, 29 Sep 2021 11:57:34 +0000 (14:57 +0300)]
stats: Check if metric already exists when adding dynamically.
Siavash Tavakoli [Fri, 1 Oct 2021 09:42:16 +0000 (10:42 +0100)]
driver-cassandra: Fix prepared statement pool leak
Stephan Bosch [Fri, 24 Sep 2021 22:48:12 +0000 (00:48 +0200)]
lib: istream-concat - Prevent inheriting SIZE_MAX max buffer size from parent streams.
Only when all parent streams have SIZE_MAX for max buffer size, the concat stream will follow suit.
Timo Sirainen [Mon, 27 Sep 2021 17:35:19 +0000 (20:35 +0300)]
lib-storage: Add mailbox_list.disable_rebuild_on_corruption
If set, don't try to rebuild the mailbox list index even if corruption is
detected.
Timo Sirainen [Tue, 28 Sep 2021 21:21:17 +0000 (00:21 +0300)]
indexer: Abort requests if indexer-worker disconnects unexpectedly
Timo Sirainen [Tue, 28 Sep 2021 12:35:05 +0000 (15:35 +0300)]
driver-pglsqlpool: Implement sql_get_flags() reliably
Try to use one of the already connected databases. If none were found,
create a new database.
Timo Sirainen [Tue, 28 Sep 2021 12:32:56 +0000 (15:32 +0300)]
driver-pgsql: Implement sql_get_flags() reliably
Some of the flags aren't known until server is connected to, so wait for the
connect to finish if necessary before returning the flags.
Timo Sirainen [Tue, 28 Sep 2021 12:33:47 +0000 (15:33 +0300)]
driver-sqlpool: Implement sql_wait()
Siavash Tavakoli [Mon, 27 Sep 2021 10:59:09 +0000 (11:59 +0100)]
driver-cassandra: Add wait() implementation
Siavash Tavakoli [Mon, 27 Sep 2021 10:58:21 +0000 (11:58 +0100)]
driver-pgsql: Add wait() implementation
Siavash Tavakoli [Mon, 27 Sep 2021 10:48:34 +0000 (11:48 +0100)]
dict-sql: Add "sql_dict_wait()" implementation
lib-sql now has sql_wait().
Siavash Tavakoli [Mon, 27 Sep 2021 10:46:07 +0000 (11:46 +0100)]
lib-sql: Add "wait" vfunc
To be used in backends that support async operations. On deinit dicts
should wait for results and then exit.
Siavash Tavakoli [Mon, 27 Sep 2021 18:43:54 +0000 (19:43 +0100)]
driver-pgsql: Keep a list of pending query results
To be used in wait() to determine if there are pending operations.
Timo Sirainen [Wed, 22 Sep 2021 17:57:06 +0000 (20:57 +0300)]
dict: Wait for all dicts to finish pending operations at shutdown
This also changes the dict process to exit cleanly instead of early via
lib_exit().
Timo Sirainen [Thu, 11 Jul 2019 09:05:37 +0000 (12:05 +0300)]
dict: Unref dict connection immediately when connection is destroyed
The delayed unrefing is needed when calling from dict command callbacks to
avoid calling dict_deinit() too early. But the connection's destroy() vfunc
can't be called directly from dict command callbacks, so there's no need
to add further delays. Especially when this happens at deinit where there is
no possibility of calling the delayed callback anymore.
Siavash Tavakoli [Mon, 27 Sep 2021 10:42:07 +0000 (11:42 +0100)]
driver-pgsql: Fix escaped blob prefix
Escaped strings must be prefixed with double backslash.
Siavash Tavakoli [Mon, 27 Sep 2021 10:35:38 +0000 (11:35 +0100)]
driver-pgsql: Fix assert-crash when using binary fields
array_idx_modifiable() changed behavior in
1d4e5de8414ed93d1c810b30a91ad83d6d954861 and doesn't allocate space
anymore.
Fixes:
Panic: file array.c: line 10 (array_idx_modifiable_i): assertion failed: (idx < array->buffer->used / array->element_size)
sergey.kitov [Tue, 28 Sep 2021 12:35:21 +0000 (15:35 +0300)]
stats: Use duplicated metric settings in stats_metrics_add_dynamic().
Aki Tuomi [Tue, 28 Sep 2021 09:41:14 +0000 (12:41 +0300)]
configure: Set version to 2.3.17
Markus Valentin [Wed, 15 Sep 2021 12:44:42 +0000 (14:44 +0200)]
imapc: Add MAIL_STORAGE_CLASS_FLAG_SECONDARY_INDEX storage class flag
Add SECONDARY_INDEX storage class flag to enable storing shared private
indexes in obox user root bundle.
Timo Sirainen [Fri, 24 Sep 2021 14:33:38 +0000 (17:33 +0300)]
lib-storage: mail_get_binary_stream() - Add comment about having to unref returned istream
Timo Sirainen [Wed, 22 Sep 2021 12:58:55 +0000 (15:58 +0300)]
lib: test-cpu-limit - Remove dead code
No longer needed after
6d902507c24fca4f64e3e9bf7d79ae5a48281cd8
Timo Sirainen [Mon, 27 Sep 2021 08:49:05 +0000 (11:49 +0300)]
lib: test-strfuncs - Avoid testing p_strndup() with overlong max_chars parameter
This ended up in memchr() call with n=SIZE_MAX-1, which sometimes doesn't
work right with old glibc versions.
Fixes:
Panic: Trying to allocate
18446744073709551615 bytes
Aki Tuomi [Wed, 8 Sep 2021 07:39:36 +0000 (10:39 +0300)]
lib-mail: Add test for empty header value
Aki Tuomi [Thu, 2 Sep 2021 14:10:11 +0000 (17:10 +0300)]
lib-mail: Limit header length to 1000 bytes
Aki Tuomi [Thu, 2 Sep 2021 14:12:55 +0000 (17:12 +0300)]
lib-mail: If message header has no colon, store it as value only
If the header is missing :, it is not valid header. Storing it as
value only ensures it will be kept by mbox rewrite, but will not
be processed as a header.
Aki Tuomi [Thu, 2 Sep 2021 13:46:19 +0000 (16:46 +0300)]
lib-mail: test-message-header-parser - Add NAME10, 100, 1000 macros for testing
Aki Tuomi [Tue, 7 Sep 2021 11:37:34 +0000 (14:37 +0300)]
lib: Add i_memspn() and i_memcspn()
Binary data safe variants of strspn() and strcspn()
Timo Sirainen [Thu, 16 Sep 2021 11:32:37 +0000 (13:32 +0200)]
virtual: Log a debug message why backend mailbox has changed
Stephan Bosch [Fri, 24 Sep 2021 08:39:43 +0000 (10:39 +0200)]
lib-storage: mail-duplicate - Restructure mail_duplicate_read_db_file() to make sure fd is closed.
Found by Coverity.
Stephan Bosch [Fri, 24 Sep 2021 08:22:28 +0000 (10:22 +0200)]
lib-storage: mail-duplicate - Fix segfault occurring upon failure to lock and open DB file.
Found by Coverity.
Timo Sirainen [Wed, 18 Aug 2021 14:54:00 +0000 (16:54 +0200)]
indexer-worker: Fix event leak on error handling
Stephan Bosch [Tue, 13 Jul 2021 02:15:14 +0000 (04:15 +0200)]
lib-storage: mail-duplicate - Implement separate error code for deadlock.
Stephan Bosch [Wed, 15 Sep 2021 23:49:57 +0000 (01:49 +0200)]
lib-storage: mail-duplicate - Update records from duplicate DB file after acquirement of per-ID lock.
The process previously holding the per-ID lock may have updated the DB.
Stephan Bosch [Fri, 17 Sep 2021 09:11:21 +0000 (11:11 +0200)]
lib-storage: mail-duplicate - Move acquirement of dotlock for DB file into mail_duplicate_read().
Stephan Bosch [Mon, 20 Sep 2021 09:58:12 +0000 (11:58 +0200)]
lib-storage: mail-duplicate - Implement per-ID locking.
Stephan Bosch [Fri, 17 Sep 2021 09:16:39 +0000 (11:16 +0200)]
lib-storage: mail-duplicate - Allow calling mail_duplicate_read() more than once in a transaction.
Stephan Bosch [Tue, 13 Jul 2021 21:22:52 +0000 (23:22 +0200)]
lib-storage: mail-duplicate - Record an entry for both checked and marked IDs.
Still only write the marked IDs to the file. The in-memory record is needed for
the locking introduced in a later commit.
Stephan Bosch [Tue, 13 Jul 2021 03:03:02 +0000 (05:03 +0200)]
lib-storage: mail-duplicate - Add debug messages for transaction.
Stephan Bosch [Tue, 13 Jul 2021 03:07:39 +0000 (05:07 +0200)]
lib-storage: mail-duplicate - Add debug messages for database.
Stephan Bosch [Tue, 13 Jul 2021 02:40:24 +0000 (04:40 +0200)]
lib-storage: mail-duplicate - Add event to transaction object.
Stephan Bosch [Tue, 13 Jul 2021 02:53:11 +0000 (04:53 +0200)]
lib-storage: mail-duplicate - Add event to database object.
Stephan Bosch [Tue, 8 Jun 2021 01:51:10 +0000 (03:51 +0200)]
lib-storage: mail-duplicate - Restructure API to make it transaction-based.
Stephan Bosch [Tue, 13 Jul 2021 02:03:42 +0000 (04:03 +0200)]
lib-storage: mail-duplicate - Change mail_duplicate_check() return type from bool to enum.
Stephan Bosch [Fri, 17 Sep 2021 09:04:55 +0000 (11:04 +0200)]
lib-storage: Reformat mail-duplicate.c.
Stephan Bosch [Sat, 7 Aug 2021 13:43:35 +0000 (15:43 +0200)]
lib-storage: mail-user - Add mail_user_get_volatile_dir().
Stephan Bosch [Mon, 20 Sep 2021 00:45:23 +0000 (02:45 +0200)]
lib: file-lock - Adjust API to allow EDEADLK to be used by application.
It always caused a Dovecot panic before when returned from kernel.
Stephan Bosch [Sun, 19 Sep 2021 11:09:29 +0000 (13:09 +0200)]
lib: file-lock - Rework API to make it extensible.
Stephan Bosch [Mon, 20 Sep 2021 00:39:08 +0000 (02:39 +0200)]
lib: file-lock - Rename file_{wait,try}_lock_error() to file_{wait,try}_lock().
Stephan Bosch [Mon, 20 Sep 2021 00:29:55 +0000 (02:29 +0200)]
lib: file-lock - Remove file_{wait,try}_lock().
Stephan Bosch [Mon, 20 Sep 2021 00:26:46 +0000 (02:26 +0200)]
global: Avoid use of file_{wait,try}_lock().
Use the file_{wait,try}_lock_error() variants instead.
Timo Sirainen [Wed, 22 Sep 2021 14:36:27 +0000 (17:36 +0300)]
lib-http: test-http-client-errors - Allow more relaxed timeouts for connect retry tests
With max_connect_attempts=3 the connects come at (0ms, 100ms, 300ms).
Before the 3rd attempt a timeout at 250ms must have triggered, so there
was only 50ms time for it to trigger. This wasn't always enough when
running with valgrind on an overloaded system. Solve this by increasing
max_connect_attempts=4 so the 4th attempt comes at 700ms, giving the
timeout 450ms to trigger.
Timo Sirainen [Wed, 22 Sep 2021 09:14:08 +0000 (12:14 +0300)]
lib: Add most data_stack_grow event fields before checking if event is wanted
This allows using e.g. "event=data_stack_grow and alloc_size > 32768" as
an event filter.
Timo Sirainen [Tue, 21 Sep 2021 15:27:29 +0000 (18:27 +0300)]
config: Add data stack frame
Timo Sirainen [Tue, 21 Sep 2021 15:26:53 +0000 (18:26 +0300)]
doveconf: Avoid unnecessary data stack use when writing output
Timo Sirainen [Tue, 21 Sep 2021 15:21:54 +0000 (18:21 +0300)]
master: Create each service in its own data stack frame
Timo Sirainen [Tue, 21 Sep 2021 14:52:15 +0000 (17:52 +0300)]
doveadm: Call each run() in its own data stack frame
Timo Sirainen [Tue, 21 Sep 2021 14:14:44 +0000 (17:14 +0300)]
dsync: Add data stack frames to mailbox loops
Timo Sirainen [Tue, 21 Sep 2021 14:10:56 +0000 (17:10 +0300)]
dsync: Split off dsync_brain_recv_mailbox_tree_add()
Timo Sirainen [Tue, 21 Sep 2021 14:50:32 +0000 (17:50 +0300)]
acl: Code cleanup - Remove pointless while-loop
Timo Sirainen [Tue, 21 Sep 2021 14:03:45 +0000 (17:03 +0300)]
acl: acllist rebuild - Move data stack frame to caller's loop
Timo Sirainen [Tue, 21 Sep 2021 13:14:12 +0000 (16:14 +0300)]
acl: Add data stack frame when iterating mailboxes
Avoids wasting memory when there are a lot of mailboxes.
Timo Sirainen [Tue, 21 Sep 2021 14:51:15 +0000 (17:51 +0300)]
lib-storage: mail_user_unref() - Add data stack frame
The deinit code paths can sometimes eat up quite a lot of data stack.
Timo Sirainen [Wed, 22 Sep 2021 09:49:46 +0000 (12:49 +0300)]
lib-storage: mailbox_create() - Add data stack frames
Timo Sirainen [Wed, 22 Sep 2021 09:48:18 +0000 (12:48 +0300)]
lib-storage: Add data stack frames to [service] user initialization
Initialization steps can use a lot of data stack, so try to free it at
several checkpoints.
Timo Sirainen [Tue, 21 Sep 2021 14:49:34 +0000 (17:49 +0300)]
lib-storage: Add data stack frame when iterating mailboxes to build GUID cache
Timo Sirainen [Tue, 21 Sep 2021 14:48:33 +0000 (17:48 +0300)]
lib-storage: mailbox_verify_*name() - Add data stack frames
This function can eat up quite a lot of data stack.
Timo Sirainen [Tue, 21 Sep 2021 14:47:41 +0000 (17:47 +0300)]
lib-storage: str_contains_special_use() - Add data stack frame
This function is called in a loop by namespace_find_special_use().
Timo Sirainen [Tue, 21 Sep 2021 13:58:13 +0000 (16:58 +0300)]
lib-storage: List index rebuild - Add data stack frames
Timo Sirainen [Tue, 21 Sep 2021 13:57:13 +0000 (16:57 +0300)]
lib-storage: List index rebuild - Split off mail_storage_list_index_find_indexed_mailbox()
Timo Sirainen [Tue, 21 Sep 2021 13:37:13 +0000 (16:37 +0300)]
lib-storage: Don't use data stack for mailbox list index header update
There can be a lot of mailboxes, causing excessive data stack usage.
Timo Sirainen [Tue, 21 Sep 2021 13:42:39 +0000 (16:42 +0300)]
lib-index: Don't use data stack for building index header update buffer
The header update can be large (e.g. dovecot.list.index with many
mailboxes) and grow data stack unnecessarily.
Timo Sirainen [Tue, 21 Sep 2021 14:51:50 +0000 (17:51 +0300)]
lib: module_dir_deinit() - Call each deinit() in its own data stack frame
Timo Sirainen [Tue, 21 Sep 2021 13:15:54 +0000 (16:15 +0300)]
lib: test-data-stack - Make sure data stack memory usage doesn't leak