]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Tue, 1 Feb 2022 13:40:48 +0000 (14:40 +0100)]
lmtp: Simplify/clarify per-recipient session ID
The session ID is the transaction ID followed by an increasing recipient
count (number of RCPT commands) in the SMTP transaction. Clarify this by
adding 'R' letter before the counter. Also don't add the counter suffix at
all for the first recipient, since most transactions only have a single
recipient.
Timo Sirainen [Tue, 1 Feb 2022 13:35:05 +0000 (14:35 +0100)]
lib-smtp: server-transaction - Simplify/clarify transaction ID
The transaction ID is the session ID followed by an increasing transaction
count (number of MAIL commands) in the SMTP server connection. Clarify
this by adding 'T' letter before the counter. Also don't add the counter
suffix at all for the first session, since most sessions only have a
single transaction.
Timo Sirainen [Tue, 1 Feb 2022 13:29:43 +0000 (14:29 +0100)]
lib-smtp, lmtp: Add brackets to <session-id> in logging
This makes it clearer where the session-id stops. It's also similar to
how it is in mail_log_prefix.
Timo Sirainen [Tue, 1 Feb 2022 14:03:15 +0000 (15:03 +0100)]
lmtp: proxy - Use recipient-specific session-id when logging the result
Instead of transaction ID, which is shared between recipients.
Timo Sirainen [Tue, 1 Feb 2022 15:00:36 +0000 (16:00 +0100)]
lmtp: struct lmtp_recipient - Change all strings to const
Aki Tuomi [Wed, 12 Jan 2022 09:34:02 +0000 (11:34 +0200)]
NEWS: Update news for 2.3.18
Aki Tuomi [Tue, 30 Nov 2021 10:47:52 +0000 (12:47 +0200)]
NEWS: Add news for 2.3.17.1
Aki Tuomi [Tue, 28 Sep 2021 09:40:29 +0000 (12:40 +0300)]
NEWS: Add news for 2.3.17
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 [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
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)
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 .
Aki Tuomi [Wed, 12 Jan 2022 08:41:20 +0000 (10:41 +0200)]
configure: Set version to 2.3.18
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
Stephan Bosch [Mon, 13 Dec 2021 11:54:19 +0000 (12:54 +0100)]
lmtp: lmtp-proxy - Add session ID to backend connection error replies.
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.
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.
Stephan Bosch [Mon, 27 Dec 2021 10:35:05 +0000 (11:35 +0100)]
lmtp: lmtp-proxy - Split off lmtp_proxy_handle_connection_error().
Stephan Bosch [Tue, 4 Jan 2022 20:20:22 +0000 (21:20 +0100)]
lmtp: lmtp-proxy - Change proxy connection failure message make more sense.
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.
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.
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.
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.
Stephan Bosch [Mon, 27 Dec 2021 10:24:36 +0000 (11:24 +0100)]
lmtp: Reformat lmtp-proxy.c.
Stephan Bosch [Tue, 7 Dec 2021 00:23:13 +0000 (01:23 +0100)]
lib-smtp: Reformat smtp-client-connection.c.
Stephan Bosch [Wed, 5 Jan 2022 01:27:48 +0000 (01:27 +0000)]
lib-compression: ostream-zlib - Fix signed vs unsigned comparison.
Stephan Bosch [Wed, 5 Jan 2022 01:25:34 +0000 (01:25 +0000)]
lib: test-event-flatten - Fix format string specifier for usec time
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
Timo Sirainen [Mon, 20 Dec 2021 09:05:39 +0000 (11:05 +0200)]
maildir: maildir_filename_base_hash() - Disable ubsan integer wrapping checks
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.
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.
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.
Timo Sirainen [Mon, 29 Nov 2021 15:16:30 +0000 (16:16 +0100)]
lib-index: mail_index_lookup_full() - Add expunged_r parameter
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.
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.
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.
Timo Sirainen [Mon, 29 Nov 2021 14:36:58 +0000 (15:36 +0100)]
lib-storage: Move struct mail.event to mail_private
Timo Sirainen [Mon, 29 Nov 2021 14:32:28 +0000 (15:32 +0100)]
lib-lda, lib-storage: Use mail_event()
Timo Sirainen [Mon, 29 Nov 2021 14:31:17 +0000 (15:31 +0100)]
lib-storage: Add mail_event()
Timo Sirainen [Mon, 29 Nov 2021 17:39:22 +0000 (18:39 +0100)]
lib-storage: Add and use mail_metadata_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.
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
Timo Sirainen [Mon, 29 Nov 2021 17:34:43 +0000 (18:34 +0100)]
pop3c: Add missing lookup_abort and mail_stream_accessed handling
Timo Sirainen [Mon, 29 Nov 2021 19:44:05 +0000 (20:44 +0100)]
maildir: get_stream() - Add missing lookup_abort and mail_stream_accessed handling
Timo Sirainen [Mon, 29 Nov 2021 17:24:30 +0000 (18:24 +0100)]
lib-storage: Rename mail.mail_stream_opened to mail_stream_accessed
It is set to TRUE even if the mail stream couldn't successfully be opened,
so this describes it better. Also it's now consistent with
mail_metadata_accessed.
Timo Sirainen [Fri, 3 Dec 2021 08:44:10 +0000 (10:44 +0200)]
lib-index: Remove mail_cache_lookup_finished event
This event was using too much CPU with commands that accessed lots of mails
(e.g. IMAP SORT). It also wasn't especially useful.
Reverts
0d252dccb3013fea4d9a28bd5fafb5ea6e847d0e
Timo Sirainen [Thu, 2 Dec 2021 09:35:20 +0000 (11:35 +0200)]
lib-index: Use ATTR_COLD for error/corruption handling functions
This could reduce CPU usage due to better branch prediction.
Timo Sirainen [Tue, 23 Nov 2021 14:00:02 +0000 (15:00 +0100)]
lib: pool_alloconly_destroy() optimization - Don't clear the last block before free
The block is going to be freed, so there's no need to clear it.
(The clearing still happens if clean_frees=TRUE.)
Timo Sirainen [Tue, 23 Nov 2021 13:59:28 +0000 (14:59 +0100)]
lib: pool_alloconly_destroy() - Deduplicate code
Timo Sirainen [Tue, 23 Nov 2021 13:58:39 +0000 (14:58 +0100)]
lib: Split off pool_alloconly_free_block()
Timo Sirainen [Tue, 23 Nov 2021 13:56:10 +0000 (14:56 +0100)]
lib: Split off pool_alloconly_free_blocks_until_last()
Timo Sirainen [Tue, 23 Nov 2021 13:17:49 +0000 (15:17 +0200)]
lib: Minor optimization - Avoid zeroing a newly created empty event field
Timo Sirainen [Mon, 22 Nov 2021 16:36:21 +0000 (17:36 +0100)]
lib: Remove copy of event_passthrough from struct event
There was no need for it. This saves some memory and CPU.
This change now prevents modifications to the event_passthrough, but nothing
was doing it before either.
Timo Sirainen [Mon, 22 Nov 2021 16:23:28 +0000 (17:23 +0100)]
lib: Grow initial event pool size to 1024 bytes
The old 64 bytes size wasn't enough to allocate even the struct event itself.
Karl Fleischmann [Wed, 15 Dec 2021 08:19:40 +0000 (09:19 +0100)]
login-common: Explicitly null client auth fields on proxy pool unref
Explicitly setting `client_id` and `forward_fields` to null in the
client may reveal use-after-free issues when trying to access these
fields on a client proxy.
Karl Fleischmann [Fri, 10 Dec 2021 10:04:06 +0000 (11:04 +0100)]
login-common: Use base index for aliases
Define a base index for aliases in the login variable table. Assign
values via offset of that base index. This allows adding more values
later without updating any subsequent index.
Marco Bettini [Fri, 10 Dec 2021 10:32:37 +0000 (11:32 +0100)]
fts: Add headers filters
Marco Bettini [Fri, 10 Dec 2021 10:30:08 +0000 (11:30 +0100)]
fts: fts-build-mail - Remove stray line
Stephan Bosch [Mon, 9 Nov 2020 23:11:15 +0000 (00:11 +0100)]
auth: mech-scram - Amend comments.
Stephan Bosch [Mon, 9 Nov 2020 23:11:11 +0000 (00:11 +0100)]
auth: mech-scram - Fix handling of authzid.
The gs2-header field was not recreated correctly for the final verification.
Fixed by storing the complete gs2-header value instead.
Stephan Bosch [Mon, 9 Nov 2020 23:11:07 +0000 (00:11 +0100)]
auth: mech-scram - Properly size temporary string buffers.
Stephan Bosch [Mon, 9 Nov 2020 23:11:03 +0000 (00:11 +0100)]
auth: mech-scram - Restructure message parsing in parse_scram_client_first().
Stephan Bosch [Mon, 9 Nov 2020 23:10:57 +0000 (00:10 +0100)]
auth: Reformat mech-scram.c.
Timo Sirainen [Fri, 20 Aug 2021 14:43:09 +0000 (17:43 +0300)]
lib-storage: Return reason string in mailbox_vfuncs.list_index_has_changed()
The callers can use it to log why the list index had changed.
Timo Sirainen [Fri, 20 Aug 2021 16:09:17 +0000 (19:09 +0300)]
lib-storage: Don't call mailbox_vfuncs.list_index_has_changed() in data stack frame
This will be required by the next change.
Timo Sirainen [Fri, 20 Aug 2021 14:26:42 +0000 (17:26 +0300)]
lib-storage: mailbox_list_index_view_open() - Log a debug line why index isn't up-to-date
Timo Sirainen [Fri, 20 Aug 2021 14:20:01 +0000 (17:20 +0300)]
lib-storage: mailbox_list_index_status() - Return failure reason string
Log a debug line if mailbox list index couldn't be used to get the wanted
status information.
Marco Bettini [Mon, 6 Dec 2021 10:54:16 +0000 (11:54 +0100)]
auth: userdb-ldap - Avoid early dereferencing
userdb_ldap_iterate_callback() is still invoked after dereferencing
auth_request in userdb_ldap_iterate_deinit().
Normally this happens only on teardown, but it may happens also
in case of auth disconnecting from auth-worker during iteration.
(which shouldn't happen unless the auth process crashes)
Timo Sirainen [Thu, 9 Dec 2021 16:31:04 +0000 (17:31 +0100)]
var-expand-crypt: Remove dead code
It's correct that dcrypt library shouldn't be deinitialized at plugin
deinit.
Timo Sirainen [Fri, 3 Dec 2021 15:23:35 +0000 (17:23 +0200)]
login-common: Add more fields to proxy_session_finished
Added disconnect_side, disconnect_reason, idle_secs, bytes_in, bytes_out.
Timo Sirainen [Fri, 3 Dec 2021 15:54:37 +0000 (17:54 +0200)]
login-common: Split off proxy disconnection prefix to LOGIN_PROXY_KILL_PREFIX
Timo Sirainen [Fri, 3 Dec 2021 15:47:50 +0000 (17:47 +0200)]
login-common: login_proxy_free_*() - Rename reason to log_msg
This better describes it, since it's the full log message.
Timo Sirainen [Wed, 1 Dec 2021 12:46:04 +0000 (14:46 +0200)]
dsync: Fix -I max-size to actually be the max-size rather than min-size
The -I max-size parameter was supposed to be used to skip mails that are
larger than max-size. Instead, it skipped mails that were smaller.
Timo Sirainen [Tue, 9 Nov 2021 12:42:24 +0000 (13:42 +0100)]
man: Add missing parameters to doveadm-sync
Timo Sirainen [Tue, 30 Nov 2021 16:02:14 +0000 (18:02 +0200)]
dsync: Remove -D parameter that disables syncing mailbox renames
It hasn't been necessary for a long time, and its behavior seems to be
broken.
Timo Sirainen [Tue, 9 Nov 2021 12:41:37 +0000 (13:41 +0100)]
dsync: Add back various missing parameters
Also add them to the usage string.
Broken by
5676c510bfa9217df05e9b7cb000ae3554d66f22
Michael M Slusarz [Wed, 22 Sep 2021 20:50:50 +0000 (14:50 -0600)]
fts: Don't overwrite INUSE error if indexing times out
Aki Tuomi [Thu, 11 Nov 2021 10:31:49 +0000 (12:31 +0200)]
lib-storage/index: If mail stream was already opened, do not count it as slow vsize access
imapc storage driver will open the mail stream in some circumstances during search,
so do not consider this as slow vsize.
Aki Tuomi [Tue, 16 Nov 2021 13:08:47 +0000 (15:08 +0200)]
lib-storage: Split off index_mailbox_vsize_finish_bg()
Simplifies next commit
Timo Sirainen [Tue, 10 Aug 2021 09:22:08 +0000 (12:22 +0300)]
lib-index: Fix storing cache fields' last_used with 64bit big endian CPUs
Timo Sirainen [Thu, 17 Jan 2019 10:13:38 +0000 (12:13 +0200)]
maildir: Fix crash at error handling
At this point dest_mail is already NULL. Mainly could happen when running
out of disk space.
Siavash Tavakoli [Tue, 30 Nov 2021 09:51:25 +0000 (09:51 +0000)]
login-proxy: Don't send proxying start event for reconnects
Send the event only for the beginning of proxying and add the reconnect counts
as a field for _established and _finished events.
Marco Bettini [Fri, 26 Nov 2021 13:45:47 +0000 (14:45 +0100)]
lib: str_parse_intmax() - Replace signed expression with UNSIGNED_MINUS()
Found by code analysis tool
Marco Bettini [Fri, 26 Nov 2021 14:48:04 +0000 (15:48 +0100)]
lib: switch i_rand_limit() - Replace signed expression with UNSIGNED_MINUS()
Found by code analysis tool
Marco Bettini [Fri, 26 Nov 2021 13:15:07 +0000 (14:15 +0100)]
lib: buffer_truncate_rshift_bits() - Replace signed expression with an unsigned equivalent
Found by code analysis tool
Marco Bettini [Mon, 29 Nov 2021 14:05:29 +0000 (15:05 +0100)]
lib: bits_rotXYY() - Replace signed expression with UNSIGNED_MINUS() macro for unsigned 2's complement
Found by code analysis tool