]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
3 years agodsync: Fill doveadm_server.port field
Timo Sirainen [Thu, 29 Jul 2021 14:05:34 +0000 (17:05 +0300)] 
dsync: Fill doveadm_server.port field

In preparation for following changes.

3 years agodoveadm: server-connection - Delay handshaking until client_connected is called
Timo Sirainen [Thu, 29 Jul 2021 13:43:36 +0000 (16:43 +0300)] 
doveadm: server-connection - Delay handshaking until client_connected is called

In preparation for connecting to remote IP asynchronously.

3 years agodoveadm: server-connection - Invalid log type should be printed as error
Timo Sirainen [Thu, 29 Jul 2021 13:36:47 +0000 (16:36 +0300)] 
doveadm: server-connection - Invalid log type should be printed as error

It's a bug if it happens.

3 years agodoveadm: server-connection - Convert to using event logging
Timo Sirainen [Thu, 29 Jul 2021 13:36:33 +0000 (16:36 +0300)] 
doveadm: server-connection - Convert to using event logging

3 years agodoveadm: server-connection - Convert to connection API
Timo Sirainen [Thu, 29 Jul 2021 12:07:21 +0000 (15:07 +0300)] 
doveadm: server-connection - Convert to connection API

3 years agodoveadm: server-connection - Add struct connection
Timo Sirainen [Thu, 29 Jul 2021 10:57:55 +0000 (13:57 +0300)] 
doveadm: server-connection - Add struct connection

In preparation for using the full connection API.

3 years agodoveadm: server-connection - Remove the concept of idle connections
Timo Sirainen [Thu, 29 Jul 2021 12:57:28 +0000 (15:57 +0300)] 
doveadm: server-connection - Remove the concept of idle connections

The connection is always disconnected after processing commands, unless
the callback started a new command.

3 years agodoveadm: Remove server_connection_get_server()
Timo Sirainen [Thu, 29 Jul 2021 13:25:15 +0000 (16:25 +0300)] 
doveadm: Remove server_connection_get_server()

3 years agodoveadm: Avoid using server_connection_get_server()
Timo Sirainen [Thu, 29 Jul 2021 13:24:41 +0000 (16:24 +0300)] 
doveadm: Avoid using server_connection_get_server()

3 years agodoveadm: Remove old doveadm-server exit-code workaround
Timo Sirainen [Thu, 29 Jul 2021 12:40:00 +0000 (15:40 +0300)] 
doveadm: Remove old doveadm-server exit-code workaround

The "old" means v2.2.2 or older.

3 years agodoveadm: Simplify connection choosing when a server command is finished
Timo Sirainen [Thu, 29 Jul 2021 12:54:20 +0000 (15:54 +0300)] 
doveadm: Simplify connection choosing when a server command is finished

The newly chosen connection is always the one that had just finished the
command.

3 years agodoveadm: server-connection - Don't do connection-specific config lookups
Timo Sirainen [Thu, 29 Jul 2021 11:25:16 +0000 (14:25 +0300)] 
doveadm: server-connection - Don't do connection-specific config lookups

The config is used only for doveadm_username and doveadm_password.
In theory it might be nice to support different passwords for different
remote hosts, practically nobody is doing this and it just complicates
the code and slows things down.

3 years agodoveadm: Fix connecting to doveadm-server via UNIX socket
Timo Sirainen [Fri, 13 Aug 2021 12:07:33 +0000 (15:07 +0300)] 
doveadm: Fix connecting to doveadm-server via UNIX socket

Broken by recent changes.

3 years agodoveadm: Add support for proxy_redirect_reauth
Timo Sirainen [Thu, 17 Jun 2021 11:52:46 +0000 (14:52 +0300)] 
doveadm: Add support for proxy_redirect_reauth

3 years agodoveadm: Split off doveadm_cmd_redirect_finish()
Timo Sirainen [Thu, 17 Jun 2021 11:51:48 +0000 (14:51 +0300)] 
doveadm: Split off doveadm_cmd_redirect_finish()

