]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 months agomdbox: Fix crash if resync fails because of an early failure release-2.3
Timo Sirainen [Wed, 20 Nov 2024 13:16:00 +0000 (15:16 +0200)] 
mdbox: Fix crash if resync fails because of an early failure

This mainly happened if dovecot.map.index.log was locked and resync timed
out waiting for it.

7 months agoreplicator: fixed infinity loop on sync replication
Kirill A. Korinsky [Wed, 25 Sep 2024 16:30:52 +0000 (18:30 +0200)] 
replicator: fixed infinity loop on sync replication

Before this fix, replicator adds the same lookup into callbacks over and
over, until it reaches out of memory, and crashes.

This regression was introduced 447e086422f1ab7cc16833583ed70a4af7a84bc5
with initial implementation of replicator.

7 months agoimap-hibernate: Add local and remote port as variables to mail_log_prefix
Aki Tuomi [Mon, 16 Dec 2024 10:53:23 +0000 (12:53 +0200)] 
imap-hibernate: Add local and remote port as variables to mail_log_prefix

7 months agolib-storage: Add local and remote port as variables to mail_log_prefix
Aki Tuomi [Mon, 16 Dec 2024 10:53:06 +0000 (12:53 +0200)] 
lib-storage: Add local and remote port as variables to mail_log_prefix

8 months agovirtual: Fix copying storage error on mail_precache() failure
Timo Sirainen [Mon, 9 Sep 2024 15:46:56 +0000 (18:46 +0300)] 
virtual: Fix copying storage error on mail_precache() failure

8 months agofts: Don't ignore parent mail_precache() failure
Timo Sirainen [Mon, 9 Sep 2024 15:45:59 +0000 (18:45 +0300)] 
fts: Don't ignore parent mail_precache() failure

8 months agolib: istream-seekable - Allow in-memory fallback only for up to 10 MB streams
Timo Sirainen [Mon, 3 Jun 2024 20:42:25 +0000 (23:42 +0300)] 
lib: istream-seekable - Allow in-memory fallback only for up to 10 MB streams

8 months agolib: istream-seekable - Improve logging after write() errors
Timo Sirainen [Mon, 3 Jun 2024 20:28:23 +0000 (23:28 +0300)] 
lib: istream-seekable - Improve logging after write() errors

Also don't silently handle out of disk space errors - log a warning instead.

8 months agolib: istream-seekable - Assert that write() won't return 0
Timo Sirainen [Mon, 3 Jun 2024 20:23:40 +0000 (23:23 +0300)] 
lib: istream-seekable - Assert that write() won't return 0

8 months agolib: istream-seekable - Fix moving stream to memory on write() failure
Timo Sirainen [Mon, 3 Jun 2024 20:05:22 +0000 (23:05 +0300)] 
lib: istream-seekable - Fix moving stream to memory on write() failure

Fixes:
Panic: file istream-seekable.c: line 238 (read_from_buffer): assertion failed: (*ret_r > 0)

8 months agodoveadm save: Fix potential assert-crash if saving failed
Timo Sirainen [Mon, 3 Jun 2024 19:46:51 +0000 (22:46 +0300)] 
doveadm save: Fix potential assert-crash if saving failed

The input stream may not have been fully read at failure time.

Fixes:
Panic: file doveadm-mail-save.c: line 91 (cmd_save_to_mailbox): assertion failed: (input->eof)

8 months agolib: istream-seekable - Remove unused define BUF_INITIAL_SIZE
Markus Valentin [Tue, 3 Dec 2024 13:30:27 +0000 (14:30 +0100)] 
lib: istream-seekable - Remove unused define BUF_INITIAL_SIZE

9 months agoChangeLog: Stop generating ChangeLog
Aki Tuomi [Wed, 23 Nov 2022 09:50:44 +0000 (11:50 +0200)] 
ChangeLog: Stop generating ChangeLog

It is not very useful, you can get same information with
git commands anyways, and NEWS file contains more useful
information.

9 months agoimap: Fix potential hang/crash when unhibernating
Timo Sirainen [Mon, 14 Oct 2024 09:53:33 +0000 (12:53 +0300)] 
imap: Fix potential hang/crash when unhibernating

This fixes two potential bugs:

