]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Thu, 18 Mar 2021 10:17:07 +0000 (11:17 +0100)]
lib: test-cpu-limit - Test upper CPU limit only for user CPU, not for system CPU
The system CPU check kept randomly failing with larger and larger limits, so
there doesn't seem to be any point trying to test it at all.
Timo Sirainen [Fri, 12 Mar 2021 00:26:32 +0000 (02:26 +0200)]
lib-index: Fix crash when cache record size is larger than file size
This shouldn't happen unless the dovecot.index.cache file was corrupted.
Timo Sirainen [Sat, 8 Aug 2020 09:11:54 +0000 (12:11 +0300)]
lib-index: mail_cache_map() - Fix handling huge size values correctly
offset+size could have wrapped in 32bit systems.
Timo Sirainen [Mon, 15 Mar 2021 10:53:19 +0000 (12:53 +0200)]
auth: test-auth-cache - Fix auth_request_var_expand_static_tab[]
Its size is explicitly set in .h file, so it should be in .c file as well.
Siavash Tavakoli [Mon, 15 Mar 2021 12:02:32 +0000 (12:02 +0000)]
auth: userdb-passwd: Close the password database in iteration deinit
Otherwise, next "getpwent()" will continue to return next entries in
passwd database which results in unwanted skipping of entries.
Timo Sirainen [Tue, 9 Mar 2021 19:35:15 +0000 (21:35 +0200)]
doveconf: Don't print an error if $rundir/dovecot.conf symlink doesn't exist
Timo Sirainen [Wed, 15 Apr 2020 14:57:43 +0000 (17:57 +0300)]
lib-storage: Set mail_index_* and mail_cache_* settings hidden
It's not recommended to change these settings outside testing.
Timo Sirainen [Tue, 9 Mar 2021 17:10:01 +0000 (19:10 +0200)]
doveconf: Add -s parameter to show also hidden settings
Timo Sirainen [Wed, 15 Apr 2020 14:50:42 +0000 (17:50 +0300)]
doveconf: Don't show hidden settings unless they've been explicitly set
Timo Sirainen [Wed, 15 Apr 2020 14:44:56 +0000 (17:44 +0300)]
lib-settings: Add SET_FLAG_HIDDEN setting flag
Timo Sirainen [Wed, 15 Apr 2020 14:35:14 +0000 (17:35 +0300)]
global: Initialize struct setting_define fields with explicit names
This allows changing the struct contents without breaking compiling.
Timo Sirainen [Wed, 15 Apr 2020 14:21:03 +0000 (17:21 +0300)]
global: Use SETTING_DEFINE_STRUCT_*() macros when defining settings
This adds type checking to them.
Timo Sirainen [Wed, 15 Apr 2020 14:20:20 +0000 (17:20 +0300)]
quota-status: Fix quota_status_settings.recipient_delimiter to be const
Timo Sirainen [Wed, 15 Apr 2020 14:18:42 +0000 (17:18 +0300)]
mail-crypt, master: Remove unused DEF & DEFLIST macros
Timo Sirainen [Wed, 15 Apr 2020 13:53:26 +0000 (16:53 +0300)]
lib-settings: Rewrite and add missing SETTING_DEFINE_STRUCT_* macros
These hadn't been used anywhere.
Timo Sirainen [Sat, 13 Mar 2021 12:23:46 +0000 (14:23 +0200)]
lib-smtp: fuzz-smtp-server - Fix compiling due to lib-smtp API change
Forgotten from
2cdab962670df394c28fb7858cb0d4f90f70f71c
Timo Sirainen [Tue, 16 Mar 2021 15:09:11 +0000 (17:09 +0200)]
submission: Remove dead assignment
Timo Sirainen [Wed, 15 Jan 2020 18:22:00 +0000 (20:22 +0200)]
login-common: Fix client_destroy_oldest() return value to be more exact
Only return TRUE if a client connection is immediately destroyed.
Timo Sirainen [Wed, 15 Jan 2020 16:09:14 +0000 (18:09 +0200)]
lib-master: Add a delay to calling avail_overflow_callback with client_limit=1
Without the delay all (or many/most) processes will call the callback,
because the OS notifies all of the processes of the incoming connection.
This results in all of the connections being killed instead of only a few
of them.
Timo Sirainen [Wed, 15 Jan 2020 17:10:43 +0000 (19:10 +0200)]
lib-master: Change master_service_set_avail_overflow_callback() API
Needed by the following changes.
Timo Sirainen [Wed, 15 Jan 2020 17:06:32 +0000 (19:06 +0200)]
login-common: Change struct client.created to timeval
Timo Sirainen [Wed, 15 Jan 2020 15:49:52 +0000 (17:49 +0200)]
lib-master: Code cleanup to refreshing login state
Unexpected seek offsets are now handled better.
Timo Sirainen [Wed, 15 Jan 2020 14:30:34 +0000 (16:30 +0200)]
lib-master: Fix calling avail_overflow_callback with service_count=1
This is used by login processes to kill the oldest connection when all of
the clients and processes for the service are taken. This wasn't working
when service_count=1 because the listeners were closed already.
It's not really useful anymore to even do this kind of a listener closing.
It was originally added in
9217d2426b4f8ece47441357f35d8bb34d97c4eb to
prevent restart problems with long-running login processes. However,
nowadays listeners can be closed via SIGQUIT so this isn't necessary.
Siavash Tavakoli [Fri, 26 Feb 2021 12:28:03 +0000 (12:28 +0000)]
lib-storage: Correct escaping for list index lookups
- Escape storage name when listing mailbox from index and unescape mailbox name
when looking for sibling nodes.
- Unescape when adding node to list index.
- List index iteration is performed with storage name where separators must be
escaped with storage_name_escape_char. Index lookup is done with storage_name
which is escaped with storage_name_escape_char but node names are unescaped.
Siavash Tavakoli [Mon, 22 Feb 2021 15:37:19 +0000 (15:37 +0000)]
lib-storage: Expose mailbox_list_name_{escape,unescape} functions in header
To be used in mailbox-list-index.
Siavash Tavakoli [Thu, 11 Mar 2021 17:55:08 +0000 (17:55 +0000)]
lib-storage: test-mail-storage: Separate test cases for "LAYOUT=INDEX"
With default escaping for "INDEX" layout, more mailbox name are accepted.
Siavash Tavakoli [Mon, 22 Feb 2021 15:29:30 +0000 (15:29 +0000)]
lib-storage: mailbox-list: Add default storage name escaping for index layout
Add a default value for "storage_name_escape_char" when "LAYOUT=index".
Needed for situations where mailbox name contains separator char (e.g.
after migration to new separator) and listescape plugin is not active.
Siavash Tavakoli [Fri, 26 Feb 2021 16:03:50 +0000 (16:03 +0000)]
lib-storage: Rename mailbox_list_index_node.name to raw_name
To make it clear that the string is unescaped raw value, rename from
generic "name" to "raw_name".
Siavash Tavakoli [Thu, 11 Mar 2021 12:31:52 +0000 (12:31 +0000)]
lib-storage: Add mailbox list index alt separator
To avoid collision with storage name escape character, use an
alternative char ('^') if hierarchy separator for list index is the same char.
Timo Sirainen [Tue, 16 Mar 2021 12:37:54 +0000 (14:37 +0200)]
login-common: Finish freeing the client when anvil lookup is pending at destroy
Broken by
f32daf5ac9eaa886e28659965fc0156b52b60bda
Timo Sirainen [Tue, 16 Mar 2021 12:37:38 +0000 (14:37 +0200)]
login-common: Assert-crash at deinit if there are still referenced clients
Timo Sirainen [Tue, 16 Mar 2021 12:36:35 +0000 (14:36 +0200)]
login-common: Track referenced but destroyed clients in a linked list
This helps debugging.
Timo Sirainen [Thu, 11 Mar 2021 11:00:56 +0000 (13:00 +0200)]
lib: test-cpu-limit - Increase ALLOW_MSECS_ABOVE further
1500 was still not enough to prevent random failures.
Timo Sirainen [Mon, 15 Mar 2021 16:18:07 +0000 (18:18 +0200)]
lib: cpu-limit - Redesign the API
The new API no longer has a signal callback, just a cpu_limit_exceeded()
function that needs to be periodically called to check if the limit has
exceeded. The callback could be added back if really necessary, but it's
just too easy to use signal handlers unsafely.
The new API also supports separating limits for user and system CPU usage.
It also attempts to guard against any unexpected kernel behavior resulting
from unclear behavior on how exactly the getrlimit(), setrlimit() and XCPU
signals interact.
Timo Sirainen [Mon, 15 Mar 2021 15:22:00 +0000 (17:22 +0200)]
lib: cpu-limit - Split off cpu_limit_get_usage_msecs_with()
Timo Sirainen [Mon, 15 Mar 2021 15:21:03 +0000 (17:21 +0200)]
lib: cpu-limit - Move cpu_limit_get_usage_msecs()
Timo Sirainen [Mon, 15 Mar 2021 14:50:25 +0000 (16:50 +0200)]
lib: cpu-limit - Update comments related to nesting
Timo Sirainen [Mon, 15 Mar 2021 13:42:56 +0000 (15:42 +0200)]
lib: cpu_limit_get_usage_[m]secs() - Add type parameter
It can now return user CPU, system CPU or both usages.
Timo Sirainen [Mon, 15 Mar 2021 13:37:55 +0000 (15:37 +0200)]
lib: cpu-time - Use the original struct rusage as the initial_usage
This will allow separation of user and system CPU usage tracking.
They could have been tracked with two separate struct timevals, but
the extra memory usage is small and it might be nice to have all the
available data for debugging.
Timo Sirainen [Mon, 15 Mar 2021 16:00:55 +0000 (18:00 +0200)]
lib: test-cpu-limit - Fix nested limit asserts
Timo Sirainen [Wed, 10 Mar 2021 15:56:12 +0000 (17:56 +0200)]
lib-imap: Handle empty lists in IMAP BODYSTRUCTURE parsing as invalid
They should be NIL instead of () if they're empty.
Timo Sirainen [Wed, 10 Mar 2021 15:40:47 +0000 (17:40 +0200)]
lib-imap: Fix assert-crash if parsing invalid BODYSTRUCTURE with empty Content-Language list
If there's no Content-Language, it should be NIL in the bodystructure.
So if the value is (), it is invalid.
This could in theory have happened when parsing corrupted
dovecot.index.cache or receiving it from a broken remote IMAP server with
imapc. The bug was found by fuzzing though.
Fixes:
Panic: file imap-bodystructure.c: line 98 (part_write_bodystructure_common): assertion failed: (*lang != NULL)
Timo Sirainen [Wed, 10 Mar 2021 15:39:48 +0000 (17:39 +0200)]
lib-imap: test-imap-bodystructure - imap_bodystructure_parse() - Test returned error
Josef 'Jeff' Sipek [Thu, 11 Mar 2021 18:13:24 +0000 (13:13 -0500)]
lib-lua: Error out the build if using Lua 5.2
Josef 'Jeff' Sipek [Thu, 11 Mar 2021 18:13:03 +0000 (13:13 -0500)]
Global: Remove support for Lua 5.2
It took far too much effort to keep compatible with it. Since every distro
out there provides either Lua 5.1 or 5.3, it makes sense to give up on 5.2.
Josef 'Jeff' Sipek [Tue, 9 Mar 2021 15:53:50 +0000 (10:53 -0500)]
m4: Allow explict override of lua version
It is possible that the system has several different versions of Lua
installed. This change allows one to force a specific version of Lua during
./configure. For example:
LUA_CFLAGS="`pkg-config lua51 --cflags`" \
LUA_LIBS="`pkg-config lua51 --libs`" \
./configure \
--with-lua
Timo Sirainen [Tue, 9 Mar 2021 16:40:32 +0000 (18:40 +0200)]
lib-storage: Preserve last-rename-stamp when rebuilding index
Timo Sirainen [Tue, 9 Mar 2021 16:42:38 +0000 (18:42 +0200)]
lib-storage: Don't trust last-rename-stamp that is too far into the future
If the timestamp is in the future, autoexpunging stops working until the
future time is passed. If this happened due to corruption, it could take
a long time before the timestamp is reached.
Timo Sirainen [Tue, 9 Mar 2021 16:37:51 +0000 (18:37 +0200)]
lib-storage: Preserve hdr-pop3-uidl when rebuilding index
This prevents potentially expensive metadata lookups afterwards when trying
to find out which mails have the POP3 UIDLs in their metadata.
Timo Sirainen [Tue, 9 Mar 2021 16:36:35 +0000 (18:36 +0200)]
lib-storage: Convert index_rebuild_box_name_header() into generic index_rebuild_box_preserve_header()
Timo Sirainen [Mon, 11 May 2020 14:41:24 +0000 (17:41 +0300)]
doveadm dump: Support hdr-pop3-uidl index header extension
Timo Sirainen [Mon, 11 May 2020 14:40:29 +0000 (17:40 +0300)]
doveadm dump: Include mail-storage-private.h to get easier access to some structs
Avoids having to duplicate the structs.
Timo Sirainen [Wed, 10 Mar 2021 20:08:24 +0000 (22:08 +0200)]
auth: userdb_parse_[ug]id() - Fix error logging to use events properly
If request is missing, use the global auth_event instead of hiding the
error.
Timo Sirainen [Thu, 31 Oct 2019 14:39:26 +0000 (16:39 +0200)]
auth: Use auth_request.event for logging whenever possible
Timo Sirainen [Thu, 31 Oct 2019 14:31:55 +0000 (16:31 +0200)]
auth: auth-client-connection: Log all errors via events
Timo Sirainen [Thu, 31 Oct 2019 14:29:22 +0000 (16:29 +0200)]
auth: auth-worker-server: Log errors via events
Timo Sirainen [Thu, 31 Oct 2019 14:21:15 +0000 (16:21 +0200)]
auth: auth-request-handler: Log errors via events
Timo Sirainen [Thu, 31 Oct 2019 14:18:15 +0000 (16:18 +0200)]
auth: authdb_event() - Use const pointer
Timo Sirainen [Thu, 31 Oct 2019 14:14:09 +0000 (16:14 +0200)]
auth: Replace auth_master_log_error() with e_error()
Timo Sirainen [Thu, 31 Oct 2019 14:21:35 +0000 (16:21 +0200)]
auth: auth-worker-client: Log errors via events
Timo Sirainen [Thu, 31 Oct 2019 13:36:02 +0000 (15:36 +0200)]
auth: auth-worker-client: Fix setting process title to [idling]
The existing code was completely wrong. It was set only when LIST command
started running. For other commands it wasn't set at all.
Timo Sirainen [Thu, 31 Oct 2019 13:34:06 +0000 (15:34 +0200)]
auth: auth-worker-client: Move common code to auth_worker_request_finished()
Timo Sirainen [Thu, 31 Oct 2019 13:31:57 +0000 (15:31 +0200)]
auth: auth-worker-client: Move auth_worker_request_finished*()
Timo Sirainen [Thu, 31 Oct 2019 13:27:49 +0000 (15:27 +0200)]
auth: auth-worker-client: Set "error" for all auth worker request failures
Previously the error was set only for protocol errors. Now it's set for
everything, including password mismatches. However, only the protocol
errors are logged with error level, others are debug level.
Timo Sirainen [Thu, 31 Oct 2019 13:23:01 +0000 (15:23 +0200)]
auth: auth-worker-client: Rename auth_worker_log_finished() to auth_worker_request_finished()
Timo Sirainen [Thu, 31 Oct 2019 12:48:11 +0000 (14:48 +0200)]
auth: userdb iteration - Use event based logging
Timo Sirainen [Thu, 31 Oct 2019 12:41:56 +0000 (14:41 +0200)]
auth: db-passwd-file - Use event based logging
Timo Sirainen [Thu, 31 Oct 2019 12:34:48 +0000 (14:34 +0200)]
auth: db-ldap - Use event based logging
Timo Sirainen [Thu, 25 Feb 2021 19:58:17 +0000 (21:58 +0200)]
login-common: Fix assert-crash if client is destroyed during anvil lookup
This could happen if the client gets disconnected due to
"Connection queue full".
Fixes:
Panic: file client-common.c: line 323 (client_destroy): assertion failed: (!client->authenticating)
Timo Sirainen [Wed, 10 Mar 2021 11:50:00 +0000 (13:50 +0200)]
lib: event_logv() - Make sure errno is preserved
It already should have been, but this change makes it clearer and more
future-safe.
Timo Sirainen [Tue, 2 Mar 2021 17:30:23 +0000 (19:30 +0200)]
imap: Use internal error for logging FETCH failed disconnection message
Timo Sirainen [Tue, 2 Mar 2021 16:58:54 +0000 (18:58 +0200)]
submission-login: Fix logging "no auth attempts" at disconnection
client.banner_sent wasn't set, which prevented this from being logged.
Timo Sirainen [Tue, 2 Mar 2021 15:51:54 +0000 (17:51 +0200)]
lib-smtp: smtp_server_connection_ssl_init() - Don't start SSL handshake
If SSL handshaking fails, it shouldn't be logged as an error similarly to
actual SSL initialization errors.
Timo Sirainen [Tue, 2 Mar 2021 15:44:37 +0000 (17:44 +0200)]
lib-smtp: Remove smtp_server_connection.disconnect_reason
This isn't used anywhere and its purpose is a bit unclear.
Timo Sirainen [Tue, 2 Mar 2021 15:33:30 +0000 (17:33 +0200)]
imap-urlauth: Change event_category_urlauth to be static
Timo Sirainen [Tue, 2 Mar 2021 15:30:52 +0000 (17:30 +0200)]
imap-urlauth: Replace i_info() and i_error() calls with e_info() and e_error()
Timo Sirainen [Tue, 2 Mar 2021 15:26:50 +0000 (17:26 +0200)]
imap-urlauth: Don't change log prefix just before disconnection line
It shouldn't be necessary. (And if it was, it should be done in init.)
Timo Sirainen [Tue, 2 Mar 2021 15:25:31 +0000 (17:25 +0200)]
imap-urlauth: client_destroy() - Allow NULL reason only if client is disconnected
Timo Sirainen [Tue, 2 Mar 2021 15:24:14 +0000 (17:24 +0200)]
imap-urlauth: Remove duplicate "Disconnected: " prefix
It's already logged by client_destroy()
Timo Sirainen [Tue, 2 Mar 2021 15:19:13 +0000 (17:19 +0200)]
imap-urlauth: Add Username to log prefix
Timo Sirainen [Tue, 2 Mar 2021 15:15:45 +0000 (17:15 +0200)]
imap-urlauth: Fix event leak if worker can't be connected to
Timo Sirainen [Tue, 2 Mar 2021 13:15:09 +0000 (15:15 +0200)]
lib-smtp: Standardize iostream error handling
Use [io]_stream_get_disconnect_reason() for logging all errors.
None of the iostream errors are logged as error level anymore. This way
for example TLS connection problems caused by broken clients aren't
logged as errors.
Timo Sirainen [Tue, 2 Mar 2021 13:07:56 +0000 (15:07 +0200)]
lib: Add o_stream_get_disconnect_reason()
Timo Sirainen [Tue, 2 Mar 2021 13:06:50 +0000 (15:06 +0200)]
lib: Clarify i[o]_stream_get_disconnect_reason() comment
Timo Sirainen [Tue, 2 Mar 2021 12:51:48 +0000 (14:51 +0200)]
lib-smtp: Remove EIO-specific error handling
No such error should be seen by lib-smtp.
Timo Sirainen [Tue, 2 Mar 2021 11:15:56 +0000 (13:15 +0200)]
submission: Standardize "Disconnected:" log line
Remote IP is no longer logged. If it's wanted, it can be added to
mail_log_prefix just like with other protocols.
Timo Sirainen [Tue, 2 Mar 2021 11:13:52 +0000 (13:13 +0200)]
lib-smtp: Standardize QUIT logging
Similar to POP3, use "Logged out" or "Aborted login by logging out".
Timo Sirainen [Mon, 1 Mar 2021 14:47:54 +0000 (16:47 +0200)]
pop3: Improve "inactivity" disconnection reason log messages
Timo Sirainen [Mon, 1 Mar 2021 14:46:16 +0000 (16:46 +0200)]
pop3: Add "Disconnected: " prefix to all disconnection log lines
Timo Sirainen [Wed, 3 Feb 2021 20:15:51 +0000 (22:15 +0200)]
login-common: Add and use client_destroy_iostream_error()
This standardizes the disconnection log message.
Timo Sirainen [Wed, 3 Feb 2021 19:59:55 +0000 (21:59 +0200)]
*-login: Replace "Aborted login" with "Disconnected: Aborted login by logging out"
Timo Sirainen [Wed, 3 Feb 2021 19:58:15 +0000 (21:58 +0200)]
*-login: Add "Disconnected: " prefix to most disconnection log lines
All except "Disconnected by proxy" disconnections.
Timo Sirainen [Wed, 3 Feb 2021 19:18:41 +0000 (21:18 +0200)]
imap-hibernate: Add "Disconnected: " prefix to all disconnection log lines
Timo Sirainen [Mon, 1 Mar 2021 14:40:57 +0000 (16:40 +0200)]
imap: Improve "inactivity" disconnection reason log messages
Timo Sirainen [Wed, 3 Feb 2021 19:13:13 +0000 (21:13 +0200)]
imap: Improve client disconnection log line in APPEND
Timo Sirainen [Wed, 3 Feb 2021 15:47:13 +0000 (17:47 +0200)]
imap: Add "Disconnected: " prefix to all disconnection log lines
It's currently not very clear that all these different log lines are about
the disconnection event.
Timo Sirainen [Tue, 2 Mar 2021 14:40:48 +0000 (16:40 +0200)]
lmtp: Simplify client_destroy() handling
This is similar to the earlier submission commit.
Timo Sirainen [Tue, 2 Mar 2021 14:37:30 +0000 (16:37 +0200)]
lmtp: Simplify/clarify disconnection code flow
This is similar to the earlier submission commit.
Timo Sirainen [Tue, 2 Mar 2021 14:09:38 +0000 (16:09 +0200)]
submission: Remove client.stats
client.conn is no longer ever NULL, so this isn't needed.
Timo Sirainen [Tue, 2 Mar 2021 14:00:24 +0000 (16:00 +0200)]
submission: Simplify client_destroy() handling
Now it simply calls smtp_server_connection_terminate() and the
conn_free() callback does the actual destroying.