]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
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
Aki Tuomi [Mon, 13 Mar 2023 12:07:00 +0000 (14:07 +0200)]
lib: fd-util - Try to read link from procfs to see which file leaked
Makes it easier to determine why the leak occured.
Marco Bettini [Mon, 20 Mar 2023 08:43:05 +0000 (08:43 +0000)]
lib-storage: Check return status from mailbox_create() in tests
This addresses Coverity complaints.
Timo Sirainen [Wed, 15 Mar 2023 10:14:54 +0000 (12:14 +0200)]
master: Don't pass config file in two fds to child processes
Broken by
1955e81a2ffe023f937d87f2b555bcec0fb4aee9
Timo Sirainen [Fri, 10 Mar 2023 23:36:25 +0000 (01:36 +0200)]
lib-storage: Update "user" field in mail_storage_service_user.event after userdb lookup
The userdb lookup may change the username.
Aki Tuomi [Tue, 31 Jan 2023 11:43:50 +0000 (13:43 +0200)]
stats: Add support for discrete modifiers
Aki Tuomi [Tue, 31 Jan 2023 11:51:36 +0000 (13:51 +0200)]
stats: Populate group_by field earlier in settings check
This is needed in next commit to avoid crash.
Aki Tuomi [Wed, 1 Feb 2023 08:26:29 +0000 (10:26 +0200)]
pop3: Add pop3_command_finished event
Aki Tuomi [Tue, 31 Jan 2023 09:03:50 +0000 (11:03 +0200)]
pop3: Add pop3 command context
Aki Tuomi [Wed, 25 Jan 2023 09:12:32 +0000 (11:12 +0200)]
lmtp: Add smtp server statistics to user event
Aki Tuomi [Tue, 24 Jan 2023 11:40:36 +0000 (13:40 +0200)]
lib-smtp: Include net_in_bytes, net_out_bytes in event
Ensure they end up in connection finished event
Aki Tuomi [Tue, 24 Jan 2023 11:31:34 +0000 (13:31 +0200)]
lib-smtp: Move struct smtp_server_stats
This is needed for next commit
Aki Tuomi [Tue, 24 Jan 2023 11:26:12 +0000 (13:26 +0200)]
lmtp: Remove useless cast
Aki Tuomi [Tue, 24 Jan 2023 10:50:18 +0000 (12:50 +0200)]
submission: Include net_in_bytes, net_out_bytes in event
These fields are mainly intended for the mail_user_session_finished event.
Aki Tuomi [Tue, 24 Jan 2023 10:48:03 +0000 (12:48 +0200)]
pop3: Include net_in_bytes, net_out_bytes in event
These fields are mainly intended for the mail_user_session_finished event.
Aki Tuomi [Tue, 24 Jan 2023 10:42:39 +0000 (12:42 +0200)]
imap: Include net_in_bytes, net_out_bytes in event
These fields are mainly intended for the mail_user_session_finished event.
Aki Tuomi [Wed, 25 Jan 2023 09:14:12 +0000 (11:14 +0200)]
pop3: Use i_stream_get_absolute_offset() in stats
Consistent with other protocols
Aki Tuomi [Tue, 24 Jan 2023 11:23:21 +0000 (13:23 +0200)]
imap: Rename bytes_in,_out to net_in_,out_bytes in cmd stats
Aki Tuomi [Wed, 25 Jan 2023 19:20:52 +0000 (21:20 +0200)]
login-common: Rename bytes_in,_out to net_in_,out_bytes
Aki Tuomi [Wed, 25 Jan 2023 19:20:24 +0000 (21:20 +0200)]
lib-http: Rename bytes_in,_out to net_in_,out_bytes
Aki Tuomi [Wed, 25 Jan 2023 19:18:14 +0000 (21:18 +0200)]
lib: connection - Rename bytes_in,_out to net_in_,out_bytes
Aki Tuomi [Thu, 9 Feb 2023 07:47:52 +0000 (09:47 +0200)]
lib: connection - Expose connection_update_counters()
Marco Bettini [Tue, 28 Feb 2023 12:05:44 +0000 (12:05 +0000)]
dbox: dbox_cleanup_temp_files() - Fuzz scan interval adding 0..+30% based on username hash
Marco Bettini [Tue, 28 Feb 2023 11:45:43 +0000 (11:45 +0000)]
dbox: dbox_cleanup_temp_files() - Reformat code
Marco Bettini [Tue, 28 Feb 2023 11:44:48 +0000 (11:44 +0000)]
dbox: dbox_cleanup_temp_files() - Remove unnecessary else/else if after returns
Marco Bettini [Tue, 28 Feb 2023 11:30:22 +0000 (11:30 +0000)]
dbox: dbox_mailbox_open() - Drop unused ctime
Marco Bettini [Tue, 28 Feb 2023 11:21:10 +0000 (11:21 +0000)]
dbox: dbox_mailbox_open() - Move dbox_cleanup_temp_files() to dbox_mailbox_close()
Marco Bettini [Tue, 28 Feb 2023 10:15:50 +0000 (10:15 +0000)]
dbox: dbox_mailbox_open() - Infer last_temp_file_scan from dir's atime if 0
Marco Bettini [Tue, 28 Feb 2023 10:14:26 +0000 (10:14 +0000)]
dbox: dbox_mailbox_create() - Update last_temp_file_scan
Marco Bettini [Fri, 3 Mar 2023 16:15:17 +0000 (16:15 +0000)]
lib-storage: dbox_cleanup_temp_files() - Fix inverted check for ENOENT
Timo Sirainen [Fri, 24 Feb 2023 14:39:14 +0000 (16:39 +0200)]
doveadm: Panic if doveadm_print_header() is called too late
Otherwise it's not noticed unless the doveadm command is called for multiple
users (-A, -F).
Timo Sirainen [Fri, 24 Feb 2023 14:22:28 +0000 (16:22 +0200)]
doveadm: Panic if doveadm_print_init() is called too late
Otherwise it's not noticed unless the doveadm command is called for multiple
users (-A, -F).
Marco Bettini [Wed, 1 Mar 2023 16:17:05 +0000 (16:17 +0000)]
fts-flatcurve: Move doveadm_print_header() eariler
Otherwise the newly introduced checks trigger faults
Marco Bettini [Wed, 1 Mar 2023 16:16:11 +0000 (16:16 +0000)]
fts: fts tokenize - Move doveadm_print_init() eariler
Otherwise the newly introduced checks trigger faults
Marco Bettini [Tue, 28 Feb 2023 16:49:53 +0000 (16:49 +0000)]
mail-crypt: Move doveadm_print_init/header() eariler
Otherwise the newly introduced checks trigger faults
Aki Tuomi [Mon, 27 Feb 2023 14:00:02 +0000 (16:00 +0200)]
doveadm: pw - Allow weak schemes in verification
Aki Tuomi [Fri, 3 Mar 2023 09:48:38 +0000 (11:48 +0200)]
auth: mech-gssapi - Remove KRB5_USEROK check
It should be there always these days. Enables cross-realm
and cross-identity authentication always.
Timo Sirainen [Sun, 5 Feb 2023 18:51:12 +0000 (20:51 +0200)]
sdbox: Fix panic due to leaked mail_index_view if sync fails
Fixes:
Panic: Leaked view for index .../dbox-Mails/dovecot.index: Opened in mail-index-sync.c:445
Timo Sirainen [Sun, 5 Feb 2023 18:50:06 +0000 (20:50 +0200)]
lib-index: Don't update log_file_tail_offset on sync if reading dovecot.index.log failed
This is more of a theoretical issue, since dovecot.index.log read failure is
very unlikely.
Timo Sirainen [Sun, 5 Feb 2023 18:47:08 +0000 (20:47 +0200)]
lib-index: Don't update max_tail_offset if write to dovecot.index.log fails
The max_tail_offset didn't actually increase in that situation.
This fixes wrongly updating mail_index_header.log_file_tail_offset after
write to dovecot.index.log failed (due to out of disk space), which in
turn can cause some unexpected errors.
Timo Sirainen [Sun, 5 Feb 2023 18:46:34 +0000 (20:46 +0200)]
lib-index: Fix event leak if purging dovecot.index.cache fails
Timo Sirainen [Fri, 24 Feb 2023 12:06:14 +0000 (14:06 +0200)]
lib: event-filter-parser.y - Add workaround for nerrs being unused warning
Fixes with clang-17:
warning: variable 'event_filter_parser_nerrs' set but not used
Timo Sirainen [Fri, 24 Feb 2023 12:02:01 +0000 (14:02 +0200)]
global: Remove dead code
Timo Sirainen [Thu, 23 Feb 2023 14:10:43 +0000 (16:10 +0200)]
lib: istream - Don't call memcpy() with NULL parameter --with-devel-checks
Aki Tuomi [Wed, 22 Feb 2023 12:08:20 +0000 (14:08 +0200)]
lib: lib - Add value for defines that don't have it
Fixes compilation with FreeBSD that requires a value for
defines.
Broken in
e6f2682b32ff5b366ee7242841c3194425202880
Aki Tuomi [Wed, 22 Feb 2023 12:06:57 +0000 (14:06 +0200)]
lib: lib - Remove memcpy macro in C++
This breaks C++ compilation due to too wide impact.
Broken in
38dbeec767ad10021020e3833b1dbc3d04442f85
Aki Tuomi [Wed, 22 Feb 2023 12:06:05 +0000 (14:06 +0200)]
lib-auth: Remove external libraries from dependencies
This just breaks compilation when they contain -L.
Broken in
5d632abbf571f8e9157b1526533d677a1b8eb829
Karl Fleischmann [Thu, 23 Feb 2023 07:16:13 +0000 (08:16 +0100)]
lib-mail: Remove obsolete mail-user-hash
Karl Fleischmann [Thu, 23 Feb 2023 07:15:48 +0000 (08:15 +0100)]
login-common: Remove obsolete include of mail-user-hash.h
Marco Bettini [Wed, 22 Feb 2023 09:18:48 +0000 (09:18 +0000)]
fts: cmd_fts_expand_run() - Fix for crash invoking doveadm fts expand -A
Marco Bettini [Tue, 21 Feb 2023 10:04:36 +0000 (10:04 +0000)]
imap: imap_parser_read_next_atom() - Reject special character DEL 0x7F
atom-specials includes CTL, which in turn contains \x00-\x1F and \x7F DEL
Marco Bettini [Tue, 21 Feb 2023 10:03:11 +0000 (10:03 +0000)]
imap: imap_parser_read_next_atom() - Accept "]" in cmd-tag(s)
despite "]" being in atom-specials, a specific exception is made
for that in ASTRING-CHAR, which is used by tag
Timo Sirainen [Sun, 5 Feb 2023 19:52:11 +0000 (21:52 +0200)]
lib-imap-client: Fix crash if SSL initialization fails when connecting
This could be for example due to invalid SSL certificate settings.
Stephan Bosch [Fri, 10 Feb 2023 15:46:37 +0000 (16:46 +0100)]
lib-imap-urlauth: imap-urlauth - Don't return errors from imap_msgpart_url*() as internal errors.
These are explicitly suitable as client errors; e.g. about nonexistent folders.
Timo Sirainen [Tue, 30 Mar 2021 11:26:08 +0000 (14:26 +0300)]
lib-imap-urlauth: imap-urlauth - Don't replace error returned by imap_msgpart_url_open_mailbox()
The original error is intended to be sent to the client.
Timo Sirainen [Tue, 30 Mar 2021 11:25:27 +0000 (14:25 +0300)]
lib-imap-urlauth: imap-urlauth - Rename error_r parameters to client_error_r
This indicates that the error messages are safe to be sent to the client.
Stephan Bosch [Fri, 10 Feb 2023 03:57:56 +0000 (04:57 +0100)]
imap-urlauth: imap-urlauth-worker - Fix event leak.
Stephan Bosch [Sat, 4 Feb 2023 17:30:37 +0000 (18:30 +0100)]
lib-imap-urlauth: imap-urlauth-connection - Retain callback when callback returns 0.
Makes sure callback can be called for the next pass; e.g., for abort.
Stephan Bosch [Sat, 4 Feb 2023 17:33:26 +0000 (18:33 +0100)]
submission: submission-commands - Make sure BURL request abort does not try to send second reply.
Stephan Bosch [Sat, 4 Feb 2023 17:31:59 +0000 (18:31 +0100)]
submission: submission-commands - Remember whether chunk was added for BURL command.
Stephan Bosch [Thu, 1 Dec 2022 19:54:02 +0000 (20:54 +0100)]
imap: cmd-urlfetch - Prevent assertion failure upon error in urlfetch callback.
Panic was:
Panic: file imap-client.c: line 988 (client_command_free): assertion failed: (!cmd->executing)
Stephan Bosch [Wed, 27 Jul 2022 21:09:24 +0000 (23:09 +0200)]
auth: auth-request - Snapshot the userdb fields upon authentication success.
Otherwise, fields added by mechanisms that don't use a passdb lookup (such as
DOVECOT-TOKEN) can be lost upon the subsequent userdb lookup.
Stephan Bosch [Wed, 27 Jul 2022 21:07:29 +0000 (23:07 +0200)]
auth: auth-client-connection - Fix assertion occurring when DOVECOT-TOKEN mechanism is used.
It was not returned as a "private" mechanism, which now triggers a panic due to
a recently added assertion.
Panic was:
Panic: file sasl-server.c: line 520 (sasl_server_auth_begin): assertion failed: (!private || (mech->flags & MECH_SEC_PRIVATE) != 0)
Aki Tuomi [Fri, 17 Feb 2023 10:07:01 +0000 (12:07 +0200)]
config: old-set-parser - Remove mention about external auth server
Aki Tuomi [Fri, 17 Feb 2023 10:06:32 +0000 (12:06 +0200)]
master: Update comment in mkdir_login_dir()
Aki Tuomi [Fri, 17 Feb 2023 10:04:48 +0000 (12:04 +0200)]
master: Remove settings_have_auth_unix_listeners_in()
External authentication has not worked since v2.0.
Timo Sirainen [Tue, 14 Feb 2023 23:46:44 +0000 (01:46 +0200)]
configure: Fix linking order of lib-auth and lib-otp
lib-auth depends on lib-otp, so it should be first.
Timo Sirainen [Thu, 9 Feb 2023 15:04:22 +0000 (17:04 +0200)]
lib-imap-client: Fix/clarify selection state handling
The old code assumed that selected_box would be non-NULL while a new mailbox
is being selected. That's not true though, the imapc-storage code closes the
old mailbox before selecting the next one. So the QRESYNC-specific code for
tracking selected-state was never being used. Fixed this, and clarified in
general how the selected-state is supposed to work.
Timo Sirainen [Thu, 9 Feb 2023 15:03:00 +0000 (17:03 +0200)]
lib-imap-client: Rename imapc_connection.selecting_box to qresync_selecting_box
It's only used when QRESYNC extension is enabled.
Timo Sirainen [Thu, 9 Feb 2023 14:21:24 +0000 (16:21 +0200)]
imapc: Fix handling EXISTS reply to previous mailbox while selecting new mailbox
For example if the communication was:
C: a SELECT box1
...
C: b SELECT box2
S: * 10 EXISTS
S: * 1 EXISTS
S: * OK [UIDVALIDITY
1675948459 ] UIDs valid
S: ...
S: b OK
The first EXISTS is meant for box1, not box2. Fixed by not starting a FETCH
(FLAGS) for the mailbox being selected until the tagged reply is received.
Timo Sirainen [Thu, 9 Feb 2023 14:12:35 +0000 (16:12 +0200)]
imapc: Don't process untagged replies in mailbox that isn't fully selected yet
For example if the communication was:
C: a SELECT box1
...
C: b SELECT box2
S: * 1 EXPUNGE
S: * 1 EXISTS
S: * OK [UIDVALIDITY
1675948459 ] UIDs valid
S: ...
S: b OK
The expunge was intended for box1, not box2. This caused:
Warning: imapc(...): Mailbox '...' state corrupted: EXPUNGE received for empty mailbox - reconnecting
Fixed this by ignoring untagged EXPUNGE, FETCH, SEARCH and ESEARCH replies
when the UIDVALIDITY reply hasn't been yet received for a mailbox.
Karl Fleischmann [Tue, 7 Feb 2023 15:01:38 +0000 (16:01 +0100)]
lib-storage: Omit irrelevant mail uid=0 for saved mails in mail event log prefix
Karl Fleischmann [Tue, 7 Feb 2023 10:07:05 +0000 (11:07 +0100)]
lib-storage: Make mail error UID reporting consistent for corrupted cache
Karl Fleischmann [Wed, 1 Feb 2023 17:00:18 +0000 (18:00 +0100)]
global: Access mail errors directly instead of mailbox errors
Karl Fleischmann [Wed, 1 Feb 2023 17:04:24 +0000 (18:04 +0100)]
lib-storage: Unit test mail*_get_last_internal_error() functions
Karl Fleischmann [Thu, 26 Jan 2023 10:36:03 +0000 (11:36 +0100)]
lib-storage: Unit test mail_set_critical()
Karl Fleischmann [Thu, 19 Jan 2023 15:40:34 +0000 (16:40 +0100)]
lib-storage: Report critical mail errors without redundant mail prefix
Don't report mail prefix unless it's different from last tracked mail
uid, similar to mailbox_get_last_internal_error().
Karl Fleischmann [Thu, 19 Jan 2023 15:05:12 +0000 (16:05 +0100)]
lib-storage: Fix typo in note-comment of mailbox_get_last_internal_error()
Timo Sirainen [Mon, 30 Jan 2023 23:39:23 +0000 (01:39 +0200)]
fts: Remove unused fts-expunge-log
Timo Sirainen [Tue, 7 Feb 2023 20:36:32 +0000 (22:36 +0200)]
lib-master: Fail if SOCKET_COUNT environment is empty in non-standalone mode
The master process is expected to always set SOCKET_COUNT.
Timo Sirainen [Tue, 7 Feb 2023 20:35:24 +0000 (22:35 +0200)]
lib-master: Ignore SOCKET_COUNT with MASTER_SERVICE_FLAG_STANDALONE
This could have caused problems when e.g. doveadm command was executed
inside a process started via master process.
Aki Tuomi [Wed, 8 Feb 2023 18:40:41 +0000 (20:40 +0200)]
auth: test-lua - Check that password is returned in lookup
Aki Tuomi [Wed, 8 Feb 2023 18:32:57 +0000 (20:32 +0200)]
auth: test-lua - Test bad keynames end up ignored
Aki Tuomi [Wed, 1 Feb 2023 11:58:42 +0000 (13:58 +0200)]
lib-storage: mail-user - Add event_ prefixed values from userdb as event fields
Aki Tuomi [Mon, 6 Feb 2023 09:11:06 +0000 (11:11 +0200)]
lib-auth-client: auth-client-request - Use split value in args_parse_user()
Since we already split this in previous commit, we can take advantage
of the provided key-value.
Aki Tuomi [Wed, 1 Feb 2023 11:53:42 +0000 (13:53 +0200)]
login-common: Add event_ prefixed values from auth as event fields
Aki Tuomi [Mon, 6 Feb 2023 19:23:48 +0000 (21:23 +0200)]
auth: db-lua - Skip invalid keys and values on field export
Timo Sirainen [Tue, 7 Feb 2023 18:43:08 +0000 (20:43 +0200)]
lib: t_split_key_value*() - Use ATTR_NOWARN_UNUSED_RESULT
Marco Bettini [Thu, 2 Feb 2023 11:00:04 +0000 (11:00 +0000)]
doveadm auth login: Separate userdb's user from userdb actual extra fields in command output
Marco Bettini [Fri, 3 Feb 2023 16:25:19 +0000 (16:25 +0000)]
lib-storage: set_line() - Add check against empty lines and keys, drop suffixing lines without '='
The previous check is no longer necessary as keys are now always followed
by '=', but in case of empty lines now the function would crash instead
of setting "plugin/=yes" (which didn't make sense either)
Marco Bettini [Thu, 2 Feb 2023 09:26:12 +0000 (09:26 +0000)]
auth: Remove extra tabs inserted using auth_fields_append()
Marco Bettini [Mon, 23 Jan 2023 16:24:33 +0000 (16:24 +0000)]
auth: Drop auth_fields_booleanize()
Booleanization is no longer necessary as now the fields expecting it
expect just the field presence, not a specific value.
Marco Bettini [Fri, 27 Jan 2023 13:37:15 +0000 (13:37 +0000)]
auth: Allow auth extra-fields with empty strings, NULL values enforced to empty string ""
Marco Bettini [Wed, 1 Feb 2023 11:44:06 +0000 (11:44 +0000)]
auth: Use t_split_key_value_eq()
auth_user_fields_parse() use t_split_key_value_eq
Marco Bettini [Fri, 27 Jan 2023 14:03:22 +0000 (14:03 +0000)]
lib-storage: mail_user_get_alt_usernames() - Skip empty string values
Marco Bettini [Fri, 27 Jan 2023 13:43:34 +0000 (13:43 +0000)]
lib-storage: Use t_split_key_value_eq()
Marco Bettini [Fri, 27 Jan 2023 13:55:27 +0000 (13:55 +0000)]
login-common: authenticate_callback() - Accept valued items for nologin,proxy,anonymous
Previously these fields were expected to be sent only value-less (i.e. with no trailing '=<value>')
Marco Bettini [Fri, 27 Jan 2023 13:30:17 +0000 (13:30 +0000)]
login-common: sasl-server - Use t_split_key_value_eq()