a) Unhibernation is triggered by new mailbox changes. While sending these
to IMAP client, Dovecot notices that the client has disconnected. The
process will stay IDLEing for 30 minutes until it gets disconnected with
"Disconnected: Inactivity - no input for 1800 secs"

b) Unhibernation is triggered by DONE command with some further pipelined
commands. During unhibernation new mailbox changes are noticed, and
again IMAP client is found to be disconnected while sending the changes.
This causes a segfault.

11 months agoimap-login: Don't forward x-multiplex ID parameter when proxying
Timo Sirainen [Fri, 6 Sep 2024 11:42:55 +0000 (14:42 +0300)] 
imap-login: Don't forward x-multiplex ID parameter when proxying

If a connecting v2.4 proxy sends this parameter, it should be ignored rather
than forwarded to the next hop, which again might be v2.4. This would end
up enabling multiplex iostreams, even though this v2.3 proxy doesn't
understand it.

12 months agoNEWS: Add news for 2.3.21.1
Aki Tuomi [Thu, 8 Aug 2024 12:13:19 +0000 (15:13 +0300)] 
NEWS: Add news for 2.3.21.1

12 months agolib-mail: message-parser - Limit headers total count to 50MB by default
Marco Bettini [Wed, 24 Apr 2024 10:45:46 +0000 (10:45 +0000)] 
lib-mail: message-parser - Limit headers total count to 50MB by default

(including top headers and all mime-sections headers)

12 months agolib-mail: message-header-parser - Limit header block to 10MB by default
Marco Bettini [Fri, 12 Apr 2024 15:06:43 +0000 (15:06 +0000)] 
lib-mail: message-header-parser - Limit header block to 10MB by default

12 months agolib-mail, lib-imap: Optimize parsing large number of address headers
Timo Sirainen [Thu, 8 Feb 2024 22:57:12 +0000 (00:57 +0200)] 
lib-mail, lib-imap: Optimize parsing large number of address headers

Every header was appended to a linked list by walking through the whole
list, causing excessive CPU usage when the list became large enough.
Fixed by changing struct message_part_envelope to use struct
message_address_list, which stores also linked list tail pointers. This
allows quickly appending to the end of the linked list.

12 months agolib-mail: Add message_address_parse_full() and struct message_address_list
Timo Sirainen [Tue, 30 Jan 2024 20:17:38 +0000 (22:17 +0200)] 
lib-mail: Add message_address_parse_full() and struct message_address_list

12 months agolib-mail: Change message_address to be doubly linked list
Timo Sirainen [Sat, 3 Feb 2024 22:26:57 +0000 (00:26 +0200)] 
lib-mail: Change message_address to be doubly linked list

12 months agolib-mail: test-imap-envelope - Use test_assert_idx() where possible
Timo Sirainen [Tue, 30 Jan 2024 20:42:50 +0000 (22:42 +0200)] 
lib-mail: test-imap-envelope - Use test_assert_idx() where possible

12 months agolib: Add DLLIST2_JOIN()
Timo Sirainen [Thu, 8 Feb 2024 22:33:00 +0000 (00:33 +0200)] 
lib: Add DLLIST2_JOIN()

12 months agolib: test-llist - Fix dllist2 test name
Timo Sirainen [Thu, 8 Feb 2024 22:32:39 +0000 (00:32 +0200)] 
lib: test-llist - Fix dllist2 test name

14 months agomaster: Fix assert-crash after "Process .. is ignoring idle SIGINT" error
Timo Sirainen [Fri, 31 May 2024 20:19:53 +0000 (23:19 +0300)] 
master: Fix assert-crash after "Process .. is ignoring idle SIGINT" error

The timeout was called multiple times, which caused internal state to break.

Fixes:
Panic: file service-monitor.c: line 60 (service_kill_idle): assertion failed: (processes_to_kill <= service->process_avail)

15 months agoimapc, lib-imap-client: Add imapc_features=no-qresync to disable QRESYNC
Timo Sirainen [Mon, 22 Apr 2024 09:01:07 +0000 (12:01 +0300)] 
imapc, lib-imap-client: Add imapc_features=no-qresync to disable QRESYNC

This can be used to silently work around the Zimbra bug of not sending
[CLOSED] imap-resp-code.

15 months agolib-imap-client: Handle better when QRESYNC capable server doesn't send CLOSED imap...
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.

