]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
3 years agoRelease v2.3.17.1 release-2.3.17 2.3.17.1
Aki Tuomi [Tue, 30 Nov 2021 10:47:52 +0000 (12:47 +0200)] 
Release v2.3.17.1

3 years agodsync: Fix -I max-size to actually be the max-size rather than min-size
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.

3 years agoman: Add missing parameters to doveadm-sync
Timo Sirainen [Tue, 9 Nov 2021 12:42:24 +0000 (13:42 +0100)] 
man: Add missing parameters to doveadm-sync

3 years agodsync: Remove -D parameter that disables syncing mailbox renames
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.

3 years agodsync: Add back various missing parameters
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

3 years agomaster: Use MASTER_SERVICE_FLAG_DISABLE_SSL_SET
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

3 years agolib-master: Add MASTER_SERVICE_FLAG_DISABLE_SSL_SET
Timo Sirainen [Mon, 1 Nov 2021 12:33:14 +0000 (08:33 -0400)] 
lib-master: Add MASTER_SERVICE_FLAG_DISABLE_SSL_SET

3 years agodsync: Add back missing -T parameter
Timo Sirainen [Thu, 28 Oct 2021 15:07:39 +0000 (17:07 +0200)] 
dsync: Add back missing -T parameter

Broken by 5676c510bfa9217df05e9b7cb000ae3554d66f22

3 years agolib-ssl-iostream: Fix assert-crash when OpenSSL returns syscall error without errno
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)

3 years agoNEWS: Add news for 2.3.17 2.3.17
Aki Tuomi [Tue, 28 Sep 2021 09:40:29 +0000 (12:40 +0300)] 
NEWS: Add news for 2.3.17

3 years agolib-storage: When search parses message headers, deinitialize the parsing properly
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)

3 years agolib-index: Add mail_index_alloc_cache_find()
Timo Sirainen [Wed, 13 Oct 2021 08:45:05 +0000 (11:45 +0300)] 
lib-index: Add mail_index_alloc_cache_find()

3 years agomaildir: Fix crash when closing a mailbox that isn't open
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.

3 years agoimap: Fix handling client initialization error
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

3 years agoimap: Move client_add_input() content to calling functions
Timo Sirainen [Fri, 8 Oct 2021 13:02:04 +0000 (16:02 +0300)] 
imap: Move client_add_input() content to calling functions

3 years agoimap: Move IMAPLOGINTAG environment handling
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.

3 years agoimap-login: proxy: Don't forward untagged BYE responses to the client
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.

3 years agolib-storage: mail_storage_service_lookup() - Fix memory leak when returning -2
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.

3 years agovirtual: Fix assert-crash when backend mbox mailbox is deleted while virtual mailbox...
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

3 years agolib-http: test-http-client-errors - Revert previous retry changes
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

3 years agolib-http: test-http-client-errors - Reset USR1 notification signal between tests
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.

3 years agolib: Fix data_stack_get_alloc_size() and data_stack_get_used_size()
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.

3 years agovirtual: Fix leaking mailboxes if virtual mailbox can't be opened
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)

3 years agodriver-pgsql: Fix error leak
Siavash Tavakoli [Mon, 4 Oct 2021 10:14:04 +0000 (11:14 +0100)] 
driver-pgsql: Fix error leak

3 years agostats: Remove metric from stats dump, when removing dynamically.
sergey.kitov [Thu, 30 Sep 2021 15:42:08 +0000 (18:42 +0300)] 
stats: Remove metric from stats dump, when removing dynamically.

3 years agostats: Improve error message for doveadm stats add.
sergey.kitov [Wed, 29 Sep 2021 11:58:22 +0000 (14:58 +0300)] 
stats: Improve error message for doveadm stats add.

3 years agostats: Check if metric already exists when adding dynamically.
sergey.kitov [Wed, 29 Sep 2021 11:57:34 +0000 (14:57 +0300)] 
stats: Check if metric already exists when adding dynamically.

3 years agodriver-cassandra: Fix prepared statement pool leak
Siavash Tavakoli [Fri, 1 Oct 2021 09:42:16 +0000 (10:42 +0100)] 
driver-cassandra: Fix prepared statement pool leak

3 years agolib: istream-concat - Prevent inheriting SIZE_MAX max buffer size from parent streams.
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.

3 years agolib-storage: Add mailbox_list.disable_rebuild_on_corruption
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.

3 years agoindexer: Abort requests if indexer-worker disconnects unexpectedly
Timo Sirainen [Tue, 28 Sep 2021 21:21:17 +0000 (00:21 +0300)] 
indexer: Abort requests if indexer-worker disconnects unexpectedly

3 years agodriver-pglsqlpool: Implement sql_get_flags() reliably
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.

3 years agodriver-pgsql: Implement sql_get_flags() reliably
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.