3 years agodoveadm: Split off doveadm_cmd_pass_reply_parse()
Timo Sirainen [Thu, 17 Jun 2021 11:29:50 +0000 (14:29 +0300)] 
doveadm: Split off doveadm_cmd_pass_reply_parse()

3 years agodoveadm: doveadm_mail_server_user_get_host() - Return the full proxy settings
Timo Sirainen [Thu, 17 Jun 2021 11:21:04 +0000 (14:21 +0300)] 
doveadm: doveadm_mail_server_user_get_host() - Return the full proxy settings

3 years agodoveadm: Split off doveadm_cmd_pass_lookup()
Timo Sirainen [Thu, 17 Jun 2021 09:30:27 +0000 (12:30 +0300)] 
doveadm: Split off doveadm_cmd_pass_lookup()

3 years agodoveadm: doveadm_mail_server_user() - Remove input parameter
Timo Sirainen [Thu, 17 Jun 2021 09:23:42 +0000 (12:23 +0300)] 
doveadm: doveadm_mail_server_user() - Remove input parameter

All the necessary information is in the command context already. Also note
that mail_storage_service_init_settings() doesn't actually need anything but
the service.

3 years agodoveadm: Add support for proxy loop detection
Timo Sirainen [Mon, 14 Jun 2021 17:59:09 +0000 (20:59 +0300)] 
doveadm: Add support for proxy loop detection

3 years agodoveadm: Add DOVEADM_PROTO_MINOR_MIN_* macros
Timo Sirainen [Mon, 14 Jun 2021 17:26:59 +0000 (20:26 +0300)] 
doveadm: Add DOVEADM_PROTO_MINOR_MIN_* macros

3 years agodoveadm: Use auth proxy parsing API
Timo Sirainen [Thu, 17 Jun 2021 10:45:21 +0000 (13:45 +0300)] 
doveadm: Use auth proxy parsing API

3 years agodoveadm-server: Support referrals returned by passdb
Timo Sirainen [Wed, 9 Jun 2021 19:31:56 +0000 (22:31 +0300)] 
doveadm-server: Support referrals returned by passdb

3 years agodoveadm: Add support for proxy destination referrals from initial backend.
Timo Sirainen [Mon, 14 Jun 2021 16:57:12 +0000 (19:57 +0300)] 
doveadm: Add support for proxy destination referrals from initial backend.

This mimics login referral support.

3 years agodoveadm: Delay freeing doveadm_mail_server_cmd()
Timo Sirainen [Mon, 14 Jun 2021 15:17:02 +0000 (18:17 +0300)] 
doveadm: Delay freeing doveadm_mail_server_cmd()

Needed by the next commit.

3 years agodoveadm: Split off doveadm_mail_server_cmd_free()
Timo Sirainen [Mon, 14 Jun 2021 15:15:20 +0000 (18:15 +0300)] 
doveadm: Split off doveadm_mail_server_cmd_free()

3 years agodoveadm: doveadm_server_get() - Remove unnecessary ctx parameter
Timo Sirainen [Mon, 14 Jun 2021 16:49:04 +0000 (19:49 +0300)] 
doveadm: doveadm_server_get() - Remove unnecessary ctx parameter

3 years agodoveadm: Split off server_connection_input_cmd_error()
Timo Sirainen [Mon, 14 Jun 2021 15:05:19 +0000 (18:05 +0300)] 
doveadm: Split off server_connection_input_cmd_error()

3 years agodoveadm: Add struct doveadm_server_reply for server command callback
Timo Sirainen [Mon, 14 Jun 2021 14:42:20 +0000 (17:42 +0300)] 
doveadm: Add struct doveadm_server_reply for server command callback

3 years agodoveadm: Simplify passdb fields parsing
Timo Sirainen [Wed, 9 Jun 2021 19:22:03 +0000 (22:22 +0300)] 
doveadm: Simplify passdb fields parsing

3 years agolmtp: Use auth_proxy_parse_redirect()
Timo Sirainen [Thu, 17 Jun 2021 14:26:26 +0000 (17:26 +0300)] 
lmtp: Use auth_proxy_parse_redirect()