15 months agolib-imap-client: Fix automatic reconnecting with delayed logins
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.

16 months agoauth: mech-oauth2 - Use the iterated passdb in oauth2_find_oidc_url()
Aki Tuomi [Tue, 26 Mar 2024 12:13:42 +0000 (14:13 +0200)] 
auth: mech-oauth2 - Use the iterated passdb in oauth2_find_oidc_url()

Fixes a crash when oauth2 passdb is not first. Broken in
59647f483c49c9e54c43cade168bf10f44a49292

16 months agologin-common: Add client_vfuncs.iostream_change_pre/post()
Timo Sirainen [Wed, 13 Mar 2024 11:08:18 +0000 (13:08 +0200)] 
login-common: Add client_vfuncs.iostream_change_pre/post()

18 months agomdbox: Fix assert-crash if syncing causes storage rebuild
Timo Sirainen [Wed, 1 Nov 2023 09:52:06 +0000 (11:52 +0200)] 
mdbox: Fix assert-crash if syncing causes storage rebuild

Fixes:
Panic: file mail-index-sync.c: line 419 (mail_index_sync_begin_to2): assertion failed: (!index->syncing)

Broken by b073a14640cab4b9e2a84a783aac2f7fd0102473

18 months agomdbox: Reset internal fscked-flag after rebuilding index
Timo Sirainen [Mon, 3 Jul 2023 23:01:35 +0000 (02:01 +0300)] 
mdbox: Reset internal fscked-flag after rebuilding index

The index was just rebuilt. If the flag isn't reset, it might become
rebuilt again.

18 months agomdbox: Fix "Invalid dbox header size" error to use "mdbox"
Timo Sirainen [Mon, 3 Jul 2023 21:34:40 +0000 (00:34 +0300)] 
mdbox: Fix "Invalid dbox header size" error to use "mdbox"

18 months agomdbox: fsck map index only after logging "rebuilding indexes"
Timo Sirainen [Mon, 3 Jul 2023 20:37:20 +0000 (23:37 +0300)] 
mdbox: fsck map index only after logging "rebuilding indexes"

18 months agomdbox: Skip storage rebuild if the reason for it no longer exists after locking map
Timo Sirainen [Mon, 3 Jul 2023 20:36:31 +0000 (23:36 +0300)] 
mdbox: Skip storage rebuild if the reason for it no longer exists after locking map

18 months agomdbox: mdbox_storage_set_corrupted() - Add reason parameter
Timo Sirainen [Mon, 3 Jul 2023 10:57:59 +0000 (13:57 +0300)] 
mdbox: mdbox_storage_set_corrupted() - Add reason parameter

18 months agomdbox: Replace mdbox_storage_set_corrupted() with mdbox_set_mailbox_corrupted() where...
Timo Sirainen [Mon, 3 Jul 2023 10:57:25 +0000 (13:57 +0300)] 
mdbox: Replace mdbox_storage_set_corrupted() with mdbox_set_mailbox_corrupted() where possible

18 months agomdbox: If mdbox_sync_begin() fail with corruption, make sure storage corruption reaso...
Timo Sirainen [Mon, 3 Jul 2023 10:52:01 +0000 (13:52 +0300)] 
mdbox: If mdbox_sync_begin() fail with corruption, make sure storage corruption reason is set

18 months agodbox: Add reason parameter to dbox_storage_vfuncs.set_mailbox_corrupted()
Timo Sirainen [Mon, 3 Jul 2023 10:45:28 +0000 (13:45 +0300)] 
dbox: Add reason parameter to dbox_storage_vfuncs.set_mailbox_corrupted()

18 months agodbox: Add reason parameter to dbox_storage_vfuncs.set_file_corrupted()
Timo Sirainen [Mon, 3 Jul 2023 10:40:36 +0000 (13:40 +0300)] 
dbox: Add reason parameter to dbox_storage_vfuncs.set_file_corrupted()

18 months agomdbox: Change mdbox_storage.corrupted boolean to reason string
Timo Sirainen [Mon, 3 Jul 2023 10:23:52 +0000 (13:23 +0300)] 
mdbox: Change mdbox_storage.corrupted boolean to reason string

18 months agomdbox: Log reason when rebuilding indexes
Timo Sirainen [Mon, 3 Jul 2023 10:19:32 +0000 (13:19 +0300)] 
mdbox: Log reason when rebuilding indexes

