]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Marco Bettini [Wed, 10 May 2023 15:54:32 +0000 (15:54 +0000)]
auth: db-ldap - Add %{ldap_multi}
Marco Bettini [Thu, 11 May 2023 09:24:37 +0000 (09:24 +0000)]
auth: db_ldap_set_attrs() - Handle braces nesting while splitting on commas
Stephan Bosch [Tue, 7 Feb 2023 20:18:35 +0000 (21:18 +0100)]
submission: submission-client - Prevent NULL memory access upon early connection abort.
When the SMTP server connection is aborted early in client_create(), the
smtp_server_connection_abort() function clears client->conn immediately, causing
a later nested call to client_stats() from disconnect callback to access
client->conn == NULL. Early abort currently only happens when an anonymous login
is rejected.
Marco Bettini [Fri, 19 May 2023 08:42:39 +0000 (08:42 +0000)]
submission: Drop unused anonymous_allowed fields
Marco Bettini [Fri, 19 May 2023 09:50:45 +0000 (09:50 +0000)]
auth: user_callback() - Check if the user is anonymous
Timo Sirainen [Tue, 30 May 2023 20:17:21 +0000 (23:17 +0300)]
lib: Fix MODULE_CONTEXT_REQUIRE() to always panic if context is unset
Previously panic happened only if the module_contexts array was too small,
not when the element inside the array was NULL.
This required rewriting the macros partially as inline functions, which also
simplifies how they work.
Timo Sirainen [Tue, 30 May 2023 08:12:18 +0000 (11:12 +0300)]
imap: Don't try to hibernate when COMPRESS is enabled
It doesn't work properly. Broken by
5f27e25c64555dcaae6cb00c479cd05bc2638081
Timo Sirainen [Tue, 30 May 2023 08:10:39 +0000 (11:10 +0300)]
imap: Fix crash when trying to use COMPRESS multiple times
Broken by
5f27e25c64555dcaae6cb00c479cd05bc2638081
Fixes:
Panic: file cmd-compress.c: line 104 (cmd_compress): assertion failed: (client->input->v_offset == prev_in_offset)
Aki Tuomi [Fri, 12 May 2023 08:48:25 +0000 (11:48 +0300)]
lib-oauth2: Do not send empty client_id or client_secret
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.
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
Marco Bettini [Mon, 3 Apr 2023 08:39:40 +0000 (08:39 +0000)]
global: Add INPROGRESS capability
Marco Bettini [Wed, 17 May 2023 12:33:16 +0000 (12:33 +0000)]
indexer: Provide progress updates in messages counts rather than just percentage (client side)
Marco Bettini [Wed, 17 May 2023 08:01:33 +0000 (08:01 +0000)]
indexer: Provide progress updates in messages counts rather than just percentage (indexer side)
Marco Bettini [Tue, 16 May 2023 15:12:03 +0000 (15:12 +0000)]
indexer: index_mailbox_precache() - Move progress variables definitions closer to their usage
Marco Bettini [Thu, 9 Feb 2023 11:20:02 +0000 (11:20 +0000)]
fts: fts_indexer_notify() - Retrofit notify_progress()
Also change the timeout from INDEXER_NOTIFY_INTERVAL_SECS to
MAIL_STORAGE_NOTIFY_INTERVAL_SECS
Marco Bettini [Mon, 6 Mar 2023 15:34:37 +0000 (15:34 +0000)]
indexer: index_mailbox_precache() - Ensure updates are sent even with few messages and very slow processing
With the former behavior, if we have 101 messages and they take 30 seconds,
the client sees the progress stuck at 0% for most the processign time, only
to see it jump to 99% a fraction of a second before the competion.
This change ensures that the client sees a timely update every time the
integer percentage actually changes.
Marco Bettini [Mon, 6 Mar 2023 15:34:03 +0000 (15:34 +0000)]
indexer: index_mailbox_precache() - Uncork the socket before starting to send progress updates to the client
Otherwise the client does not receive the updates timely and has
nothing to propagate to the notify_progress() even if progress happened.
Marco Bettini [Wed, 1 Mar 2023 14:18:34 +0000 (14:18 +0000)]
fts: fts_indexer_input_args() - Fix client-side timeout
Client side timeout now just triggers if there is period long enough
where the server doesn't send updates. This works just because the
server is not pushing the updates properly.
The client must timeout BOTH if the server is unresponsive AND if
the server sends updates but the overall elapsed time exceedes.
Marco Bettini [Thu, 2 Mar 2023 11:11:06 +0000 (11:11 +0000)]
imap: copy/move - Retrofit notify_progress()
The replacing code in mailbox-storage uses MAIL_STORAGE_NOTIFY_INTERVAL_SECS
instead of MAIL_STORAGE_STAYALIVE_SECS
Marco Bettini [Thu, 16 Feb 2023 10:26:14 +0000 (10:26 +0000)]
imap: cmd-copy() - Document why we stop iterating at first expunged message
Marco Bettini [Fri, 10 Mar 2023 14:20:10 +0000 (14:20 +0000)]
lib-storage: Add mailbox_search_reset_progress_start()
Marco Bettini [Wed, 1 Mar 2023 13:35:28 +0000 (13:35 +0000)]
lib-storage: Add mailbox_search_set_progress_hidden()
Marco Bettini [Thu, 9 Feb 2023 10:01:50 +0000 (10:01 +0000)]
lib-storage: maildir_sync_notify() - Retrofit notify_progress()
Also change the timeout from MAIL_STORAGE_STAYALIVE_SECS to
MAIL_STORAGE_NOTIFY_INTERVAL_SECS
Marco Bettini [Mon, 13 Feb 2023 17:25:46 +0000 (17:25 +0000)]
lib-storage: mailbox_search_notify() - Check also ctx->search_start_time
The original check caused the 1st deadline to miss being notified
Marco Bettini [Fri, 24 Feb 2023 09:33:54 +0000 (09:33 +0000)]
imap: Propagate cmd_tag to notify_progress()
Marco Bettini [Thu, 2 Mar 2023 11:04:57 +0000 (11:04 +0000)]
global: Add notify_progress() to struct mail_storage_callbacks
Marco Bettini [Wed, 8 Feb 2023 10:01:04 +0000 (10:01 +0000)]
lib-storage: Move progress notification from search_more_with_mail() to mailbox_search_next_nonblock()
This allows to cover more cases, notably also the search progress
in FILTER=SIEVE extension
Marco Bettini [Thu, 2 Mar 2023 10:22:17 +0000 (10:22 +0000)]
imap: Rename global var mail-storage-callbacks to imap-storage-callbacks
Marco Bettini [Thu, 2 Mar 2023 10:18:42 +0000 (10:18 +0000)]
imap: Rename mail-storage-callbacks.c to imap-storage-callbacks.c
Marco Bettini [Wed, 8 Feb 2023 10:42:53 +0000 (10:42 +0000)]
imap: SEARCH RELEVANCY - Add stack data frame
Timo Sirainen [Tue, 2 May 2023 13:08:13 +0000 (16:08 +0300)]
lib: event-filter - Support escaping wildcards in values
Timo Sirainen [Tue, 2 May 2023 11:47:23 +0000 (14:47 +0300)]
lib: Add wildcard_match_escaped*()
This allows using \* and \? to match wildcard characters as-is instead of
being wildcards.
Timo Sirainen [Wed, 26 Apr 2023 20:25:18 +0000 (23:25 +0300)]
lib: event_filter_parse() - Add data stack frame
Timo Sirainen [Thu, 4 May 2023 15:22:56 +0000 (18:22 +0300)]
lib: event filter - strlist comparisons should be case-insensitive
All the other string comparisons are case-insensitive as well.
Aki Tuomi [Tue, 16 May 2023 05:52:18 +0000 (08:52 +0300)]
auth: passdb/userdb-lua - Improve initialization errors
Aki Tuomi [Tue, 9 May 2023 07:57:08 +0000 (10:57 +0300)]
auth: passdb/userdb-lua - Pass arguments to init script
Aki Tuomi [Tue, 16 May 2023 06:06:01 +0000 (09:06 +0300)]
auth: passdb/userdb-lua - Refactor to use t_split_key_value_eq()
Aki Tuomi [Tue, 9 May 2023 09:00:48 +0000 (12:00 +0300)]
auth: db-lua - Allow nil response from Lua
Aki Tuomi [Tue, 9 May 2023 08:20:59 +0000 (11:20 +0300)]
auth: db-lua - Check for nil in auth_request_lua_password_verify()
Avoids crash if script calls the function with nil values.
Aki Tuomi [Tue, 9 May 2023 07:56:41 +0000 (10:56 +0300)]
auth: db-lua - Support passing arguments to auth_passdb/userdb_init()
Aki Tuomi [Tue, 9 May 2023 07:18:57 +0000 (10:18 +0300)]
auth: db-lua - Call auth_passdb/userdb_init() on the lua script
This allows the script to prepare itself for these roles.
Aki Tuomi [Tue, 9 May 2023 07:05:01 +0000 (10:05 +0300)]
auth: db-lua - Move auth_lua_script_init() later
Simplifies next change.
Aki Tuomi [Tue, 9 May 2023 07:01:53 +0000 (10:01 +0300)]
auth: db-lua - Use parameters structure to initialize script
Simplifies next commit.
Aki Tuomi [Mon, 15 May 2023 06:23:31 +0000 (09:23 +0300)]
lib-lua: Do not expect return value from script_init()
This is not really needed. Script can call error() if
they need to fail.
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
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)
Timo Sirainen [Sun, 14 May 2023 21:17:28 +0000 (00:17 +0300)]
dict-sql: Fix dict iteration with uuid type
dict_iterate_next() is run in its own data stack frame, so the returned
values must not be allocated from data stack.
Broken by
9e46d634d493e9539b4da635138e7b3670b625f2
Timo Sirainen [Fri, 12 May 2023 14:45:32 +0000 (17:45 +0300)]
master: service_anvil_send_log_fd() - Avoid using global services variable
This just makes the code clearer and less likely to break in the future.
Aki Tuomi [Mon, 8 May 2023 05:38:20 +0000 (08:38 +0300)]
lib-oauth2: Validate scope when configured
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.
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.
Marco Bettini [Tue, 9 May 2023 07:22:15 +0000 (07:22 +0000)]
lib-storage: Add mail_get_message_id_no_validation()
Timo Sirainen [Mon, 8 May 2023 08:08:51 +0000 (11:08 +0300)]
imap: NOTIFY delayed notifications sent soon after handling IMAP commands
If a change happened within 1 second after any IMAP command was finished,
the notification wasn't sent until some other change/command occurred.
Marco Bettini [Fri, 5 May 2023 15:20:34 +0000 (15:20 +0000)]
auth: mech_gssapi_unwrap() - Release gss_release_buffe(outbuf) before returning
Marco Bettini [Tue, 2 May 2023 09:18:57 +0000 (09:18 +0000)]
imap-urlauth: Move imap-urlauth-login to its own directory
Aki Tuomi [Tue, 2 May 2023 08:40:53 +0000 (11:40 +0300)]
build-aux/git-abi-version-gen: Fail if no version found
Aki Tuomi [Tue, 2 May 2023 07:55:36 +0000 (10:55 +0300)]
build-aux/git-abi-version-gen: Allow .git to just exist
Fixes compatibility with monolith.
.git can also be a file, pointing to an external location
for the actual git repository. This usually happens when
code is a subrepository.
Aki Tuomi [Thu, 20 Apr 2023 20:27:57 +0000 (23:27 +0300)]
lib: guid - Add guid_uuid4_generate()
Generates a UUIDv4 UUID
Aki Tuomi [Tue, 25 Apr 2023 12:01:29 +0000 (15:01 +0300)]
dict-sql: Use array for type names
Ensures that type names match with enum.
Aki Tuomi [Thu, 20 Apr 2023 13:08:10 +0000 (13:08 +0000)]
dict-sql: Add support for UUID type
Aki Tuomi [Thu, 20 Apr 2023 13:00:54 +0000 (13:00 +0000)]
lib-sql: driver-cassandra - Support binding UUID
Aki Tuomi [Thu, 20 Apr 2023 12:45:45 +0000 (12:45 +0000)]
lib-sql: Add UUID datatype
sergey.kitov [Thu, 20 Apr 2023 07:44:03 +0000 (10:44 +0300)]
imap: set 'internal' flag for NOTIFY-CALLBACK command.
sergey.kitov [Thu, 20 Apr 2023 07:41:37 +0000 (10:41 +0300)]
imap: Add 'internal' flag to struct client_command_context.
imap_command_finished event is not issued when the flag is set.
Aki Tuomi [Tue, 25 Apr 2023 07:38:05 +0000 (10:38 +0300)]
autogen: Always overwrite old files
Aki Tuomi [Tue, 25 Apr 2023 06:28:06 +0000 (09:28 +0300)]
build-aux: Update version scripts to support rolling releases
For ABI version, we do the following
2023.1 => 2023.ABIv1
2023.1-1 => 2023.ABIv1
2023.1-1+foo5 => 2023.ABIv1
2.4.0 => 2.4.ABIv0
2.4.0-1 => 2.4.ABIv0
2.4.0-1+foo5 => 2.4.ABIv0
Empty version produces 0.0.ABIv0
Timo Sirainen [Thu, 20 Apr 2023 08:43:55 +0000 (11:43 +0300)]
lib-storage: Send mail_user_session_finished via mail_user_unref()
The purpose of mail_user_deinit() is to guarantee that the user gets freed
at that point - there's no requirement to call it instead of
mail_user_unref(). Move the mail_user_session_finished event sending to
mail_user_unref() where the rest of the deinitialization code is as well.
This also fixes mail_user_session_finished event being wrongly sent in some
shared mailbox failure code paths. Potentially it fixes also missing
mail_user_session_finished events in some code paths.
Marco Bettini [Wed, 19 Apr 2023 14:35:42 +0000 (14:35 +0000)]
lazy-expunge: lazy_expunge_mail_is_last_instance() - Don't fail if a backend mailbox was deleted under a virtual one
Marco Bettini [Thu, 20 Apr 2023 08:25:32 +0000 (08:25 +0000)]
virtual - void virtual_box_copy_error() - Wrap src->mailbox_deleted to MAIL_ERROR_EXPUNGED
Marco Bettini [Wed, 19 Apr 2023 13:38:48 +0000 (13:38 +0000)]
virtual: virtual_sync_backend_boxes() - Don't fail on deleted backend boxes
Marco Bettini [Thu, 6 Apr 2023 15:07:15 +0000 (15:07 +0000)]
virtual: virtual_transaction_commit() - Don't fail when a backend box was removed and no changes are pending for it
Marco Bettini [Thu, 6 Apr 2023 15:03:38 +0000 (15:03 +0000)]
virtual: virtual_transaction_commit() - Propagate error details from commits of underlying physical boxes
Marco Bettini [Thu, 6 Apr 2023 14:58:30 +0000 (14:58 +0000)]
virtual: virtual_transaction_commit() - Use array_foreach_elem()
Marco Bettini [Thu, 13 Apr 2023 08:03:57 +0000 (08:03 +0000)]
lib-storage: index_list_mailbox_open() - Check that mailbox has not been deleted
Without this, removing a mailbox (obox) used in a virtual box
fails to understand that the box has been removed intentionally
and tries to recreate/rebuild it.
Marco Bettini [Thu, 6 Apr 2023 14:55:41 +0000 (14:55 +0000)]
virtual: Use container_of()
Timo Sirainen [Tue, 18 Apr 2023 13:16:59 +0000 (16:16 +0300)]
imap-urlauth: Don't access login_set.*_socket_path after they're freed from data stack
Forgotten in
7f4bcbb9f2d97745a12d301b9ee276200ac58605
Marco Bettini [Fri, 14 Apr 2023 13:04:07 +0000 (13:04 +0000)]
fts-solr: fts_backend_solr_update_deinit() Avoid double commit
Soft-commit is already handled in fts_backend_solr_update_set_mailbox(),
except for the expunges.
Marco Bettini [Fri, 14 Apr 2023 13:03:27 +0000 (13:03 +0000)]
fts-solr: Commit when changing mailbox
Soft-commit before fts_index_set_last_uid() to prevent new items being
missed in next search.
Marco Bettini [Fri, 14 Apr 2023 13:00:34 +0000 (13:00 +0000)]
fts-solr: Extract fts_backend_solr_commit()
sergey.kitov [Wed, 12 Apr 2023 09:06:52 +0000 (12:06 +0300)]
lib-storage: Rollback save transaction when transaction commit fails.
Timo Sirainen [Fri, 14 Apr 2023 08:35:30 +0000 (11:35 +0300)]
lib-login: Don't update process title if verbose_proctitle=no
Broken by
4fcd7f497577af361fc3313fbc07a61c14e17715
Timo Sirainen [Tue, 11 Apr 2023 11:26:52 +0000 (14:26 +0300)]
doveadm dump index: Add support for virtual2 header
Timo Sirainen [Tue, 11 Apr 2023 08:13:27 +0000 (11:13 +0300)]
doveadm-save: Add -r received-date parameter
Timo Sirainen [Tue, 11 Apr 2023 08:01:15 +0000 (11:01 +0300)]
lib-storage: mail_parse_human_timestamp() - Add support for imap date-time
Timo Sirainen [Tue, 11 Apr 2023 07:51:52 +0000 (10:51 +0300)]
lib-storage: test-mail-storage - Simplify mail_parse_human_timestamp() testing
Timo Sirainen [Mon, 13 Jun 2022 07:39:17 +0000 (10:39 +0300)]
doveadm save: Add -U <uid> and -g <guid> parameters
These are mainly useful for testing.
sergey.kitov [Fri, 17 Feb 2023 16:09:59 +0000 (18:09 +0200)]
lib-storage: Set attachment file size metadata.
sergey.kitov [Fri, 17 Feb 2023 16:08:09 +0000 (18:08 +0200)]
lib-fs: Replace missing sis files with spaces, when attachment file size metadata is set.
sergey.kitov [Wed, 8 Mar 2023 11:38:59 +0000 (13:38 +0200)]
lib: Move istream-nonuls from lib-mail to lib.
sergey.kitov [Fri, 17 Feb 2023 16:06:07 +0000 (18:06 +0200)]
lib-fs: Add fs metadata key for file size.
sergey.kitov [Thu, 16 Feb 2023 14:25:14 +0000 (16:25 +0200)]
lib-fs: Disable sis writing.
sergey.kitov [Fri, 3 Feb 2023 15:57:32 +0000 (17:57 +0200)]
lib-storage: Remove duplicated include
Karl Fleischmann [Thu, 6 Apr 2023 07:04:35 +0000 (09:04 +0200)]
stats: stats_metrics_add_dynamic() - Validate event exporter
Timo Sirainen [Wed, 5 Apr 2023 18:27:51 +0000 (21:27 +0300)]
notify: Change notify_unregister() to zero the pointer, and ignore NULL
Timo Sirainen [Tue, 4 Apr 2023 08:51:22 +0000 (11:51 +0300)]
notify-status: Fix crash if user initialization fails
The deinit code crashed if mail_namespaces_created hook hadn't been called
before user was deinitialized.
Timo Sirainen [Mon, 3 Apr 2023 21:43:55 +0000 (00:43 +0300)]
dsync: Fix handling mailboxes with % character when BROKENCHAR isn't explicitly set in config
When vname_escape_char (= BROKENCHAR) isn't explicitly set in configuration,
'%' character (or if it was hierarchy separator, '~') was used as the default
internal escape character. However, this was used inconsistently between local
and remote mailbox trees. The remote tree stored the mailbox names unescaped,
while the local mailbox names were escaped. This inconsistency caused dsync
to do unnecessary mailbox renames, which might have ended up failing.
This especially fixes dsync failures when mailbox name ended with the '%'
character.
Timo Sirainen [Mon, 3 Apr 2023 21:43:04 +0000 (00:43 +0300)]
dsync: Refactor dsync_brain_mailbox_to_parts() into dsync_mailbox_name_to_parts()
Karl Fleischmann [Tue, 4 Apr 2023 08:31:14 +0000 (10:31 +0200)]
lib-dns: dns_lookup_timeout() - Append timeout value in error message
Marco Bettini [Fri, 31 Mar 2023 12:40:57 +0000 (12:40 +0000)]
imap-login: Handle each command in its own data stack frame