3 years agodriver-sqlpool: Implement sql_wait()
Timo Sirainen [Tue, 28 Sep 2021 12:33:47 +0000 (15:33 +0300)] 
driver-sqlpool: Implement sql_wait()

3 years agodriver-cassandra: Add wait() implementation
Siavash Tavakoli [Mon, 27 Sep 2021 10:59:09 +0000 (11:59 +0100)] 
driver-cassandra: Add wait() implementation

3 years agodriver-pgsql: Add wait() implementation
Siavash Tavakoli [Mon, 27 Sep 2021 10:58:21 +0000 (11:58 +0100)] 
driver-pgsql: Add wait() implementation

3 years agodict-sql: Add "sql_dict_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().

3 years agolib-sql: Add "wait" vfunc
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.

3 years agodriver-pgsql: Keep a list of pending query results
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.

3 years agodict: Wait for all dicts to finish pending operations at shutdown
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().

3 years agodict: Unref dict connection immediately when connection is destroyed
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.

3 years agodriver-pgsql: Fix escaped blob prefix
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.

3 years agodriver-pgsql: Fix assert-crash when using binary fields
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)

3 years agostats: Use duplicated metric settings in stats_metrics_add_dynamic().
sergey.kitov [Tue, 28 Sep 2021 12:35:21 +0000 (15:35 +0300)] 
stats: Use duplicated metric settings in stats_metrics_add_dynamic().

3 years agoconfigure: Set version to 2.3.17
Aki Tuomi [Tue, 28 Sep 2021 09:41:14 +0000 (12:41 +0300)] 
configure: Set version to 2.3.17

3 years agoimapc: Add MAIL_STORAGE_CLASS_FLAG_SECONDARY_INDEX storage class flag
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.

3 years agolib-storage: mail_get_binary_stream() - Add comment about having to unref returned...
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

3 years agolib: test-cpu-limit - Remove dead code
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

3 years agolib: test-strfuncs - Avoid testing p_strndup() with overlong max_chars parameter
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

3 years agolib-mail: Add test for empty header value
Aki Tuomi [Wed, 8 Sep 2021 07:39:36 +0000 (10:39 +0300)] 
lib-mail: Add test for empty header value

3 years agolib-mail: Limit header length to 1000 bytes
Aki Tuomi [Thu, 2 Sep 2021 14:10:11 +0000 (17:10 +0300)] 
lib-mail: Limit header length to 1000 bytes

3 years agolib-mail: If message header has no colon, store it as value only
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.

3 years agolib-mail: test-message-header-parser - Add NAME10, 100, 1000 macros for testing
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

3 years agolib: Add i_memspn() and i_memcspn()
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()

3 years agovirtual: Log a debug message why backend mailbox has changed
Timo Sirainen [Thu, 16 Sep 2021 11:32:37 +0000 (13:32 +0200)] 
virtual: Log a debug message why backend mailbox has changed

3 years agolib-storage: mail-duplicate - Restructure mail_duplicate_read_db_file() to make sure...
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.

3 years agolib-storage: mail-duplicate - Fix segfault occurring upon failure to lock and open...
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.

3 years agoindexer-worker: Fix event leak on error handling
Timo Sirainen [Wed, 18 Aug 2021 14:54:00 +0000 (16:54 +0200)] 
indexer-worker: Fix event leak on error handling

3 years agolib-storage: mail-duplicate - Implement separate error code for deadlock.
Stephan Bosch [Tue, 13 Jul 2021 02:15:14 +0000 (04:15 +0200)] 
lib-storage: mail-duplicate - Implement separate error code for deadlock.

3 years agolib-storage: mail-duplicate - Update records from duplicate DB file after acquirement...
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.

3 years agolib-storage: mail-duplicate - Move acquirement of dotlock for DB file into mail_dupli...
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().

3 years agolib-storage: mail-duplicate - Implement per-ID locking.
Stephan Bosch [Mon, 20 Sep 2021 09:58:12 +0000 (11:58 +0200)] 
lib-storage: mail-duplicate - Implement per-ID locking.

3 years agolib-storage: mail-duplicate - Allow calling mail_duplicate_read() more than once...
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.

3 years agolib-storage: mail-duplicate - Record an entry for both checked and marked IDs.
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.

3 years agolib-storage: mail-duplicate - Add debug messages for transaction.
Stephan Bosch [Tue, 13 Jul 2021 03:03:02 +0000 (05:03 +0200)] 
lib-storage: mail-duplicate - Add debug messages for transaction.

3 years agolib-storage: mail-duplicate - Add debug messages for database.
Stephan Bosch [Tue, 13 Jul 2021 03:07:39 +0000 (05:07 +0200)] 
lib-storage: mail-duplicate - Add debug messages for database.

