]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
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
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.
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.
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
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
Timo Sirainen [Thu, 23 Mar 2023 20:23:39 +0000 (22:23 +0200)]
master: Fix service { idle_kill } to work better on busy servers
The previous behavior was to kill a process once it had idled for idle_kill
seconds. However, on a busy server the new connections are picked up somewhat
randomly by all the idling processes, so there's never any single process
idling for a long time. This effectively prevents the idle_kill from killing
any processes, even if there are unnecessarily many of them.
The new behavior here tracks the lowest number of idling processes during
idle_kill time interval. Then it kills that many processes. If the load
stays the same, this should shrink the number of processes to the number
that is needed to handle the load, but no more.
Timo Sirainen [Thu, 23 Mar 2023 14:07:26 +0000 (16:07 +0200)]
master: Replace per-process idle_kill timeout with per-service
This is much more efficient, since it doesn't have to keep updating the
timeout constantly for busy processes.
This change still preserves the original way the idle_kill setting behaves.
Timo Sirainen [Thu, 23 Mar 2023 14:37:08 +0000 (16:37 +0200)]
master: Add asserts to make sure counters don't wrap
Timo Sirainen [Thu, 23 Mar 2023 14:36:10 +0000 (16:36 +0200)]
master: Add service.process_idling to count number of idling processes
Timo Sirainen [Thu, 23 Mar 2023 13:09:43 +0000 (15:09 +0200)]
master: Split processes list to busy and idling processes
Keep the idling processes sorted by idle_start time. This will be needed
by the next commit.
Timo Sirainen [Thu, 30 Mar 2023 11:23:31 +0000 (14:23 +0300)]
lib: backtrace_append() with libc - Remove dead code
04d6a2e763bce8640a8192298025d0717e425a66 changed the "out of memory" case to
be handled by returning an error instead. This is better than returning
unnamed backtrace pointers, which aren't very useful.
Karl Fleischmann [Wed, 1 Mar 2023 13:44:09 +0000 (14:44 +0100)]
login-imap, imap: Truncate excessively large IMAP ID parameters in log messages
Karl Fleischmann [Mon, 6 Mar 2023 14:59:11 +0000 (15:59 +0100)]
imap-login: Do not log login ID parameter
Special IMAP ID parameters are used when proxying to retain additional
values from the original client, these should not produce any log
entries.
Karl Fleischmann [Mon, 6 Mar 2023 14:56:05 +0000 (15:56 +0100)]
imap-login: Clarify variable naming of login ID param
client_try_update_info() returns a boolean value that represents whether
the given key has a login ID parameter handler, i.e. it is a login ID
parameter. This commit changes the name to represent this more clearly.
Karl Fleischmann [Wed, 1 Mar 2023 13:42:37 +0000 (14:42 +0100)]
config: Deprecate imap_id_log setting
Karl Fleischmann [Wed, 1 Mar 2023 13:41:46 +0000 (14:41 +0100)]
lib-imap: Remove obsolete ID parameter log functions
Karl Fleischmann [Wed, 1 Mar 2023 13:40:24 +0000 (14:40 +0100)]
imap-login: Log Pre-login ID parameters as the imap_id_received event
Drop the manual filtering of the 'imap_id_log' fields in favor of using
a named event and respective log string.
Karl Fleischmann [Wed, 1 Mar 2023 13:38:15 +0000 (14:38 +0100)]
imap: Log Post-login ID parameters as the imap_id_received event
Drop the manual filtering of the 'imap_id_log' fields in favor of using
a named event and respective log string.
Karl Fleischmann [Wed, 1 Mar 2023 13:27:21 +0000 (14:27 +0100)]
lib-imap: Add function to log IMAP ID parameters
Karl Fleischmann [Wed, 22 Mar 2023 07:57:25 +0000 (08:57 +0100)]
imap-login: Prevent memory leak if ID command gets disconnected before finishing
Marco Bettini [Mon, 20 Mar 2023 14:00:48 +0000 (14:00 +0000)]
virtual: virtual_backend_box_lookup() - Enforce callers to check if the call succeeded
Marco Bettini [Fri, 24 Mar 2023 13:50:29 +0000 (13:50 +0000)]
virtual: virtual_sync_apply_existing_expunges() - Don't crash if the backend mailbox has been removed
Timo Sirainen [Sun, 26 Mar 2023 20:48:20 +0000 (23:48 +0300)]
lib: data_stack_grow event - Add backtrace_error field
This field is set if backtrace_get() failed.
Timo Sirainen [Sun, 26 Mar 2023 20:46:54 +0000 (23:46 +0300)]
lib: backtrace_get/append() - Add error_r parameter
Aki Tuomi [Tue, 21 Mar 2023 07:13:35 +0000 (09:13 +0200)]
lib: process-stat - Use eacces_error_get() for EACCES errno
This tells better why the open failed.
Aki Tuomi [Tue, 21 Mar 2023 07:05:12 +0000 (09:05 +0200)]
lib: process-stat - Increase maximum /proc/self/status size
Kernel 6.x has larger status file.
Aki Tuomi [Tue, 21 Mar 2023 06:55:55 +0000 (08:55 +0200)]
lib: process-stat - Use buffer_append_full_istream() to read files
Timo Sirainen [Fri, 24 Mar 2023 01:26:33 +0000 (03:26 +0200)]
global: Enable login_server_settings.update_proctitle
Timo Sirainen [Fri, 24 Mar 2023 01:26:11 +0000 (03:26 +0200)]
lib-login: Add login_server_settings.update_proctitle
Update the current login state in process title when enabled.
Timo Sirainen [Fri, 24 Mar 2023 02:02:28 +0000 (04:02 +0200)]
lib-login: Keep connection in server's linked list until it's fully freed
Otherwise the connection isn't accessible from any global variables.
Timo Sirainen [Fri, 24 Mar 2023 00:29:39 +0000 (02:29 +0200)]
imap: Update process title while unhibernating
Previously the process title stayed as [idling] even though the process was
busy waiting on the imap-hibernate process to finish sending the
unhibernation request.
Timo Sirainen [Fri, 24 Mar 2023 00:00:37 +0000 (02:00 +0200)]
lib-master: Set process title to [initializing] until master_service_init_finish()
Timo Sirainen [Fri, 24 Mar 2023 00:02:58 +0000 (02:02 +0200)]
lib: Add process_title_get_counter()
Timo Sirainen [Thu, 23 Mar 2023 23:53:43 +0000 (01:53 +0200)]
master: Set VERBOSE_PROCTITLE environment to child processes
This is needed for updating process title during initialization before
settings are read.
Sam James [Mon, 27 Mar 2023 01:25:12 +0000 (02:25 +0100)]
lib: md5: Fix strict aliasing violation
Followup to
f0c1cf42ea78d22e2674b03fe65f0ee6545c5b99 . It's exactly the
same code as in md4, so let's rip it out here too.
Aki Tuomi [Fri, 24 Mar 2023 06:53:27 +0000 (08:53 +0200)]
stats: openmetrics - Set field always when used
Satisfied static analysers.
Broken in
ba19a18d54cb7cf7de93d6a235862a408cfe5828
Martin Liska [Fri, 24 Mar 2023 12:33:13 +0000 (13:33 +0100)]
lib: md4 - Fix violation of strict aliasing.
Fix miscompilation when LTO is enabled.
Timo Sirainen [Thu, 23 Mar 2023 23:45:34 +0000 (01:45 +0200)]
imap: Improve disconnection log message if it happens immediately after unhibernation
The "No commands sent after unhibernation" can mean that imap-hibernate
process saw a timeout while unhibernating and shutdown the connection.
Or it can also mean just that the client itself disconnected.
Timo Sirainen [Thu, 23 Mar 2023 23:41:37 +0000 (01:41 +0200)]
imap-hibernate: If unhibernation fails, make sure imap process won't finish it later on
Especially if unhibernation fails due to a connection timeout to imap
process due to high load, it's possible that the imap process will
eventually finish the unhibernation and continue with the client. This is
rather confusing, since imap-hibernate process already logged that the
client got disconnected.
Timo Sirainen [Thu, 23 Mar 2023 23:15:21 +0000 (01:15 +0200)]
imap: Disconnect imap-master client if it's not sending anything for 25 seconds
Stephan Bosch [Fri, 10 Mar 2023 03:12:20 +0000 (04:12 +0100)]
lib-imap-urlauth: imap-urlauth - Make sure a host name is available in imap_urlauth_check_hostport().
Addresses FIXME.
Stephan Bosch [Fri, 10 Mar 2023 02:59:03 +0000 (03:59 +0100)]
lib-imap-urlauth: imap-urlauth - Make struct imap_url parameters const.
Stephan Bosch [Wed, 22 Feb 2023 00:59:42 +0000 (01:59 +0100)]
imap-urlauth: imap-urlauth-worker-client - Use the input_args handler of the connection API.
Stephan Bosch [Tue, 21 Feb 2023 03:08:08 +0000 (04:08 +0100)]
imap-urlauth: imap-urlauth-worker-client - Use generic line input handling from connection API.
Stephan Bosch [Tue, 21 Feb 2023 01:42:50 +0000 (02:42 +0100)]
imap-urlauth: imap-urlauth-worker - Fully perform client-to-server VERSION handshake with connection API.
Stephan Bosch [Tue, 21 Feb 2023 02:27:39 +0000 (03:27 +0100)]
imap-urlauth: imap-urlauth-worker - Perform client-to-server VERSION handshake in separate function.
Stephan Bosch [Tue, 21 Feb 2023 02:13:01 +0000 (03:13 +0100)]
imap-urlauth: imap-urlauth-worker - Enable connection API's server-to-client VERSION handling.
Stephan Bosch [Tue, 21 Feb 2023 00:33:15 +0000 (01:33 +0100)]
imap-urlauth: imap-urlauth-worker - Use connection API's client-to-server VERSION handling.
Requires reordering sending FDs with VERSION line.
Stephan Bosch [Wed, 15 Feb 2023 15:16:26 +0000 (16:16 +0100)]
imap-urlauth: imap-urlauth-worker - Use the connection.h API.
Stephan Bosch [Tue, 14 Feb 2023 18:18:04 +0000 (19:18 +0100)]
imap-urlauth: imap-urlauth-client - Use the connection.h API.
Stephan Bosch [Tue, 14 Feb 2023 01:26:42 +0000 (02:26 +0100)]
imap-urlauth: imap-urlauth-client - Connect worker client last in client_create().
In later commit the worker client will depend on full unitialization of main
client struct.
Stephan Bosch [Wed, 28 Dec 2022 17:46:40 +0000 (18:46 +0100)]
imap-urlauth: imap-urlauth-worker-client - Use the connection.h API.
Stephan Bosch [Wed, 28 Dec 2022 15:01:11 +0000 (16:01 +0100)]
imap-urlauth: imap-urlauth-worker-settings - Use socket name definition for default.
Stephan Bosch [Tue, 14 Feb 2023 18:06:35 +0000 (19:06 +0100)]
imap-urlauth: imap-urlauth-worker-client - Use version definitions to compose handshake.
Stephan Bosch [Tue, 14 Feb 2023 18:22:44 +0000 (19:22 +0100)]
imap-urlauth: imap-urlauth-client - Move protocol version definitions to imap-urlauth-common.h.
Stephan Bosch [Tue, 14 Feb 2023 01:41:38 +0000 (02:41 +0100)]
imap-urlauth: imap-urlauth-worker - Move protocol version definitions to imap-urlauth-worker-common.h.
Stephan Bosch [Fri, 2 Dec 2022 00:19:04 +0000 (01:19 +0100)]
imap-urlauth: imap-urlauth-worker-client - Create sub-event for the worker.
Stephan Bosch [Wed, 3 Aug 2022 01:32:36 +0000 (03:32 +0200)]
imap-urlauth: imap-urlauth-worker-client - Make the worker a separate struct.
Stephan Bosch [Thu, 1 Dec 2022 22:26:48 +0000 (23:26 +0100)]
imap-urlauth: imap-urlauth-worker-client - Rename functions to have the proper prefix.
Stephan Bosch [Fri, 4 Nov 2022 02:12:14 +0000 (03:12 +0100)]
imap-urlauth: imap-urlauth-worker-client - Rename most client variables to wclient.
Stephan Bosch [Fri, 4 Nov 2022 02:01:18 +0000 (03:01 +0100)]
imap-urlauth: Make imap-urlauth-worker-client compile as a separate module.
Stephan Bosch [Thu, 1 Dec 2022 22:11:55 +0000 (23:11 +0100)]
imap-urlauth: Move worker client to separate source file.
Stephan Bosch [Fri, 4 Nov 2022 02:30:25 +0000 (03:30 +0100)]
imap-urlauth: imap-urlauth-client - Rename to_idle to to_destroy.
Makes more sense.
Stephan Bosch [Wed, 22 Feb 2023 02:26:27 +0000 (03:26 +0100)]
imap-urlauth: imap-urlauth-login - Send server-to-client VERSION line.
Stephan Bosch [Sun, 31 Jul 2022 22:08:40 +0000 (00:08 +0200)]
lib-imap-urlauth: imap-urlauth-connection - Use the connection.h API.
Stephan Bosch [Wed, 22 Feb 2023 03:16:06 +0000 (04:16 +0100)]
lib-imap-urlauth: imap-urlauth-connection - Move sending of authentication command to separate function.
Stephan Bosch [Thu, 23 Feb 2023 00:31:31 +0000 (01:31 +0100)]
lib: ostream-file - Improve write errors: mention the failing syscall.
Stephan Bosch [Thu, 1 Dec 2022 21:59:01 +0000 (22:59 +0100)]
imap-urlauth: Reformat imap-urlauth-client.h.
Stephan Bosch [Thu, 1 Dec 2022 21:57:19 +0000 (22:57 +0100)]
imap-urlauth: Reformat imap-urlauth-client.c.
Stephan Bosch [Sun, 31 Jul 2022 22:00:24 +0000 (00:00 +0200)]
lib-imap-urlauth: Reformat imap-urlauth-connection.c.
Stephan Bosch [Sun, 31 Jul 2022 21:53:13 +0000 (23:53 +0200)]
lib-imap-urlauth: Reformat imap-urlauth.h.
Stephan Bosch [Sun, 31 Jul 2022 21:52:31 +0000 (23:52 +0200)]
lib-imap-urlauth: Reformat imap-urlauth.c.
Stephan Bosch [Mon, 21 Mar 2022 11:22:38 +0000 (12:22 +0100)]
lib-http: http-server-connection - Fix segfault occurring when output is resumed on closed connection.
Markus Valentin [Thu, 9 Mar 2023 09:58:42 +0000 (10:58 +0100)]
login-common: client_get_extra_disconnect_reason() - Add shutting_down and process_full reasons
Markus Valentin [Thu, 9 Mar 2023 09:57:14 +0000 (10:57 +0100)]
login-common: Add shutting_down and resource_constraint fields to client struct
Markus Valentin [Thu, 16 Feb 2023 15:33:17 +0000 (16:33 +0100)]
login-common: Remove no_extra_disconnect_reason
This got obsolete by previous changes and prevented properly set reason
for the login_aborted event on some internal failures.
Markus Valentin [Thu, 2 Feb 2023 09:46:48 +0000 (10:46 +0100)]
login-common: client_disconnect() - Handle NULL reason separately
Markus Valentin [Tue, 24 Jan 2023 08:49:46 +0000 (09:49 +0100)]
login-common: login_aborted_event() - Add more event fields
Markus Valentin [Tue, 24 Jan 2023 08:48:46 +0000 (09:48 +0100)]
login-common: Change struct client's auth_first_started and auth_finished to timeval
Markus Valentin [Tue, 24 Jan 2023 07:34:01 +0000 (08:34 +0100)]
login-common: client_disconnect() - Split off login_aborted_event()
Adds the login_aborted event.
Markus Valentin [Tue, 24 Jan 2023 11:20:56 +0000 (12:20 +0100)]
login-common: client_disconnect() - Split off client_disconnected_log()
Markus Valentin [Thu, 9 Mar 2023 09:58:13 +0000 (10:58 +0100)]
login-common: client_get_extra_disconnect_reason() - Remove auth_waiting_server and auth_waiting_server_finish
These reasons are not supposed to happen only if a process gets actively
killed. For the shutting_down reason will be added.
Markus Valentin [Tue, 7 Mar 2023 14:10:32 +0000 (15:10 +0100)]
login-common: client_get_extra_disconnect_reason() - Increase auth_aborted_by_client reason priority
Timo Sirainen [Thu, 22 Dec 2022 12:49:12 +0000 (14:49 +0200)]
login-common: Disconnect reason - Add event reasons
Timo Sirainen [Thu, 22 Dec 2022 12:30:30 +0000 (07:30 -0500)]
login-common: Disconnect reason - clarify client sending untrusted cert
Changed the wording from "invalid cert" to "untrusted cert", which is
is a bit clearer in what the rejection reason usually is.
Timo Sirainen [Thu, 22 Dec 2022 12:18:03 +0000 (14:18 +0200)]
login-common: Disconnect reason - Return auth counts and secs for most replies
Earlier some reasons weren't returned when there were more than one attempt,
because it would hide if there were a lot of auth attempts. Now that the
auth attempt count is always returned, these less important reasons can also
be returned.
Timo Sirainen [Thu, 22 Dec 2022 12:12:34 +0000 (14:12 +0200)]
login-common: Use a reason string array for client_auth_fail_code
Timo Sirainen [Thu, 22 Dec 2022 12:09:28 +0000 (14:09 +0200)]
login-common: Disconnect reason - Add missing CLIENT_AUTH_FAIL_CODE_ANONYMOUS_DENIED
Timo Sirainen [Thu, 22 Dec 2022 12:04:11 +0000 (14:04 +0200)]
login-common: Add comments
Timo Sirainen [Thu, 22 Dec 2022 11:55:05 +0000 (13:55 +0200)]
login-common: Disconnect reason - Move auth_process_comm_fail check earlier
Likely doesn't matter, but this is more important reason to be logged than
the ones coming later.
Timo Sirainen [Thu, 22 Dec 2022 11:42:02 +0000 (13:42 +0200)]
login-common: Disconnect reason - Clarify "auth aborted by client" handling
Rename client.auth_try_aborted to auth_aborted_by_client and clarify the
disconnect reason message.
Timo Sirainen [Thu, 22 Dec 2022 10:12:11 +0000 (12:12 +0200)]
login-common: Disconnect reason - Check for missing SSL certs before auth attempts
Timo Sirainen [Thu, 22 Dec 2022 10:07:14 +0000 (12:07 +0200)]
login-common: client_get_extra_disconnect_reason() - Remove parenthesis from returned string
The caller now adds the parenthesis in one place.
Timo Sirainen [Thu, 22 Dec 2022 10:16:12 +0000 (12:16 +0200)]
login-common: Rename client.auth_waiting to auth_client_continue_pending
Timo Sirainen [Thu, 22 Dec 2022 11:43:55 +0000 (13:43 +0200)]
login-common: Reset auth_try_aborted if a new auth is started
This only affects the disconnection log message. It is likely better to
forget about this state when a new auth attempt begins, since if the new
auth fails also it is likely something completely different.
Aki Tuomi [Thu, 26 Jan 2023 06:15:29 +0000 (08:15 +0200)]
stats: openmetrics - Create metrics for all specified fields