]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Siavash Tavakoli [Tue, 2 Mar 2021 10:57:08 +0000 (10:57 +0000)]
indexer: Convert indexer-worker log info to event
Emit an event named "indexer_worker_indexing_finished", with following
extra fields:
- message_count: Number of messages indexed
- first_uid: First uid of the message indexed
- last_uid: Last uid of the message indexed
- user_cpu_usecs: Total user mode cpu time spent on indexing
On successful indexing and on MAIL_ERROR_NOTFOUND error event is emitted
with "e_debug()", in other error situations event is emitted with "e_error()".
Siavash Tavakoli [Thu, 4 Mar 2021 23:26:52 +0000 (23:26 +0000)]
lib: lib-event: Add event_enable_user_cpu_usecs
- Add an internal rusage struct to events to keep track of resource usage.
- "event_enable_user_cpu_usecs()" enables "user_cpu_usecs" field for the event
If "user_cpu_usecs" field is enabled, user CPU time will be calculated
at the time of sending the event and will be added to event fields.
Aki Tuomi [Thu, 11 Mar 2021 07:28:58 +0000 (09:28 +0200)]
m4: want_lua - Fix Lua function checks
One has to use $LIBS variable to ensure libraries
come after conftest.c in configure.
Broken in
af819cd2f43b8896d949a33f8099234ac57df6e5
Josef 'Jeff' Sipek [Wed, 3 Mar 2021 22:08:07 +0000 (17:08 -0500)]
lib-lua: Add table get helpers
Josef 'Jeff' Sipek [Thu, 4 Mar 2021 22:05:45 +0000 (17:05 -0500)]
lib-lua: Check for function presence instead of Lua version in compat code
Josef 'Jeff' Sipek [Thu, 4 Mar 2021 22:03:03 +0000 (17:03 -0500)]
lib-lua: Reorder compat luaL_{setfuncs,setmetatable}
Switch their order to keep them alphabetical. This will make the header
changes in the next commit a little more consistent.
Additionally, fix up the coding style.
Josef 'Jeff' Sipek [Thu, 4 Mar 2021 21:51:46 +0000 (16:51 -0500)]
lib-lua: Move compat macros and prototypes to dlua-compat.h
Additionally, fix -Wstrict-bool issue in luaL_newmetatable() compatibility
wrapper.
Josef 'Jeff' Sipek [Thu, 4 Mar 2021 21:38:50 +0000 (16:38 -0500)]
lib-lua: Remove unused compatibility macros
These are never used since all supported Lua versions define
LUA_VERSION_NUM.
Josef 'Jeff' Sipek [Thu, 4 Mar 2021 21:21:07 +0000 (16:21 -0500)]
lib-lua: Implement a Lua 5.1 & 5.2 compatibility wrapper for lua_isinteger
Josef 'Jeff' Sipek [Thu, 4 Mar 2021 21:16:53 +0000 (16:16 -0500)]
m4: want_lua - Check for lua_isinteger
Josef 'Jeff' Sipek [Thu, 4 Mar 2021 20:35:37 +0000 (15:35 -0500)]
lib-lua: Implement a Lua 5.1 compatibility wrapper for lua_tointegerx
Josef 'Jeff' Sipek [Thu, 4 Mar 2021 20:31:29 +0000 (15:31 -0500)]
m4: want_lua - Check for lua_tointegerx
Stephan Bosch [Fri, 12 Feb 2021 12:11:53 +0000 (13:11 +0100)]
lib-smtp: test-smtp-client-errors - Amend early data reply test to verify that connection is still viable.
Some problems only surface when the connection is reused for the next command.
Before, the connection was terminated immediately after the transaction, which
hides such issues.
Stephan Bosch [Tue, 9 Feb 2021 22:35:53 +0000 (23:35 +0100)]
lib-smtp: smtp-client-connection - Hold reference to command that is sending a stream.
This fixes a panic:
Panic: file smtp-client-command.c: line 715 (smtp_client_command_do_send_more): assertion failed: (cmd->stream != NULL)
Stephan Bosch [Tue, 9 Feb 2021 22:35:42 +0000 (23:35 +0100)]
lib-smtp: smtp-client-command - Make smtp_client_command_unref() return TRUE when the object persists.
Stephan Bosch [Tue, 9 Feb 2021 22:44:42 +0000 (23:44 +0100)]
lib-smtp: smtp-client-command - Make smtp_client_command_unref(NULL) a no-op.
Timo Sirainen [Sat, 6 Mar 2021 15:58:53 +0000 (17:58 +0200)]
imap: Fix logging garbage if imap-hibernate sends invalid VERSION
Timo Sirainen [Fri, 5 Mar 2021 13:26:24 +0000 (15:26 +0200)]
lib-mail: mail-html2text - Fix character signedness type mismatch
Fixes ubsan complaints:
mail-html2text.c:186:12: runtime error: implicit conversion from type 'unsigned char' of value 226 (8-bit, unsigned) to type 'char' changed the value to -30 (8-bit, signed)
Timo Sirainen [Fri, 5 Mar 2021 10:44:42 +0000 (12:44 +0200)]
fts-tika: Don't fail indexing if Tika returns 5xx error
Broken by
8e1eaf849ce4668c0941338e3e3671db159da575 , which changed 5xx to be
retried once before it was ignored. However, it accidentally changed the
second 5xx to return failure instead of being ignored.
Timo Sirainen [Tue, 2 Mar 2021 15:10:03 +0000 (17:10 +0200)]
pop3: Change IO context earlier while shutting down
This didn't practically cause any issues currently, but the new behavior
is more correct and future-proof.
Timo Sirainen [Tue, 2 Mar 2021 15:08:53 +0000 (17:08 +0200)]
imap: Fix using mail_log_prefix is used when client disconnects during server shutdown
Timo Sirainen [Tue, 2 Mar 2021 15:02:32 +0000 (17:02 +0200)]
submission: Fix using mail_log_prefix when client is disconnected due to server shutdown
Timo Sirainen [Fri, 26 Feb 2021 14:10:18 +0000 (16:10 +0200)]
dict-sql: Add more comments
Timo Sirainen [Fri, 26 Feb 2021 14:05:47 +0000 (16:05 +0200)]
dict-sql: Rename [extra_]values to pattern_values
Timo Sirainen [Fri, 26 Feb 2021 14:03:35 +0000 (16:03 +0200)]
dict-sql: Rename dict_sql_map.max_field_count to max_pattern_fields_count
Timo Sirainen [Fri, 26 Feb 2021 14:02:05 +0000 (16:02 +0200)]
dict-sql: Rename dict_sql_map.sql_fields to pattern_fields
Timo Sirainen [Fri, 26 Feb 2021 13:40:41 +0000 (15:40 +0200)]
dict-sql: Change char key1 to bool add_username
Timo Sirainen [Fri, 26 Feb 2021 13:32:48 +0000 (15:32 +0200)]
dict-sql: Simplify sql_dict_maps_are_mergeable() and add comments
Timo Sirainen [Fri, 26 Feb 2021 13:29:02 +0000 (15:29 +0200)]
lib: test-array - Use i_strcmp_p() instead of reimplementing it
Timo Sirainen [Fri, 26 Feb 2021 13:02:02 +0000 (15:02 +0200)]
dict-sql: Simplify set/inc flushing
Especially the *_real() function names were confusing.
Timo Sirainen [Thu, 25 Feb 2021 15:54:26 +0000 (17:54 +0200)]
dict-sql: Support merging multiple atomic_inc fields
Timo Sirainen [Thu, 25 Feb 2021 15:40:22 +0000 (17:40 +0200)]
dict-sql: Support merging multiple set fields
Timo Sirainen [Thu, 25 Feb 2021 15:19:49 +0000 (17:19 +0200)]
dict-sql: Keep trying to merge INSERT/UPDATE always to the previous key
Previously if the first two couldn't be merged, it would flush both.
Now it flushes only the first and attempts to merge the 2nd and 3rd.
Timo Sirainen [Thu, 25 Feb 2021 15:10:01 +0000 (17:10 +0200)]
dict-sql: Move prev_set_* and prev_inc_* to struct sql_dict_prev
Timo Sirainen [Thu, 25 Feb 2021 13:50:45 +0000 (15:50 +0200)]
lib-sql: driver-test - Use test_assert_strcmp()
Timo Sirainen [Thu, 25 Feb 2021 13:49:47 +0000 (15:49 +0200)]
lib-dict-backend: test-dict-sql - Use test_assert_strcmp*()
Timo Sirainen [Tue, 23 Feb 2021 20:49:57 +0000 (22:49 +0200)]
lib-fs: Add type safety to fs_file/iter_set_async_callback() callback context
Timo Sirainen [Tue, 23 Feb 2021 09:11:47 +0000 (11:11 +0200)]
lib-dict, global: Add type safety to dict_transaction_commit_async() callback context
Timo Sirainen [Tue, 23 Feb 2021 09:16:50 +0000 (11:16 +0200)]
lib-dict, quota: Add and use dict_transaction_commit_async_nocallback()
Timo Sirainen [Tue, 23 Feb 2021 09:09:36 +0000 (11:09 +0200)]
lib-dict, global: Add type safety to dict_iterate_set_async_callback() callback context
Timo Sirainen [Tue, 23 Feb 2021 09:08:03 +0000 (11:08 +0200)]
lib-dict, global: Add type safety to dict_lookup_async() callback context
Josef 'Jeff' Sipek [Tue, 2 Mar 2021 14:51:59 +0000 (09:51 -0500)]
configure: Remove useless checks for luajit
At one point, we considered supporting LuaJIT. While it turned out to be
not worth it, the prototype removal accidentally left checks in the
configure file.
Josef 'Jeff' Sipek [Mon, 22 Feb 2021 22:44:03 +0000 (17:44 -0500)]
global: dict_iterate_deinit(NULL) is a no-op
Josef 'Jeff' Sipek [Mon, 22 Feb 2021 22:43:49 +0000 (17:43 -0500)]
lib-dict: Make dict_iterate_deinit(NULL) a no-op
Josef 'Jeff' Sipek [Mon, 22 Feb 2021 22:43:05 +0000 (17:43 -0500)]
global: dict_transaction_rollback(NULL) is a no-op
Josef 'Jeff' Sipek [Mon, 22 Feb 2021 22:41:23 +0000 (17:41 -0500)]
lib-dict: Make dict_transaction_rollback(NULL) a no-op
Timo Sirainen [Thu, 4 Feb 2021 16:25:13 +0000 (18:25 +0200)]
fts: Replace generic "transaction context" error with more specific ones
Timo Sirainen [Wed, 3 Feb 2021 17:42:17 +0000 (19:42 +0200)]
fts: Fix mail_precache() and related error handling
The mail_precache() caller is now expected to stop on error, so there's
no need for fts to stop the search internally anymore. And similarly
the caller will log the mail_precache() error so the search or
transaction don't need to fail.
ft->failed is now used only for failures that are more specific to the
transaction.
Timo Sirainen [Wed, 3 Feb 2021 17:30:35 +0000 (19:30 +0200)]
fts: Use storage error logging when possible
Use mail_storage_set_internal_error() only when it's required, because it
loses the internal error string in storage.
Timo Sirainen [Wed, 3 Feb 2021 17:27:08 +0000 (19:27 +0200)]
lib-fts, fts: fts_language_detect() - Return error string instead of logging it
Timo Sirainen [Wed, 3 Feb 2021 19:00:22 +0000 (21:00 +0200)]
indexer: Include "attempted to index ... messages" also in all error messages
After the following changes search or transaction won't always fail anymore.
Timo Sirainen [Thu, 4 Feb 2021 16:07:45 +0000 (18:07 +0200)]
global: Handle mail_precache() errors
Timo Sirainen [Thu, 4 Feb 2021 16:05:39 +0000 (18:05 +0200)]
lib-storage: Change mail_precache() API to allow returning an error
Aki Tuomi [Tue, 23 Feb 2021 14:32:39 +0000 (16:32 +0200)]
Makefile: Always include dovecot.socket and dovecot.service
Aki Tuomi [Tue, 23 Feb 2021 10:52:29 +0000 (12:52 +0200)]
lib-master: Always import systemd related variables with systemd
Otherwise it is too easy to break systemd integration by forgetting
these from import_environment.
Aki Tuomi [Mon, 22 Feb 2021 14:14:14 +0000 (16:14 +0200)]
master: Improve systemd integration
Aki Tuomi [Mon, 22 Feb 2021 13:29:48 +0000 (15:29 +0200)]
master: Use libsystemd instead of local source
Aki Tuomi [Tue, 23 Feb 2021 14:08:28 +0000 (16:08 +0200)]
master: service-listen - Use dovecot coding standard for systemd code
Timo Sirainen [Mon, 22 Feb 2021 14:01:49 +0000 (16:01 +0200)]
lib-imap-client: Add asserts to make sure running commands always have a timeout
Timo Sirainen [Mon, 22 Feb 2021 13:41:42 +0000 (15:41 +0200)]
lib-imap-client: Don't remove global command timeouts when mailbox is unselected
Timo Sirainen [Mon, 22 Feb 2021 11:15:18 +0000 (13:15 +0200)]
lib-imap-client: Fix busy-loop if server disconnects too early when trying to logout
This can happen if:
* imapc sends NOOP to break idle
* remote server sends BYE, but doesn't immediately disconnect
* session is stopped, which causes imapc to attempt to send LOGOUT
* imapc waits for NOOP response first
* remote server disconnects
* imapc notices the disconnection, but does nothing with it, because it
thinks it's already handled. This keeps busy-looping.
* If there was a mailbox selected, this results in infinite busy-loop. If a
mailbox wasn't selected, imapc_cmd_timeout aborts the NOOP command.
Timo Sirainen [Wed, 24 Feb 2021 15:51:19 +0000 (17:51 +0200)]
lib-mail: message-parser - Always properly finish parsed input
If the caller hadn't called message_parser_parse_next_block() after
seeing EOF in the istream, the deinit could have crashed with:
Panic: file message-parser.c: line 802 (message_parser_deinit_from_parts): assertion failed: (ctx->nested_parts_count == 0 || i_stream_have_bytes_left(ctx->input))
Timo Sirainen [Mon, 1 Mar 2021 10:03:45 +0000 (12:03 +0200)]
lib: io_loop_context_new() - Fix memory leak
Broken by
fea09a415cf89223d8b17c5982257c9b3c357cbc
Timo Sirainen [Thu, 18 Feb 2021 12:43:06 +0000 (14:43 +0200)]
login-common: Fix implicit integer conversions when connect timeout is reached
Timo Sirainen [Wed, 3 Feb 2021 18:48:51 +0000 (20:48 +0200)]
lmtp: Fix log prefix when autoexpunge is running
The username was missing from the log prefix.
Timo Sirainen [Wed, 3 Feb 2021 18:42:50 +0000 (20:42 +0200)]
lib: io_loop_context_new() no longer implicitly activates the context
The new behavior requires explicitly activating the context. This change
was needed, because an implicit creation activated the context but didn't
call any of the callbacks. If ioloop wasn't run, the activation callbacks
were never called. This meant that when context was deactivated, the
deactivation callbacks weren't run either.
Timo Sirainen [Wed, 17 Feb 2021 17:33:03 +0000 (19:33 +0200)]
lib-storage: Replace i_error() and i_warning() with e_error() and e_warning()
This changes only the generic code. The driver-specific code still needs
changing.
Timo Sirainen [Thu, 18 Feb 2021 10:20:20 +0000 (12:20 +0200)]
lib-storage: test-mailbox-list - Initialize namespace, user and event
Required by the following change.
Timo Sirainen [Wed, 17 Feb 2021 17:28:03 +0000 (19:28 +0200)]
lib-storage: mail-duplicate - Replace i_error() with e_error()
Timo Sirainen [Wed, 17 Feb 2021 17:16:58 +0000 (19:16 +0200)]
lib-storage: Add functions to get log prefixes
This changes the log prefixes to be stored even when
MAIL_STORAGE_SERVICE_FLAG_NO_LOG_INIT is used.
Timo Sirainen [Wed, 3 Feb 2021 18:37:49 +0000 (20:37 +0200)]
lib-storage: Initialize service_user's logging before creating ioloop context
Needed by the next change.
Timo Sirainen [Wed, 3 Feb 2021 18:35:02 +0000 (20:35 +0200)]
lib-storage: Add PID to the default log prefix
Aki Tuomi [Tue, 16 Feb 2021 11:39:02 +0000 (13:39 +0200)]
doc/example: 10-metrics.conf - Add metrics related settings
Aki Tuomi [Tue, 16 Feb 2021 11:25:40 +0000 (13:25 +0200)]
doc/eaxmple: 10-logging.conf - Update syntax example to point to online documentation
Timo Sirainen [Thu, 18 Feb 2021 16:58:29 +0000 (18:58 +0200)]
lib: event_get_last_duration() - Change it to return uintmax_t
It can't be negative, so unsigned return value makes more sense.
Also clarify the function comment and parameter name.
Siavash Tavakoli [Thu, 18 Feb 2021 16:25:50 +0000 (16:25 +0000)]
stats: openmetrics: Do microsecond to seconds conversion only for duration values
Other metrics should be exported with their values unchanged.
Martin Michaelis [Tue, 16 Feb 2021 20:06:50 +0000 (21:06 +0100)]
stats: openmentrics: Change histogram bucket unit to seconds
In
ae678116a79fff609cdf4fb1eb7eb3db2975bf1c the unit of durations was changed
from microseconds to seconds, but the `le` field in histograms is still in
microseconds.
Siavash Tavakoli [Thu, 18 Feb 2021 21:39:09 +0000 (21:39 +0000)]
stats: refactor duration field name into a macro
Timo Sirainen [Tue, 16 Feb 2021 13:39:24 +0000 (15:39 +0200)]
lib-master: If config reading via doveconf exec fails, show details in the error
Timo Sirainen [Tue, 16 Feb 2021 13:38:36 +0000 (15:38 +0200)]
lib-master: Reset master_service.config_path_from_master if -c parameter is used
This doesn't fix anything currently, but clarifies the behavior and
is needed by the following commit.
Stephan Bosch [Fri, 4 Jan 2019 08:57:37 +0000 (09:57 +0100)]
plugins: fts-solr: Use a private HTTP client.
This is a workaround for problems with the http_client_request_send_payload()
API that occur when several shared HTTP clients use this API at the same time
and payload sending gets interleaved.
Stephan Bosch [Fri, 4 Jan 2019 08:55:20 +0000 (09:55 +0100)]
plugins: fts: tika: Use a private HTTP client.
This is a workaround for problems with the http_client_request_send_payload()
API that occur when several shared HTTP clients use this API at the same time
and payload sending gets interleaved.
Timo Sirainen [Wed, 17 Feb 2021 11:18:55 +0000 (13:18 +0200)]
lib: test-cpu-limit - Increase ALLOW_MSECS_BELOW to 500ms
The test still randomly failed with 100ms. Maybe 500ms is enough?
Timo Sirainen [Wed, 17 Feb 2021 11:18:38 +0000 (13:18 +0200)]
lib: test-cpu-limit - Use test_assert_cmp()
Timo Sirainen [Thu, 18 Feb 2021 12:23:50 +0000 (14:23 +0200)]
lib-test: Add test_assert_ucmp[_idx]()
These are the unsigned versions of test_assert_cmp*()
Timo Sirainen [Wed, 17 Feb 2021 11:17:43 +0000 (13:17 +0200)]
lib-test: Add test_assert_cmp[_idx]()
Similar to test_assert_strcmp() but for numbers: If the comparison fails,
print the values and the used operator.
Markus Valentin [Wed, 17 Feb 2021 10:49:44 +0000 (11:49 +0100)]
acl: acl_lookup_dict_rebuild_update()
Initialize dict_transaction_context *dt with NULL. Due to the changes
done in
bfa7433bfcf538af7c4fdafe37a88bde6508c751 dt could be used
uninitialized.
Timo Sirainen [Tue, 16 Feb 2021 23:02:34 +0000 (01:02 +0200)]
Makefile.am: Don't delete dovecot.socket in make clean
Broken by
0650928f3e3728911d6bcea4daf743df02ec1b3d
Michael M Slusarz [Tue, 22 Dec 2020 04:02:23 +0000 (21:02 -0700)]
imap: Fix PREVIEW behavior to support RFC 8970
Timo Sirainen [Wed, 17 Feb 2021 12:40:06 +0000 (14:40 +0200)]
mbox: Fix potentially logging read error when there was no error
Broken by
959385969388b2d4f6d3d0218fa175481cb46c8a
Timo Sirainen [Wed, 10 Feb 2021 11:13:34 +0000 (13:13 +0200)]
imap: NOTIFY - Fix crash if client disconnects while sending FETCH notification
Fixes:
Panic: Trying to close mailbox INBOX with open transactions
Timo Sirainen [Wed, 3 Feb 2021 15:38:08 +0000 (17:38 +0200)]
doveadm: Avoid duplicate error logging with doveadm_print_istream()
Timo Sirainen [Wed, 3 Feb 2021 15:34:01 +0000 (17:34 +0200)]
lib-compression, global: Remove support for implicit error logging
Timo Sirainen [Wed, 3 Feb 2021 15:04:49 +0000 (17:04 +0200)]
doveadm zlibconnect: Avoid duplicate error logging
The istream errors are already logged with i_fatal(). There's no need for a
duplicate error.
Timo Sirainen [Wed, 3 Feb 2021 15:04:16 +0000 (17:04 +0200)]
doveadm dump -t imapzlib: Explicitly log compress istream errors
Timo Sirainen [Wed, 3 Feb 2021 14:57:30 +0000 (16:57 +0200)]
zlib: Remove extra error logging for istream failures
The error will nowadays be logged as the istream error anyway.
Timo Sirainen [Wed, 3 Feb 2021 15:32:11 +0000 (17:32 +0200)]
mbox: istream-raw-mbox - Log parent istream read errors
Timo Sirainen [Wed, 3 Feb 2021 15:18:18 +0000 (17:18 +0200)]
mbox: Use mbox_ostream_set_syscall_error()
Timo Sirainen [Wed, 3 Feb 2021 15:24:14 +0000 (17:24 +0200)]
mbox: Use mbox_istream_set_syscall_error()
Timo Sirainen [Wed, 3 Feb 2021 15:18:09 +0000 (17:18 +0200)]
mbox: Add mbox_[io]stream_set_syscall_error()
This allows logging the iostream-specific error rather than the more generic
errno.