3 years agolib-storage: mail-duplicate - Add event to transaction object.
Stephan Bosch [Tue, 13 Jul 2021 02:40:24 +0000 (04:40 +0200)] 
lib-storage: mail-duplicate - Add event to transaction object.

3 years agolib-storage: mail-duplicate - Add event to database object.
Stephan Bosch [Tue, 13 Jul 2021 02:53:11 +0000 (04:53 +0200)] 
lib-storage: mail-duplicate - Add event to database object.

3 years agolib-storage: mail-duplicate - Restructure API to make it transaction-based.
Stephan Bosch [Tue, 8 Jun 2021 01:51:10 +0000 (03:51 +0200)] 
lib-storage: mail-duplicate - Restructure API to make it transaction-based.

3 years agolib-storage: mail-duplicate - Change mail_duplicate_check() return type from bool...
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.

3 years agolib-storage: Reformat mail-duplicate.c.
Stephan Bosch [Fri, 17 Sep 2021 09:04:55 +0000 (11:04 +0200)] 
lib-storage: Reformat mail-duplicate.c.

3 years agolib-storage: mail-user - Add mail_user_get_volatile_dir().
Stephan Bosch [Sat, 7 Aug 2021 13:43:35 +0000 (15:43 +0200)] 
lib-storage: mail-user - Add mail_user_get_volatile_dir().

3 years agolib: file-lock - Adjust API to allow EDEADLK to be used by application.
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.

3 years agolib: file-lock - Rework API to make it extensible.
Stephan Bosch [Sun, 19 Sep 2021 11:09:29 +0000 (13:09 +0200)] 
lib: file-lock - Rework API to make it extensible.

3 years agolib: file-lock - Rename file_{wait,try}_lock_error() to file_{wait,try}_lock().
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().

3 years agolib: file-lock - Remove 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().

3 years agoglobal: Avoid use of 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.

3 years agolib-http: test-http-client-errors - Allow more relaxed timeouts for connect retry...
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.

3 years agolib: Add most data_stack_grow event fields before checking if event is wanted
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.

3 years agoconfig: Add data stack frame
Timo Sirainen [Tue, 21 Sep 2021 15:27:29 +0000 (18:27 +0300)] 
config: Add data stack frame

3 years agodoveconf: Avoid unnecessary data stack use when writing output
Timo Sirainen [Tue, 21 Sep 2021 15:26:53 +0000 (18:26 +0300)] 
doveconf: Avoid unnecessary data stack use when writing output

3 years agomaster: Create each service in its own data stack frame
Timo Sirainen [Tue, 21 Sep 2021 15:21:54 +0000 (18:21 +0300)] 
master: Create each service in its own data stack frame

3 years agodoveadm: Call each run() 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

3 years agodsync: Add data stack frames to mailbox loops
Timo Sirainen [Tue, 21 Sep 2021 14:14:44 +0000 (17:14 +0300)] 
dsync: Add data stack frames to mailbox loops

3 years agodsync: Split off dsync_brain_recv_mailbox_tree_add()
Timo Sirainen [Tue, 21 Sep 2021 14:10:56 +0000 (17:10 +0300)] 
dsync: Split off dsync_brain_recv_mailbox_tree_add()

3 years agoacl: Code cleanup - Remove pointless while-loop
Timo Sirainen [Tue, 21 Sep 2021 14:50:32 +0000 (17:50 +0300)] 
acl: Code cleanup - Remove pointless while-loop

3 years agoacl: acllist rebuild - Move data stack frame to caller's 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

3 years agoacl: Add data stack frame when iterating mailboxes
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.

3 years agolib-storage: mail_user_unref() - Add data stack frame
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.

3 years agolib-storage: mailbox_create() - Add data stack frames
Timo Sirainen [Wed, 22 Sep 2021 09:49:46 +0000 (12:49 +0300)] 
lib-storage: mailbox_create() - Add data stack frames

3 years agolib-storage: Add data stack frames to [service] user initialization
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.

3 years agolib-storage: Add data stack frame when iterating mailboxes to build GUID cache
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

3 years agolib-storage: mailbox_verify_*name() - Add data stack frames
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.

3 years agolib-storage: str_contains_special_use() - Add data stack frame
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().

3 years agolib-storage: List index rebuild - Add data stack frames
Timo Sirainen [Tue, 21 Sep 2021 13:58:13 +0000 (16:58 +0300)] 
lib-storage: List index rebuild - Add data stack frames

3 years agolib-storage: List index rebuild - Split off mail_storage_list_index_find_indexed_mail...
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()

3 years agolib-storage: Don't use data stack for mailbox list index header update
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.

3 years agolib-index: Don't use data stack for building index header update buffer
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.

3 years agolib: module_dir_deinit() - Call each deinit() in its own data stack frame
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

3 years agolib: test-data-stack - Make sure data stack memory usage doesn't leak
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