Already include the reason also as bitmask in preparation for a later commit
using it.

18 months agomdbox: Remove unused MDBOX_SYNC_FLAG_NO_PURGE
Timo Sirainen [Mon, 3 Jul 2023 09:12:03 +0000 (12:12 +0300)] 
mdbox: Remove unused MDBOX_SYNC_FLAG_NO_PURGE

18 months agomdbox: Rebuild storage in its own atomic context
Timo Sirainen [Mon, 3 Jul 2023 09:10:41 +0000 (12:10 +0300)] 
mdbox: Rebuild storage in its own atomic context

This guarantees that the atomic context is fully committed after rebuild,
instead of rolled back due to sync failing later on.

18 months agomdbox: Move storage rebuild handling to mdbox_sync()
Timo Sirainen [Mon, 3 Jul 2023 09:06:07 +0000 (12:06 +0300)] 
mdbox: Move storage rebuild handling to mdbox_sync()

This simplifies the code, since it's the only place that can actually
rebuild the storage. Also will be needed for following commit.

18 months agolib-index: mail_index_unset_fscked() - Fix to use the latest index header
Timo Sirainen [Mon, 3 Jul 2023 20:46:32 +0000 (23:46 +0300)] 
lib-index: mail_index_unset_fscked() - Fix to use the latest index header

The flags field was updated using the view's header, which may have been
out-of-date. This could have resulted in more than the FSCKD flag update,
and most importantly it could have meant that the FSCKD flag wasn't
actually removed when it should have been.

22 months agolib: Fix sha2 functions to not produce wrong results with >500MB input
Timo Sirainen [Fri, 6 Oct 2023 12:59:32 +0000 (15:59 +0300)] 
lib: Fix sha2 functions to not produce wrong results with >500MB input

22 months agooauth: Accept multiple entries in aud field
Marco Bettini [Tue, 3 Oct 2023 13:11:49 +0000 (13:11 +0000)] 
oauth: Accept multiple entries in aud field

22 months agoNEWS: Update NEWS with changes
Aki Tuomi [Wed, 6 Sep 2023 12:04:49 +0000 (15:04 +0300)] 
NEWS: Update NEWS with changes

22 months agoNEWS: Add news for 2.3.21
Aki Tuomi [Wed, 30 Aug 2023 12:45:45 +0000 (15:45 +0300)] 
NEWS: Add news for 2.3.21

22 months agolib-dict-extra: dict-fs - If iteration flag isn't supported, error out instead of...
Timo Sirainen [Tue, 21 Mar 2023 19:35:04 +0000 (21:35 +0200)] 
lib-dict-extra: dict-fs - If iteration flag isn't supported, error out instead of panic

22 months agolib-dict-extra: dict-fs - Implement DICT_ITERATE_FLAG_EXACT_KEY
Timo Sirainen [Tue, 21 Mar 2023 21:08:12 +0000 (23:08 +0200)] 
lib-dict-extra: dict-fs - Implement DICT_ITERATE_FLAG_EXACT_KEY

22 months agolib-dict-extra: dict-fs - Fix endless loop while iterating
Manuel Mausz [Tue, 26 Jul 2022 08:07:31 +0000 (10:07 +0200)] 
lib-dict-extra: dict-fs - Fix endless loop while iterating

Broken by 32e8bd5b5a9d5bc04e5ac6c65ac132ba5c386d64

23 months agomail-crypt: mail_crypt_mailbox_allocated() - Force cross-user copies to (de,re)encryp...
Marco Bettini [Mon, 28 Aug 2023 15:27:09 +0000 (15:27 +0000)] 
mail-crypt: mail_crypt_mailbox_allocated() - Force cross-user copies to (de,re)encrypt the contents

23 months agolib-sql: driver-mysql - Use API state to check if there is connection
Aki Tuomi [Wed, 6 Sep 2023 05:34:51 +0000 (08:34 +0300)] 
lib-sql: driver-mysql - Use API state to check if there is connection

db->mysql cannot be NULL.

Broken in dd14131fcbd4b84f02316ecc0ff3a185683a5f23