3 years agolib-auth: Add auth_proxy_parse_redirect()
Timo Sirainen [Thu, 17 Jun 2021 14:26:20 +0000 (17:26 +0300)] 
lib-auth: Add auth_proxy_parse_redirect()

3 years agolmtp: Use auth proxy parsing API
Timo Sirainen [Thu, 17 Jun 2021 10:34:02 +0000 (13:34 +0300)] 
lmtp: Use auth proxy parsing API

3 years ago*-login: Use auth proxy parsing API
Timo Sirainen [Thu, 17 Jun 2021 10:17:31 +0000 (13:17 +0300)] 
*-login: Use auth proxy parsing API

3 years agolib-auth: Add API for parsing proxy settings from passdb lookup results
Timo Sirainen [Thu, 17 Jun 2021 10:00:49 +0000 (13:00 +0300)] 
lib-auth: Add API for parsing proxy settings from passdb lookup results

3 years agodoveadm: Rename doveadm_cmd_*_ver2() to doveadm_cmdline_*()
Timo Sirainen [Thu, 10 Jun 2021 11:43:22 +0000 (14:43 +0300)] 
doveadm: Rename doveadm_cmd_*_ver2() to doveadm_cmdline_*()

These are command-line specific functions, and there's no need to clarify
that they're for v2 commands.

3 years agolmtp: Make sure error is returned if passdb returns invalid input
Timo Sirainen [Wed, 9 Jun 2021 18:57:33 +0000 (21:57 +0300)] 
lmtp: Make sure error is returned if passdb returns invalid input

3 years agolib-lua: dlua_table_get() - Pop key from stack if idx doesn't point to a table
Timo Sirainen [Wed, 2 Jun 2021 16:48:48 +0000 (19:48 +0300)] 
lib-lua: dlua_table_get() - Pop key from stack if idx doesn't point to a table

Otherwise it leaks the key into the stack.

3 years agolib-lua: dlua_pcall_yieldable() - On failure keep only the error in stack
Timo Sirainen [Wed, 2 Jun 2021 16:17:39 +0000 (19:17 +0300)] 
lib-lua: dlua_pcall_yieldable() - On failure keep only the error in stack

Otherwise the full call stack would be in the stack.

3 years agolib-dict: Make dict_deinit(&NULL) no-op
Timo Sirainen [Thu, 20 May 2021 21:56:46 +0000 (00:56 +0300)] 
lib-dict: Make dict_deinit(&NULL) no-op

3 years agolib-dict: Add dict_have_async_operations()
Timo Sirainen [Tue, 18 May 2021 17:00:38 +0000 (20:00 +0300)] 
lib-dict: Add dict_have_async_operations()

3 years agologin-common: Don't log auth referral disconnects as having "internal error"
Timo Sirainen [Tue, 11 May 2021 18:10:59 +0000 (21:10 +0300)] 
login-common: Don't log auth referral disconnects as having "internal error"

3 years agolib-lua: dlua-resume - Ensure timeout is handled correctly
Aki Tuomi [Tue, 4 May 2021 10:04:42 +0000 (13:04 +0300)] 
lib-lua: dlua-resume - Ensure timeout is handled correctly

3 years agolmtp: lmtp-proxy - Add support for recipient referrals.
Stephan Bosch [Thu, 28 May 2020 21:15:07 +0000 (23:15 +0200)] 
lmtp: lmtp-proxy - Add support for recipient referrals.

This mimics login referral support.

3 years agolmtp: lmtp-proxy - Use struct lmtp_proxy_recipient for lmtp_proxy_rcpt_parse_fields().
Stephan Bosch [Sun, 7 Jun 2020 23:39:24 +0000 (01:39 +0200)] 
lmtp: lmtp-proxy - Use struct lmtp_proxy_recipient for lmtp_proxy_rcpt_parse_fields().

3 years agolmtp: lmtp-proxy - Split off lmtp_proxy_rcpt_get_connection().
Stephan Bosch [Sun, 7 Jun 2020 23:34:48 +0000 (01:34 +0200)] 
lmtp: lmtp-proxy - Split off lmtp_proxy_rcpt_get_connection().

