]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Wed, 26 Jan 2022 12:43:01 +0000 (14:43 +0200)]
auth: ldap: Stop re-sending request after 3 disconnect+reconnects
This prevents retrying the same LDAP request forever in situations where the
request causes LDAP server to become disconnected. This might fix some real
issues, but it was mainly implemented because testing the following commit
caused infinite looping.
Aki Tuomi [Wed, 19 Jan 2022 09:20:24 +0000 (10:20 +0100)]
welcome: Use program-client for welcome script
Replace manual execution of client script with consolidated
program-client API.
Karl Fleischmann [Thu, 20 Jan 2022 09:34:00 +0000 (10:34 +0100)]
lib-program-client: Add unit tests for client program execution
- Add unit test that covers program_client_wait(), in which the script
execution environment needs to wait for a still running asynchronous
client program, and
- add unit test that covers a synchronous program_client_run().
Aki Tuomi [Wed, 19 Jan 2022 08:40:55 +0000 (09:40 +0100)]
lib-program-client: Add program_client_wait() function
Akin to program_client_run() this function creates an inner io-loop that
waits but without operating on the available data.
Aki Tuomi [Wed, 19 Jan 2022 08:16:44 +0000 (09:16 +0100)]
lib-program-client: Process successful unix connection directly
Call program_client_remote_connected() directly instead of adding it to
the io-loop.
Markus Valentin [Tue, 18 Jan 2022 08:46:32 +0000 (09:46 +0100)]
imapc: Start to handle new untagged fetch messages in imapc_sync()
Markus Valentin [Tue, 18 Jan 2022 08:22:24 +0000 (09:22 +0100)]
imapc: Add imapc_sync_handle_untagged_fetches()
Markus Valentin [Mon, 17 Jan 2022 14:41:25 +0000 (15:41 +0100)]
imapc: imapc_untagged_fetch_handle() - Change return type to bool
When calling imapc_untagged_fetch_handle() also retrieve new_message_r
from it which allows imapc_mailbox_msgmap_update() to determine if the
message just handled was already in index or not.
Markus Valentin [Thu, 27 Jan 2022 07:06:16 +0000 (08:06 +0100)]
imapc: imapc_untagged_fetch_update_flags() - Reduce indentation
Markus Valentin [Thu, 27 Jan 2022 06:56:32 +0000 (07:56 +0100)]
imapc: Split off imapc_untagged_fetch_update_flags() for handling flag updates
Markus Valentin [Mon, 17 Jan 2022 14:00:41 +0000 (15:00 +0100)]
imapc: Introduce imapc_untagged_fetch_ctx
Markus Valentin [Mon, 17 Jan 2022 12:57:56 +0000 (13:57 +0100)]
imapc: Decouple imapc_untagged_fetch parsing and handling
Stephan Bosch [Wed, 26 Jan 2022 03:00:32 +0000 (04:00 +0100)]
lib-smtp: test-smtp-client-errors - Add test for succesful authentication with large initial response.
Stephan Bosch [Wed, 26 Jan 2022 02:58:49 +0000 (03:58 +0100)]
lib-smtp: smtp-client-connection - Fix authentication with multi-roundtrip SASL mechanisms.
Before, it would fail with an unexpected reply error.
Stephan Bosch [Mon, 24 Jan 2022 00:39:19 +0000 (01:39 +0100)]
lib-smtp: test-smtp-client-errors - Add test for successful authentication.
Stephan Bosch [Mon, 24 Jan 2022 00:41:15 +0000 (01:41 +0100)]
lib-smtp: test-smtp-client-errors - Rename "authentication failed" test to "authentication".
Stephan Bosch [Fri, 28 Jan 2022 02:14:16 +0000 (03:14 +0100)]
lib-smtp: smtp-client - Fix maximum line length to include CRLF.
Stephan Bosch [Fri, 21 Jan 2022 00:08:31 +0000 (01:08 +0100)]
lib-smtp: smtp-client-connection - Do not include initial response in AUTH command if it is too long.
Stephan Bosch [Fri, 21 Jan 2022 01:26:18 +0000 (02:26 +0100)]
lib-smtp: smtp-client-connection - Move auth cleanup to separate function.
Stephan Bosch [Fri, 28 Jan 2022 02:17:59 +0000 (03:17 +0100)]
lib-sasl: dsasl-client - Make dsasl_client_free(&NULL) a no-op.
Stephan Bosch [Fri, 21 Jan 2022 01:28:23 +0000 (02:28 +0100)]
lib-smtp: smtp-client-connection - Reformat comment.
Timo Sirainen [Thu, 20 Jan 2022 17:36:27 +0000 (18:36 +0100)]
lib-program-client: Explicitly ignore dns_lookup() return value
Timo Sirainen [Thu, 20 Jan 2022 17:23:43 +0000 (18:23 +0100)]
lmtp: proxy: Fix bad error handling code path with assert
Timo Sirainen [Thu, 20 Jan 2022 17:10:41 +0000 (18:10 +0100)]
dict-ldap: Fix crash in synchronous dict_lookup()
However, this code could never actually be called. All dict-ldap lookups
go through dict process, which uses only dict_lookup_async().
Broken by
4453ca75c600ed35643d0775b16848cafae9eaea
Markus Valentin [Fri, 28 Jan 2022 09:54:53 +0000 (10:54 +0100)]
lib-http: http_server_resource_create() - Remove unnecessary pool allocation
Fixes leaking the memory pool created in stats_http_resource_add()
Markus Valentin [Thu, 27 Jan 2022 20:40:25 +0000 (21:40 +0100)]
lib-storage: LAYOUT=index: Fix accessing freed memory when deleting \Noselect parents
Broken by
f5328d6f7e4a8e460c736fa0336f5766aa58abda
Timo Sirainen [Mon, 14 May 2018 20:59:02 +0000 (23:59 +0300)]
fts: Use fts_backend_is_uid_indexed() instead of fts_backend_get_last_uid()
If the highest UID currently known to the view is already indexed, we don't
care whether there are other higher UIDs that have already been indexed.
Timo Sirainen [Mon, 14 May 2018 20:32:08 +0000 (23:32 +0300)]
fts: Add fts_backend_is_uid_indexed() and fts_backend_vfuncs.is_uid_indexed()
Backends may be able to optimize this better than get_last_uid(), because
they only need to verify whether the given UID is indexed or not. This
allows e.g. caching internally without having to refresh the index to see
whether another mail was just recently indexed.
If the new vfunc isn't implemented by the backend, get_last_uid() is used to
implement it.
Timo Sirainen [Mon, 14 May 2018 20:26:07 +0000 (23:26 +0300)]
fts-*: Use named initializers for fts_backend_vfuncs
Marco Bettini [Fri, 17 Dec 2021 08:27:07 +0000 (09:27 +0100)]
plugins/fts: Allow plugins to carry state across calls during search session
Timo Sirainen [Wed, 26 Jan 2022 18:28:33 +0000 (19:28 +0100)]
indexer: Fix memory leak - worker_requests were never freed
Broken by
141766b24f885259508ae39f2e18811018373bc7
Timo Sirainen [Tue, 25 Jan 2022 22:31:34 +0000 (23:31 +0100)]
indexer: Fix memory leak - session IDs were never freed
Broken by
a8dcd4e2332c73087e9b148d34259230a77edb28
Karl Fleischmann [Mon, 24 Jan 2022 13:51:41 +0000 (14:51 +0100)]
lib-storage: Add unit tests for mail_parse_human_timestamp()
Add one test for one of each branches in mail_parse_human_timestamp()
which include:
- ISO dates,
- IMAP dates,
- UNIX timestamps, and
- relative time intervals.
Karl Fleischmann [Mon, 24 Jan 2022 13:50:46 +0000 (14:50 +0100)]
lib-storage: mail_parse_human_timestamp() - Make ISO date conversion UTC specific
Dmitry Yakunin [Mon, 16 Apr 2018 10:43:03 +0000 (13:43 +0300)]
lib-sql: pgsql: Added correct notice processor
Markus Valentin [Fri, 14 Jan 2022 07:07:50 +0000 (08:07 +0100)]
lib-storage: mailbox-list: index_list_rename_mailbox() - Support NO-NOSELECT
When NO-NOSELECT is configured delete parent mailboxes which are not
selectable or existant when renaming child mailboxes.
Markus Valentin [Fri, 14 Jan 2022 07:04:09 +0000 (08:04 +0100)]
lib-storage: mailbox-list: index_list_delete_mailbox() - Support NO-NOSELECT
When NO-NOSELECT is configured delete parent mailboxes which are not
selectable or not existant when deleting child mailboxes.
Markus Valentin [Wed, 22 Dec 2021 11:12:51 +0000 (12:12 +0100)]
imapc: Fix doveadm copy with imapc
When copying to a mailbox with imapc it does not sync the destination
mailbox when opening. This created "Error: Syncing mailbox '$mailboxname'
failed: Internal error occurred." Prevent this error by checking for the
MAILBOX_FLAG_SAVEONLY flag which is used by doveadm to create the
destination mailbox. If that flag is set ignore that there was no initial
fetching done.
Timo Sirainen [Fri, 21 Jan 2022 14:31:04 +0000 (16:31 +0200)]
doveadm fetch/search: Use DOVEADM_MAIL_ITER_FLAG_STOP_WITH_CLIENT
These commands only write output to the client, so it's safe to stop
them if the client disconnects.
Timo Sirainen [Fri, 21 Jan 2022 14:29:48 +0000 (16:29 +0200)]
doveadm: doveadm_mail_iter_init() - Add DOVEADM_MAIL_ITER_FLAG_STOP_WITH_CLIENT
When this flag is used, the iteration is stopped if print ostream has
reported an error, i.e. doveadm-client has disconnected.
Timo Sirainen [Fri, 21 Jan 2022 14:24:39 +0000 (16:24 +0200)]
doveadm: doveadm_mail_iter_init() - Change bool parameter to flags
Timo Sirainen [Thu, 20 Jan 2022 13:16:51 +0000 (14:16 +0100)]
doveadm-server: Fix hang when flushing print output and client disconnects
Timo Sirainen [Thu, 20 Jan 2022 13:13:48 +0000 (14:13 +0100)]
lib: ostream-multiplex - Call flush callbacks also when stream has failed
It may be important for the flush callbacks to know when ostream has been
closed. This is a partial fix to prevent doveadm-server hanging when it's
printing lots of output and doveadm client disconnects.
Timo Sirainen [Thu, 20 Jan 2022 12:34:50 +0000 (13:34 +0100)]
doveadm: Fix assert-crash when proxying causes print buffer to be flushed
Fixes:
Panic: file ioloop.c: line 865 (io_loop_destroy): assertion failed: (ioloop == current_ioloop)
sergey.kitov [Thu, 16 Dec 2021 09:49:24 +0000 (11:49 +0200)]
lib-master: Add process_shutdown_filter setting
sergey.kitov [Thu, 16 Dec 2021 09:44:38 +0000 (11:44 +0200)]
lib-master: Refactor parsing event filters from settings.
sergey.kitov [Thu, 16 Dec 2021 09:38:53 +0000 (11:38 +0200)]
lib-master: Remove check for client->filter == NULL before event_filter_match().
sergey.kitov [Thu, 16 Dec 2021 09:38:08 +0000 (11:38 +0200)]
lib: Add check for NULL to event_filter_match().
sergey.kitov [Wed, 15 Dec 2021 13:19:04 +0000 (15:19 +0200)]
lib-master: Whitespace cleanup.
sergey.kitov [Wed, 1 Dec 2021 11:35:12 +0000 (13:35 +0200)]
lib-storage: Emit event with process stat in mail_user_deinit().
sergey.kitov [Tue, 7 Dec 2021 14:58:43 +0000 (16:58 +0200)]
lib: Add event_add_int_non_zero()
sergey.kitov [Wed, 1 Dec 2021 11:34:22 +0000 (13:34 +0200)]
lib: Add functionality for acquiring process stat.
sergey.kitov [Tue, 21 Dec 2021 08:47:54 +0000 (10:47 +0200)]
lib: add timeval_to_usecs()
sergey.kitov [Mon, 20 Dec 2021 14:17:54 +0000 (16:17 +0200)]
lib: Whitespace cleanup
Timo Sirainen [Wed, 1 Dec 2021 10:21:48 +0000 (12:21 +0200)]
lib-storage: Fix search query that only contains SEARCH_MAILBOX_GUID
Fixes assert-crash in virtual mailbox:
Panic: file virtual-search.c: line 77 (virtual_search_get_records): assertion failed: (result != 0)
Timo Sirainen [Thu, 20 Jan 2022 12:28:44 +0000 (13:28 +0100)]
lib-doveadm: Fix connect timeout from 30ms to 30s
Marco Bettini [Tue, 18 Jan 2022 13:26:30 +0000 (14:26 +0100)]
config: old_settings_ssl_dh_read() - Replace while() from non-iterating code
Found by code analysis tool
Marco Bettini [Tue, 18 Jan 2022 11:20:02 +0000 (12:20 +0100)]
doveadm: doveadm_mailbox_list_iter_next() - Replace while() in non-iterating code
Found by code analysis tool
Timo Sirainen [Thu, 10 Dec 2020 11:24:36 +0000 (13:24 +0200)]
dsync: Log errors sent by remote tcp connection
Timo Sirainen [Thu, 10 Dec 2020 11:22:31 +0000 (13:22 +0200)]
dsync: Split off dsync_errors_finish()
The logic changes a bit, but it's fine because either all of err_stream,
io_error and fd_err are set or none of them are.
Timo Sirainen [Thu, 20 Jan 2022 10:42:57 +0000 (12:42 +0200)]
lib-storage: Don't delay setting mail event's log prefix
This caused crashes if the mail event was kept referenced and used for
logging after struct mail was already freed. With the delayed mail event
creation the log prefix shouldn't be much of a performance problem, so just
set the prefix immediately.
Partially reverts
bc68e1c368db746557829f67556f3c72943b7956 .
Stephan Bosch [Fri, 14 Jan 2022 03:02:09 +0000 (04:02 +0100)]
submission: submission-backend-relay - Make sure QUIT command yields 221 when relay connection is closed normally.
Before, it would sometimes erroneously treat the closing connection as a
"connection lost" 421 situation.
Stephan Bosch [Fri, 14 Jan 2022 03:01:29 +0000 (04:01 +0100)]
submission: submission-backend-relay - Fix segfault in QUIT command client-side destruction.
Stephan Bosch [Mon, 9 Nov 2020 01:29:04 +0000 (02:29 +0100)]
lib-smtp: smtp-server-cmd-rset - Stop processing pipeline until RSET is complete.
A subsequent MAIL command could get reset in the middle otherwise. Before, it
only blocked input until a reply was submitted, but the transaction isn't reset
until the RSET command is complete (just before actually sending the reply)
which can cause issues when the subsequent MAIL command is already being
processed.
Stephan Bosch [Sun, 8 Nov 2020 23:02:51 +0000 (00:02 +0100)]
lib-smtp: smtp-server-cmd-helo - Stop processing pipeline until HELO/EHLO is complete.
A subsequent MAIL command could get reset in the middle otherwise. Before, it
only blocked input until a reply was submitted, but the transaction isn't reset
until the EHLO/HELO command is complete (just before actually sending the reply)
which can cause issues when the subsequent MAIL command is already
being processed.
Stephan Bosch [Sun, 8 Nov 2020 02:58:06 +0000 (03:58 +0100)]
lib-smtp: smtp-server-command - Add smtp_server_command_pipeline_block/unblock().
Stephan Bosch [Mon, 10 Jan 2022 02:54:13 +0000 (03:54 +0100)]
lib-smtp: smtp-client-transaction - Plug the command pipeline while transaction is pending.
This prevents commands submitted after creating the transaction from being
exectuted out-of-order before the transaction's MAIL command.
Stephan Bosch [Mon, 10 Jan 2022 02:53:41 +0000 (03:53 +0100)]
lib-smtp: smtp-client-transaction - Add smtp_client_command_mail_submit_after().
Stephan Bosch [Mon, 10 Jan 2022 00:18:56 +0000 (01:18 +0100)]
lib-smtp: smtp-client-transaction - Prevent recursion for smtp_client_transaction_fail*().
Stephan Bosch [Tue, 11 Jan 2022 01:05:26 +0000 (02:05 +0100)]
lib-smtp: Reformat smtp-server-cmd-quit.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
Timo Sirainen [Fri, 31 Dec 2021 09:28:09 +0000 (11:28 +0200)]
lib: Fix assert-crash when using only non-delayed signals
Fixes:
Panic: file lib-signals.c: line 190 (lib_signals_init_io): assertion failed: (sig_pipe_fd[0] != -1)
sergey.kitov [Thu, 30 Dec 2021 15:04:22 +0000 (17:04 +0200)]
util: Remove unreachable code.
sergey.kitov [Thu, 30 Dec 2021 15:03:54 +0000 (17:03 +0200)]
plugins/fts-squat: Remove unreachable code.
sergey.kitov [Mon, 3 Jan 2022 15:12:43 +0000 (17:12 +0200)]
lib: Replace compile time defined conditions with COMPILE_ERROR_IF_TRUE.
sergey.kitov [Mon, 3 Jan 2022 15:11:56 +0000 (17:11 +0200)]
lib: Remove unreachable code.
sergey.kitov [Thu, 30 Dec 2021 15:03:08 +0000 (17:03 +0200)]
lib-storage: Remove unreachable code.
sergey.kitov [Mon, 3 Jan 2022 15:03:32 +0000 (17:03 +0200)]
lib-ssl-iostream: Replace unreachable error handling with i_unreached().
SSL_CTX_set_eddh_auto() cannot return 0 when HAVE_ECDH is defined.
sergey.kitov [Thu, 30 Dec 2021 15:01:46 +0000 (17:01 +0200)]
lib-smtp: Remove unreachable code.
sergey.kitov [Thu, 30 Dec 2021 15:00:51 +0000 (17:00 +0200)]
lib-settings: Remove unreachable code.
sergey.kitov [Thu, 30 Dec 2021 15:00:16 +0000 (17:00 +0200)]
lib-oauth2: Remove unreachable code.
sergey.kitov [Thu, 30 Dec 2021 14:59:47 +0000 (16:59 +0200)]
lib-imap: Replace compile time defined conditions with conditional compilation.
sergey.kitov [Mon, 3 Jan 2022 15:40:33 +0000 (17:40 +0200)]
lib-http: Remove unreachable code.
sergey.kitov [Mon, 3 Jan 2022 15:39:57 +0000 (17:39 +0200)]
lib-http: Replace unreachable return statement with i_unreached().
sergey.kitov [Thu, 30 Dec 2021 14:58:07 +0000 (16:58 +0200)]
lib-dcrypt: Remove unreachable code.
sergey.kitov [Thu, 30 Dec 2021 14:57:13 +0000 (16:57 +0200)]
doveadm: Remove unreachable code.
sergey.kitov [Thu, 30 Dec 2021 18:59:56 +0000 (20:59 +0200)]
lib-smtp: Whitespace cleanup.
sergey.kitov [Thu, 30 Dec 2021 18:57:21 +0000 (20:57 +0200)]
lib-http: Whitespace cleanup.
sergey.kitov [Thu, 30 Dec 2021 13:48:51 +0000 (15:48 +0200)]
doveadm: Whitespace cleanup.
Aki Tuomi [Fri, 17 Dec 2021 09:36:37 +0000 (11:36 +0200)]
doc: Update Solr schema
Use ICU tokenization and normalization.
Reorder filters to make more sense.
Stephan Bosch [Mon, 1 Nov 2021 01:33:50 +0000 (02:33 +0100)]
pop3-login: client-authenticate - Send redirect reply upon referral nologin auth result.
Stephan Bosch [Mon, 1 Nov 2021 01:22:45 +0000 (02:22 +0100)]
pop3-login: proxy - Support parsing REFERRAL on remote auth failure.
Stephan Bosch [Mon, 1 Nov 2021 00:40:18 +0000 (01:40 +0100)]
lib-pop3: Add definition for default service TCP ports.
Stephan Bosch [Sun, 31 Oct 2021 21:56:59 +0000 (22:56 +0100)]
pop3: Move pop3-capability.h to new lib-pop3.
Stephan Bosch [Sat, 20 Nov 2021 22:43:28 +0000 (23:43 +0100)]
submission-login: submission-proxy - Properly handle IPv6 in redirect.
Stephan Bosch [Sat, 20 Nov 2021 22:41:17 +0000 (23:41 +0100)]
imap-login: client-authenticate - Make sure redirect IPv6 is handled correctly.
Pass IP structure to URL API instead of only the hostname as a string.
Stephan Bosch [Sat, 20 Nov 2021 13:37:16 +0000 (14:37 +0100)]
imap-login: imap-proxy - Fix parsing REFERRAL response with IPv6 URL.
Stephan Bosch [Sat, 20 Nov 2021 15:31:31 +0000 (16:31 +0100)]
imap-login: imap-proxy - Sanitize response in REFERRAL parse error.
Stephan Bosch [Sat, 20 Nov 2021 13:27:23 +0000 (14:27 +0100)]
imap-login: imap-proxy - Restructure parsing of NO response.
Don't parse the closing ']' beforehand. This is needed for later commit in which
REFERRAL response code is parsed incrementally.
Stephan Bosch [Sat, 20 Nov 2021 23:35:50 +0000 (00:35 +0100)]
lmtp: lmtp-proxy - Always wrap IPv6 in [...] in log messages.