23 months agodsync: Destroy name128_remotesep_hash in dsync_mailbox_tree_deinit()
Aki Tuomi [Tue, 5 Sep 2023 10:39:40 +0000 (13:39 +0300)] 
dsync: Destroy name128_remotesep_hash in dsync_mailbox_tree_deinit()

Forgotten in 678d0463849ba777106eb7875f27db07a5d8e3df

23 months agodsync: Fix an infinite loop
Ted Phelps [Sat, 2 Sep 2023 07:50:55 +0000 (17:50 +1000)] 
dsync: Fix an infinite loop

Be sure to update 'name' when traversing the components of a path
in convert_name_to_remote_sep.  Otherwise we end up allocating a
lot of memory and failing.

23 months agolib-sql: driver-mysql - Initialize MYSQL struct once
Aki Tuomi [Wed, 30 Aug 2023 10:19:47 +0000 (13:19 +0300)] 
lib-sql: driver-mysql - Initialize MYSQL struct once

Calling initialize more than once will leak memory.

23 months agolib-sql: driver-mysql - Use driver_mysql_disconnect() in deinit
Aki Tuomi [Wed, 30 Aug 2023 10:21:12 +0000 (13:21 +0300)] 
lib-sql: driver-mysql - Use driver_mysql_disconnect() in deinit

This ensures we call mysql_close() only in one place.

23 months agolib-sql: driver-mysql - Use container_of instead of blind cast
Aki Tuomi [Tue, 29 Aug 2023 12:04:04 +0000 (15:04 +0300)] 
lib-sql: driver-mysql - Use container_of instead of blind cast

23 months agolib-sql: Disconnect SQL connection on error
Aki Tuomi [Mon, 17 Jul 2023 07:36:32 +0000 (10:36 +0300)] 
lib-sql: Disconnect SQL connection on error

23 months agomdbox: Fix crash still if fdatasync_path() fails
Timo Sirainen [Thu, 22 Jun 2023 07:48:13 +0000 (10:48 +0300)] 
mdbox: Fix crash still if fdatasync_path() fails

Broken still in a8424a71d70e2f5c54d9e2aab8338cf9547b15b4

23 months agologin-common: Make login_proxy_free(&NULL) no-op
Marco Bettini [Thu, 31 Aug 2023 09:22:31 +0000 (09:22 +0000)] 
login-common: Make login_proxy_free(&NULL) no-op

Backport of 92b12678ff85112a0631f58fc2c9422e41e0d376

23 months agostats: Allow empty event exporters when registering metrics
Karl Fleischmann [Thu, 15 Jun 2023 11:32:11 +0000 (13:32 +0200)] 
stats: Allow empty event exporters when registering metrics

23 months agofts: doveadm - Add missing pool initialization in cmd_search_box()
Marco Bettini [Tue, 29 Aug 2023 10:13:34 +0000 (10:13 +0000)] 
fts: doveadm - Add missing pool initialization in cmd_search_box()

Broken by: 467a664b5fce33f3d47a3e1171ecacb508968d1a

23 months agoauth: db-oauth2 - Set default value for active_attribute and active_value to empty...
Aki Tuomi [Thu, 24 Aug 2023 09:26:44 +0000 (12:26 +0300)] 
auth: db-oauth2 - Set default value for active_attribute and active_value to empty string

Otherwise it will always require this attribute to be present when not
configured.

23 months agologin-common: If authentication is aborted, clear out final response.
Aki Tuomi [Thu, 24 Aug 2023 19:16:36 +0000 (22:16 +0300)] 
login-common: If authentication is aborted, clear out final response.

23 months agoauth: db-oauth2 - Handle the case for check on attribute presence only
Marco Bettini [Thu, 1 Jun 2023 10:47:50 +0000 (10:47 +0000)] 
auth: db-oauth2 - Handle the case for check on attribute presence only

23 months agoauth: db_oauth2_user_is_enabled() - Flatten the code
Marco Bettini [Thu, 1 Jun 2023 08:37:56 +0000 (08:37 +0000)] 
auth: db_oauth2_user_is_enabled() - Flatten the code

23 months agoauth: db-oauth2 - Fail login if active_attribute is missing
Steve Mokris [Tue, 17 May 2022 19:19:49 +0000 (15:19 -0400)] 
auth: db-oauth2 - Fail login if active_attribute is missing

If active_attribute is required by config, we should fail to
login when it's missing.