3 years agolmtp: lmtp-proxy - Add approved recipient hook before initiating connection.
Stephan Bosch [Sun, 7 Jun 2020 23:22:47 +0000 (01:22 +0200)] 
lmtp: lmtp-proxy - Add approved recipient hook before initiating connection.

Before, it was added in the client login callback, which can be called more than
once after later commits.

3 years agolmtp: lmtp-proxy - Split off lmtp_proxy_rcpt_init_auth_user_info().
Stephan Bosch [Sun, 7 Jun 2020 23:12:01 +0000 (01:12 +0200)] 
lmtp: lmtp-proxy - Split off lmtp_proxy_rcpt_init_auth_user_info().

3 years agolmtp: lmtp-proxy - Create proxy recipient struct immediately in lmtp_proxy_rcpt().
Stephan Bosch [Mon, 18 May 2020 21:00:17 +0000 (23:00 +0200)] 
lmtp: lmtp-proxy - Create proxy recipient struct immediately in lmtp_proxy_rcpt().

3 years agolmtp: lmtp-recipient - Put lmtp_local_rcpt() and lmtp_proxy_rcpt() parameters in...
Stephan Bosch [Fri, 28 Dec 2018 22:23:13 +0000 (23:23 +0100)] 
lmtp: lmtp-recipient - Put lmtp_local_rcpt() and lmtp_proxy_rcpt() parameters in struct lmtp_recipient.

3 years agolmtp: lmtp-client - Add forward declaration of struct master_service_connection.
Stephan Bosch [Sun, 7 Jun 2020 21:56:56 +0000 (23:56 +0200)] 
lmtp: lmtp-client - Add forward declaration of struct master_service_connection.

Later changes to includes makes this necessary.

3 years agolmtp: lmtp-proxy - Remove unused finish timout.
Stephan Bosch [Mon, 16 Jul 2018 18:12:35 +0000 (20:12 +0200)] 
lmtp: lmtp-proxy - Remove unused finish timout.

3 years agolib-smtp: smtp-reply - Add smtp_reply_code_equals().
Stephan Bosch [Thu, 28 May 2020 21:13:33 +0000 (23:13 +0200)] 
lib-smtp: smtp-reply - Add smtp_reply_code_equals().

3 years agolib-smtp: Add smtp_client_connection_get_remote_ip().
Stephan Bosch [Thu, 28 May 2020 21:12:28 +0000 (23:12 +0200)] 
lib-smtp: Add smtp_client_connection_get_remote_ip().

3 years agologin-common: Add proxy_redirect_reauth auth extra field support
Timo Sirainen [Thu, 14 May 2020 21:39:31 +0000 (00:39 +0300)] 
login-common: Add proxy_redirect_reauth auth extra field support

Without this a proxy redirect request is immediately trusted and will be
reconnected to. With this enabled, a new EXTERNAL authentication request
is performed, which contains the redirect destination as well as the
current redirection path. The auth server can catch this request and
figure out whether the redirect is allowed or not, or if the proxy
should be reconnecting to a different IP entirely.

3 years agologin-common: Add login_proxy_get_redirect_path()
Timo Sirainen [Thu, 14 May 2020 21:39:10 +0000 (00:39 +0300)] 
login-common: Add login_proxy_get_redirect_path()

3 years agologin-common: Fix event logging when aborting auth requests
Timo Sirainen [Thu, 14 May 2020 21:32:03 +0000 (00:32 +0300)] 
login-common: Fix event logging when aborting auth requests

The reason was NULL, so the event was missing "error" field and also the
error message was logged as "(null)" (or it could have crashed in some
OSes).

3 years agologin-common: Fail if auth returns invalid source_ip
Timo Sirainen [Thu, 14 May 2020 21:29:37 +0000 (00:29 +0300)] 
login-common: Fail if auth returns invalid source_ip

3 years agologin-common: Check validity of auth proxy fields' values earlier
Timo Sirainen [Thu, 14 May 2020 21:25:33 +0000 (00:25 +0300)] 
login-common: Check validity of auth proxy fields' values earlier

3 years agologin-common: If auth lookup returns invalid extra fields, fail authentication
Timo Sirainen [Thu, 14 May 2020 21:18:34 +0000 (00:18 +0300)] 
login-common: If auth lookup returns invalid extra fields, fail authentication

This is a safer behavior.

3 years agologin-common: Split off client_auth_reply_args()
Timo Sirainen [Thu, 14 May 2020 21:15:04 +0000 (00:15 +0300)] 
login-common: Split off client_auth_reply_args()

3 years agologin-common: client_auth_parse_args() - Don't modify client directly
Timo Sirainen [Thu, 14 May 2020 18:12:03 +0000 (21:12 +0300)] 
login-common: client_auth_parse_args() - Don't modify client directly

Return alt_usernames in reply, and modify client in
client_auth_handle_reply().

3 years agologin-common: Split off sasl_server_auth_request_info_fill()
Timo Sirainen [Thu, 14 May 2020 16:21:09 +0000 (19:21 +0300)] 
login-common: Split off sasl_server_auth_request_info_fill()

3 years agologin-common: sasl_server_auth_begin() - Remove service parameter
Timo Sirainen [Thu, 14 May 2020 16:17:22 +0000 (19:17 +0300)] 
login-common: sasl_server_auth_begin() - Remove service parameter

Use login_binary->protocol directly. It's always going to be that.

3 years agoimap-login: proxy - Support parsing REFERRAL on remote auth failure
Timo Sirainen [Wed, 13 May 2020 15:06:04 +0000 (18:06 +0300)] 
imap-login: proxy - Support parsing REFERRAL on remote auth failure

3 years agologin-proxy: Add support for reconnecting to a different IP:port
Timo Sirainen [Wed, 13 May 2020 15:05:38 +0000 (18:05 +0300)] 
login-proxy: Add support for reconnecting to a different IP:port

For now only IP is supported. Hostname lookup would require further code to
do it asynchronously.

3 years agologin-common: Split off proxy_reset()
Timo Sirainen [Thu, 14 May 2020 15:31:23 +0000 (18:31 +0300)] 
login-common: Split off proxy_reset()

It doesn't harm to call client_vfuncs.proxy_reset() also on non-reconnect
case.

3 years agologin-common: Set log prefix in login_proxy_set_destination()
Timo Sirainen [Thu, 14 May 2020 12:49:30 +0000 (15:49 +0300)] 
login-common: Set log prefix in login_proxy_set_destination()

This way the log prefix changes if destination changes.

3 years agologin-proxy: Split off login_proxy_set_destination()
Timo Sirainen [Wed, 13 May 2020 18:55:56 +0000 (21:55 +0300)] 
login-proxy: Split off login_proxy_set_destination()

3 years agoNEWS: Add news for 2.3.17.1 175/head
Aki Tuomi [Tue, 30 Nov 2021 10:47:52 +0000 (12:47 +0200)] 
NEWS: Add news for 2.3.17.1

3 years agoNEWS: Add news for 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: Remove reason_code=mailbox:search
Timo Sirainen [Mon, 10 Jan 2022 17:46:12 +0000 (19:46 +0200)] 
lib-storage: Remove reason_code=mailbox:search

Continues the slow per-mail event removals started in
f3c568e3cbc113920bc029e07e56619589c6a26d.

Reverts 87cd6570a14b3f572fc6000f710df409371a4bcb

3 years agolmtp: lmtp-proxy - Add session ID to backend connection error replies.
Stephan Bosch [Mon, 13 Dec 2021 11:54:19 +0000 (12:54 +0100)] 
lmtp: lmtp-proxy - Add session ID to backend connection error replies.

3 years agosubmssion: submission-backend-relay - Avoid logging two errors about a connection...
Stephan Bosch [Mon, 13 Dec 2021 03:08:32 +0000 (04:08 +0100)] 
submssion: submission-backend-relay - Avoid logging two errors about a connection problem.