23 months agolib-oauth2: Do not send empty client_id or client_secret
Aki Tuomi [Fri, 12 May 2023 08:48:25 +0000 (11:48 +0300)] 
lib-oauth2: Do not send empty client_id or client_secret

23 months agolib-oauth2: Do not send client_id and client_secret as parameters in POST queries
Aki Tuomi [Fri, 12 May 2023 08:47:41 +0000 (11:47 +0300)] 
lib-oauth2: Do not send client_id and client_secret as parameters in POST queries

They need to be configured in the URL as Basic auth instead.

23 months agolib-oauth2: Do not send client_id & client_secret as POST parameters when doing intro...
Aki Tuomi [Fri, 12 May 2023 05:59:50 +0000 (08:59 +0300)] 
lib-oauth2: Do not send client_id & client_secret as POST parameters when doing introspection

23 months agolib-oauth2: Validate scope when configured
Aki Tuomi [Mon, 8 May 2023 05:38:20 +0000 (08:38 +0300)] 
lib-oauth2: Validate scope when configured

23 months agolib-oauth2: Remove typ check
Aki Tuomi [Mon, 8 May 2023 05:23:39 +0000 (08:23 +0300)] 
lib-oauth2: Remove typ check

It is not really useful. And mostly just keeps breaking when people
invent new kty values.

23 months agolib-oauth2: Ensure aud field has client_id when set.
Aki Tuomi [Mon, 8 May 2023 05:21:43 +0000 (08:21 +0300)] 
lib-oauth2: Ensure aud field has client_id when set.

OpenID Connect 1.0 specification says that "aud" field must contain
OAuth 2.0 client_id of the Relying Party as an audience value.

23 months agoauth: mech-oauth2 - Always fail with protocol specific error
Aki Tuomi [Mon, 15 May 2023 10:49:58 +0000 (13:49 +0300)] 
auth: mech-oauth2 - Always fail with protocol specific error

23 months agoauth: mech-oauth2 - Look for openid configuration URL if missing
Aki Tuomi [Mon, 15 May 2023 08:51:19 +0000 (11:51 +0300)] 
auth: mech-oauth2 - Look for openid configuration URL if missing

23 months agolib-oauth2: Return failure instead of crash with invalid or missing token
Aki Tuomi [Thu, 4 May 2023 12:44:15 +0000 (15:44 +0300)] 
lib-oauth2: Return failure instead of crash with invalid or missing token

23 months agoauth: db-oauth2 - Add accessor for OpenID configuration URL
Aki Tuomi [Wed, 14 Dec 2022 08:10:12 +0000 (10:10 +0200)] 
auth: db-oauth2 - Add accessor for OpenID configuration URL

23 months agoauth: db-oauth2 - Store request username
Aki Tuomi [Fri, 2 Jun 2023 11:20:08 +0000 (14:20 +0300)] 
auth: db-oauth2 - Store request username

23 months agoauth: Add auth_request_fail_with_reply()
Aki Tuomi [Mon, 15 May 2023 09:41:39 +0000 (12:41 +0300)] 
auth: Add auth_request_fail_with_reply()

23 months agoauth: Pass along final response with failure
Aki Tuomi [Mon, 15 May 2023 10:49:41 +0000 (13:49 +0300)] 
auth: Pass along final response with failure

23 months agolib-auth: Move auth_client_request_continue() lower
Aki Tuomi [Mon, 15 May 2023 09:28:53 +0000 (12:28 +0300)] 
lib-auth: Move auth_client_request_continue() lower

Simplifies next commit

23 months agologin-common: Serve final response for client on failure
Aki Tuomi [Mon, 15 May 2023 11:27:55 +0000 (14:27 +0300)] 
login-common: Serve final response for client on failure

23 months agologin-common: Ignore resp when present
Aki Tuomi [Mon, 15 May 2023 10:49:51 +0000 (13:49 +0300)] 
login-common: Ignore resp when present

23 months agoacl: Fix wrong \HasChildren flags for parent mailboxes containing '*' and '%'
sergey.kitov [Wed, 3 May 2023 11:35:54 +0000 (14:35 +0300)] 
acl: Fix wrong \HasChildren flags for parent mailboxes containing '*' and '%'