Earlier commit changed lib-smtp to consistently log an error for connection
problems, which causes a second error to occur for submission relay backend.
This is undesirable.

3 years agolmtp: lmtp-proxy - Add lmtp_verbose_replies setting.
Stephan Bosch [Tue, 7 Dec 2021 00:51:45 +0000 (01:51 +0100)] 
lmtp: lmtp-proxy - Add lmtp_verbose_replies setting.

It causes the proxy to return errors with full details in replies to the LMTP
client.

3 years agolmtp: lmtp-proxy - Split off lmtp_proxy_handle_connection_error().
Stephan Bosch [Mon, 27 Dec 2021 10:35:05 +0000 (11:35 +0100)] 
lmtp: lmtp-proxy - Split off lmtp_proxy_handle_connection_error().

3 years agolmtp: lmtp-proxy - Change proxy connection failure message make more sense.
Stephan Bosch [Tue, 4 Jan 2022 20:20:22 +0000 (21:20 +0100)] 
lmtp: lmtp-proxy - Change proxy connection failure message make more sense.

3 years agolib-smtp: smtp-client - Add verbose_user_errors setting.
Stephan Bosch [Tue, 7 Dec 2021 00:58:32 +0000 (01:58 +0100)] 
lib-smtp: smtp-client - Add verbose_user_errors setting.

It returns the detailed administrator errors as user error in the reply returned
to the calling application.

3 years agolib-smtp: smtp-client-connection - Log administrator connection failures at a single...
Stephan Bosch [Tue, 7 Dec 2021 00:51:18 +0000 (01:51 +0100)] 
lib-smtp: smtp-client-connection - Log administrator connection failures at a single place.

3 years agolib-smtp: smtp-client-connection - Consistently log an error for connection failures.
Stephan Bosch [Wed, 22 Dec 2021 23:59:45 +0000 (00:59 +0100)] 
lib-smtp: smtp-client-connection - Consistently log an error for connection failures.

3 years agolib-smtp: smtp-client-connection - Add definition for repeatedly used connection...
Stephan Bosch [Tue, 7 Dec 2021 01:44:58 +0000 (02:44 +0100)] 
lib-smtp: smtp-client-connection - Add definition for repeatedly used connection error.

3 years agolmtp: Reformat lmtp-proxy.c.
Stephan Bosch [Mon, 27 Dec 2021 10:24:36 +0000 (11:24 +0100)] 
lmtp: Reformat lmtp-proxy.c.

3 years agolib-smtp: Reformat smtp-client-connection.c.
Stephan Bosch [Tue, 7 Dec 2021 00:23:13 +0000 (01:23 +0100)] 
lib-smtp: Reformat smtp-client-connection.c.

3 years agolib-compression: ostream-zlib - Fix signed vs unsigned comparison.
Stephan Bosch [Wed, 5 Jan 2022 01:27:48 +0000 (01:27 +0000)] 
lib-compression: ostream-zlib - Fix signed vs unsigned comparison.

3 years agolib: test-event-flatten - Fix format string specifier for usec time
Stephan Bosch [Wed, 5 Jan 2022 01:25:34 +0000 (01:25 +0000)] 
lib: test-event-flatten - Fix format string specifier for usec time

3 years agolib-storage: Remove most reason_code=mail:*
Timo Sirainen [Tue, 28 Dec 2021 07:37:42 +0000 (09:37 +0200)] 
lib-storage: Remove most reason_code=mail:*

Event reasons create events internally. This is rather expensive if it's
done for operations that access all emails in a large folder, e.g. SORT.
The per-mail reason_codes also didn't seem to be hugely helpful, so best
to just remove them.

Some of the mail:* reasons were left where they are causing mail stream to
be opened anyway. In these cases the extra CPU used by event reasons is
relatively little.

Reverts ce517f8323fa4a60b230f29712b207139badb3f0

3 years agomaildir: maildir_filename_base_hash() - Disable ubsan integer wrapping checks
Timo Sirainen [Mon, 20 Dec 2021 09:05:39 +0000 (11:05 +0200)] 
maildir: maildir_filename_base_hash() - Disable ubsan integer wrapping checks

3 years agolib-fts: Reuse textcat handle between sessions
Timo Sirainen [Thu, 9 Dec 2021 17:06:11 +0000 (18:06 +0100)] 
lib-fts: Reuse textcat handle between sessions

textcat initialization is rather CPU intensive. Its configuration is
normally always the same between sessions, so we can keep the latest textcat
handle cached.

3 years agolib-storage: Remove index_mail_data.seq
Timo Sirainen [Mon, 29 Nov 2021 16:05:18 +0000 (17:05 +0100)] 
lib-storage: Remove index_mail_data.seq

The seq already exists in struct mail, so this unnecessarily duplicated it.

3 years agolib-storage: Minor optimization - Use mail_index_lookup_full() to avoid two index...
Timo Sirainen [Mon, 29 Nov 2021 15:21:29 +0000 (16:21 +0100)] 
lib-storage: Minor optimization - Use mail_index_lookup_full() to avoid two index lookups

mail_index_is_expunged() was already internally doing the full lookup.

3 years agolib-index: mail_index_lookup_full() - Add expunged_r parameter
Timo Sirainen [Mon, 29 Nov 2021 15:16:30 +0000 (16:16 +0100)] 
lib-index: mail_index_lookup_full() - Add expunged_r parameter

3 years agolib-storage: Optimize setting mail event log prefix
Timo Sirainen [Mon, 29 Nov 2021 12:26:25 +0000 (13:26 +0100)] 
lib-storage: Optimize setting mail event log prefix

This was much more important before mail event creation was delayed. In one
installation the t_strdup_printf() call itself took about 4% of the total CPU
usage. Now that mail events are delayed, this is likely much less of an issue.
Still, this is easy enough of an optimization that might as well do it.

3 years agolib-storage: Delay creating mail event until mail_event() is called
Timo Sirainen [Mon, 29 Nov 2021 14:46:04 +0000 (15:46 +0100)] 
lib-storage: Delay creating mail event until mail_event() is called

Mails can be accessed a lot. The event handling code takes up a lot of CPU,
but most of the time the created event wasn't actually used for anything.

3 years agolib-storage: Make sure mail event is created before accessing streams or metadata
Timo Sirainen [Mon, 29 Nov 2021 14:43:29 +0000 (15:43 +0100)] 
lib-storage: Make sure mail event is created before accessing streams or metadata

This is in preparation for the next commit which delays the mail event
creation. The event duration behaves better if the event is created before
any potentially slow access is done.

3 years agolib-storage: Move struct mail.event to mail_private
Timo Sirainen [Mon, 29 Nov 2021 14:36:58 +0000 (15:36 +0100)] 
lib-storage: Move struct mail.event to mail_private

3 years agolib-lda, lib-storage: Use mail_event()
Timo Sirainen [Mon, 29 Nov 2021 14:32:28 +0000 (15:32 +0100)] 
lib-lda, lib-storage: Use mail_event()

3 years agolib-storage: Add mail_event()
Timo Sirainen [Mon, 29 Nov 2021 14:31:17 +0000 (15:31 +0100)] 
lib-storage: Add mail_event()

3 years agolib-storage: Add and use mail_metadata_access_start()
Timo Sirainen [Mon, 29 Nov 2021 17:39:22 +0000 (18:39 +0100)] 
lib-storage: Add and use mail_metadata_access_start()

3 years agolib-storage: Add and use mail_stream_access_start()
Timo Sirainen [Mon, 29 Nov 2021 17:32:09 +0000 (18:32 +0100)] 
lib-storage: Add and use mail_stream_access_start()

This replaces setting mail_stream_accessed directly.

3 years agolib-storage: raw: get_stream() - Add missing lookup_abort and mail_stream_accessed...
Timo Sirainen [Mon, 29 Nov 2021 17:35:31 +0000 (18:35 +0100)] 
lib-storage: raw: get_stream() - Add missing lookup_abort and mail_stream_accessed handling