'*' in mailbox name is replaced with '%' while child mailboxes still
have '*' in their path, this results in wrong \HasNoChildren flag.

23 months agolib-storage: Whitespace cleanup.
sergey.kitov [Wed, 3 May 2023 11:35:18 +0000 (14:35 +0300)] 
lib-storage: Whitespace cleanup.

23 months agolib-storage: Add mail_get_message_id_no_validation()
Marco Bettini [Tue, 9 May 2023 07:22:15 +0000 (07:22 +0000)] 
lib-storage: Add mail_get_message_id_no_validation()

23 months agolib-dict: redis_reply_callback() - Don't crash if there is no callback
Marco Bettini [Tue, 16 May 2023 09:40:55 +0000 (09:40 +0000)] 
lib-dict: redis_reply_callback() - Don't crash if there is no callback

23 months agolib-index: Delete dovecot.index.cache during purging if it becomes too large
Timo Sirainen [Mon, 17 Apr 2023 21:08:40 +0000 (00:08 +0300)] 
lib-index: Delete dovecot.index.cache during purging if it becomes too large

This only happens if the file was already too large before the purging
happens. This mainly fixes assert-crashes caused by old huge >1GB cache
files.

Fixes:
Panic: file mail-index-util.c: line 10 (mail_index_uint32_to_offset): assertion failed: (offset < 0x40000000)

23 months agolib-master: Use ssl_require_crl setting only for server-side SSL settings
Timo Sirainen [Tue, 17 May 2022 10:31:40 +0000 (12:31 +0200)] 
lib-master: Use ssl_require_crl setting only for server-side SSL settings

We don't currently properly support checking CRLs when acting as SSL client.
The CRL would have to be stored as part of the CAs, which isn't commonly
done. This bug has been in the code ever since it was added in
30c5c1fc3608ae575f11960281d3e338b6bf7bc8, but it became more noticeable
with recent changes that started using lib-master for getting all SSL
client settings, e.g. 1e5324b5805bf7299cd8196f7b659fe935f027bd

23 months agostats: stats_metrics_add_dynamic() - Validate event exporter
Karl Fleischmann [Thu, 6 Apr 2023 07:04:35 +0000 (09:04 +0200)] 
stats: stats_metrics_add_dynamic() - Validate event exporter

23 months agolib-master: stats_client_deinit() - Ensure conn.output is flushed before returning
Marco Bettini [Thu, 23 Mar 2023 15:37:28 +0000 (15:37 +0000)] 
lib-master: stats_client_deinit() - Ensure conn.output is flushed before returning

This prevents losing exported events still waiting in buffers while the process exits.

23 months agolib-master: stats_event_callback() - Skip if conn.output is already closed
Marco Bettini [Mon, 27 Mar 2023 08:19:38 +0000 (08:19 +0000)] 
lib-master: stats_event_callback() - Skip if conn.output is already closed

This also prevents further errors from happening on the closed stream.

23 months agolib-master: stats_client_send_event() - Also flush conn.output and check for errors
Marco Bettini [Fri, 24 Mar 2023 14:04:00 +0000 (14:04 +0000)] 
lib-master: stats_client_send_event() - Also flush conn.output and check for errors

23 months agolib-master: stats_event_write() - Don't accumulate more than IO_BLOCK_SIZE bytes...
Marco Bettini [Thu, 23 Mar 2023 15:35:49 +0000 (15:35 +0000)] 
lib-master: stats_event_write() - Don't accumulate more than IO_BLOCK_SIZE bytes in str buffer

23 months agolib: event-filter-parser.y - Add workaround for nerrs being unused warning
Timo Sirainen [Fri, 24 Feb 2023 12:06:14 +0000 (14:06 +0200)] 
lib: event-filter-parser.y - Add workaround for nerrs being unused warning

Fixes with clang-17:
warning: variable 'event_filter_parser_nerrs' set but not used

23 months agoglobal: Remove dead code
Timo Sirainen [Fri, 24 Feb 2023 12:02:01 +0000 (14:02 +0200)] 
global: Remove dead code

23 months agolib-dict: test-dict-client - Handle shutdown cleanly with ctrl-c
Timo Sirainen [Fri, 31 Dec 2021 09:29:02 +0000 (11:29 +0200)] 
lib-dict: test-dict-client - Handle shutdown cleanly with ctrl-c