]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
4 years agom4: want_lua - Check for lua_isinteger
Josef 'Jeff' Sipek [Thu, 4 Mar 2021 21:16:53 +0000 (16:16 -0500)] 
m4: want_lua - Check for lua_isinteger

4 years agolib-lua: Implement a Lua 5.1 compatibility wrapper for lua_tointegerx
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

4 years agom4: want_lua - Check for lua_tointegerx
Josef 'Jeff' Sipek [Thu, 4 Mar 2021 20:31:29 +0000 (15:31 -0500)] 
m4: want_lua - Check for lua_tointegerx

4 years agolib-smtp: test-smtp-client-errors - Amend early data reply test to verify that connec...
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.

4 years agolib-smtp: smtp-client-connection - Hold reference to command that is sending a stream.
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)

4 years agolib-smtp: smtp-client-command - Make smtp_client_command_unref() return TRUE when...
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.

4 years agolib-smtp: smtp-client-command - Make smtp_client_command_unref(NULL) a no-op.
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.

4 years agoimap: Fix logging garbage if imap-hibernate sends invalid VERSION
Timo Sirainen [Sat, 6 Mar 2021 15:58:53 +0000 (17:58 +0200)] 
imap: Fix logging garbage if imap-hibernate sends invalid VERSION

4 years agolib-mail: mail-html2text - Fix character signedness type mismatch
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)

4 years agofts-tika: Don't fail indexing if Tika returns 5xx error
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.

4 years agopop3: Change IO context earlier while shutting down
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.

4 years agoimap: Fix using mail_log_prefix is used when client disconnects during server shutdown
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

4 years agosubmission: Fix using mail_log_prefix when client is disconnected due to 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

4 years agodict-sql: Add more comments
Timo Sirainen [Fri, 26 Feb 2021 14:10:18 +0000 (16:10 +0200)] 
dict-sql: Add more comments

4 years agodict-sql: Rename [extra_]values to pattern_values
Timo Sirainen [Fri, 26 Feb 2021 14:05:47 +0000 (16:05 +0200)] 
dict-sql: Rename [extra_]values to pattern_values

4 years agodict-sql: Rename dict_sql_map.max_field_count to max_pattern_fields_count
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

4 years agodict-sql: Rename dict_sql_map.sql_fields to pattern_fields
Timo Sirainen [Fri, 26 Feb 2021 14:02:05 +0000 (16:02 +0200)] 
dict-sql: Rename dict_sql_map.sql_fields to pattern_fields

4 years agodict-sql: Change char key1 to bool add_username
Timo Sirainen [Fri, 26 Feb 2021 13:40:41 +0000 (15:40 +0200)] 
dict-sql: Change char key1 to bool add_username

4 years agodict-sql: Simplify sql_dict_maps_are_mergeable() and add comments
Timo Sirainen [Fri, 26 Feb 2021 13:32:48 +0000 (15:32 +0200)] 
dict-sql: Simplify sql_dict_maps_are_mergeable() and add comments

4 years agolib: test-array - Use i_strcmp_p() instead of reimplementing it
Timo Sirainen [Fri, 26 Feb 2021 13:29:02 +0000 (15:29 +0200)] 
lib: test-array - Use i_strcmp_p() instead of reimplementing it

4 years agodict-sql: Simplify set/inc flushing
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.

4 years agodict-sql: Support merging multiple atomic_inc fields
Timo Sirainen [Thu, 25 Feb 2021 15:54:26 +0000 (17:54 +0200)] 
dict-sql: Support merging multiple atomic_inc fields

4 years agodict-sql: Support merging multiple set fields
Timo Sirainen [Thu, 25 Feb 2021 15:40:22 +0000 (17:40 +0200)] 
dict-sql: Support merging multiple set fields

4 years agodict-sql: Keep trying to merge INSERT/UPDATE always to the previous key
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.

4 years agodict-sql: Move prev_set_* and prev_inc_* to struct sql_dict_prev
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

4 years agolib-sql: driver-test - Use test_assert_strcmp()
Timo Sirainen [Thu, 25 Feb 2021 13:50:45 +0000 (15:50 +0200)] 
lib-sql: driver-test - Use test_assert_strcmp()

4 years agolib-dict-backend: test-dict-sql - 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*()

4 years agolib-fs: Add type safety to fs_file/iter_set_async_callback() callback context
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

4 years agolib-dict, global: Add type safety to dict_transaction_commit_async() 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

4 years agolib-dict, quota: Add and use dict_transaction_commit_async_nocallback()
Timo Sirainen [Tue, 23 Feb 2021 09:16:50 +0000 (11:16 +0200)] 
lib-dict, quota: Add and use dict_transaction_commit_async_nocallback()

4 years agolib-dict, global: Add type safety to dict_iterate_set_async_callback() callback context
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

4 years agolib-dict, global: Add type safety to dict_lookup_async() 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

4 years agoconfigure: Remove useless checks for luajit 155/head
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.

4 years agoglobal: dict_iterate_deinit(NULL) is a no-op
Josef 'Jeff' Sipek [Mon, 22 Feb 2021 22:44:03 +0000 (17:44 -0500)] 
global: dict_iterate_deinit(NULL) is a no-op

4 years agolib-dict: Make dict_iterate_deinit(NULL) 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

4 years agoglobal: dict_transaction_rollback(NULL) is 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

4 years agolib-dict: Make dict_transaction_rollback(NULL) 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

4 years agofts: Replace generic "transaction context" error with more specific ones
Timo Sirainen [Thu, 4 Feb 2021 16:25:13 +0000 (18:25 +0200)] 
fts: Replace generic "transaction context" error with more specific ones

4 years agofts: Fix mail_precache() and related error handling
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.

4 years agofts: Use storage error logging when possible
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.

4 years agolib-fts, fts: fts_language_detect() - Return error string instead of logging it
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

4 years agoindexer: Include "attempted to index ... messages" also in all error messages
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.

4 years agoglobal: Handle mail_precache() errors
Timo Sirainen [Thu, 4 Feb 2021 16:07:45 +0000 (18:07 +0200)] 
global: Handle mail_precache() errors

4 years agolib-storage: Change mail_precache() API to allow returning an error
Timo Sirainen [Thu, 4 Feb 2021 16:05:39 +0000 (18:05 +0200)] 
lib-storage: Change mail_precache() API to allow returning an error

4 years agoMakefile: Always include dovecot.socket and dovecot.service
Aki Tuomi [Tue, 23 Feb 2021 14:32:39 +0000 (16:32 +0200)] 
Makefile: Always include dovecot.socket and dovecot.service

4 years agolib-master: Always import systemd related variables with systemd
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.

4 years agomaster: Improve systemd integration
Aki Tuomi [Mon, 22 Feb 2021 14:14:14 +0000 (16:14 +0200)] 
master: Improve systemd integration

4 years agomaster: Use libsystemd instead of local source
Aki Tuomi [Mon, 22 Feb 2021 13:29:48 +0000 (15:29 +0200)] 
master: Use libsystemd instead of local source

4 years agomaster: service-listen - Use dovecot coding standard for systemd code
Aki Tuomi [Tue, 23 Feb 2021 14:08:28 +0000 (16:08 +0200)] 
master: service-listen - Use dovecot coding standard for systemd code

4 years agolib-imap-client: Add asserts to make sure running commands always have a timeout
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

4 years agolib-imap-client: Don't remove global command timeouts when mailbox is unselected
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

4 years agolib-imap-client: Fix busy-loop if server disconnects too early when trying to logout
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.

4 years agolib-mail: message-parser - Always properly finish parsed input
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))

4 years agolib: io_loop_context_new() - Fix memory leak
Timo Sirainen [Mon, 1 Mar 2021 10:03:45 +0000 (12:03 +0200)] 
lib: io_loop_context_new() - Fix memory leak

Broken by fea09a415cf89223d8b17c5982257c9b3c357cbc

4 years agologin-common: Fix implicit integer conversions when connect timeout is reached
Timo Sirainen [Thu, 18 Feb 2021 12:43:06 +0000 (14:43 +0200)] 
login-common: Fix implicit integer conversions when connect timeout is reached

4 years agolmtp: Fix log prefix when autoexpunge is running
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.

4 years agolib: io_loop_context_new() no longer implicitly activates the context
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.

4 years agolib-storage: Replace i_error() and i_warning() with e_error() and e_warning()
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.

4 years agolib-storage: test-mailbox-list - Initialize namespace, user and event
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.

4 years agolib-storage: mail-duplicate - Replace i_error() with e_error()
Timo Sirainen [Wed, 17 Feb 2021 17:28:03 +0000 (19:28 +0200)] 
lib-storage: mail-duplicate - Replace i_error() with e_error()

4 years agolib-storage: Add functions to get log prefixes
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.

4 years agolib-storage: Initialize service_user's logging before creating ioloop context
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.

4 years agolib-storage: Add PID to the default log prefix
Timo Sirainen [Wed, 3 Feb 2021 18:35:02 +0000 (20:35 +0200)] 
lib-storage: Add PID to the default log prefix

4 years agodoc/example: 10-metrics.conf - Add metrics related settings
Aki Tuomi [Tue, 16 Feb 2021 11:39:02 +0000 (13:39 +0200)] 
doc/example: 10-metrics.conf - Add metrics related settings

4 years agodoc/eaxmple: 10-logging.conf - Update syntax example to point to online documentation
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

4 years agolib: event_get_last_duration() - Change it to return uintmax_t
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.

4 years agostats: openmetrics: Do microsecond to seconds conversion only for duration values
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.

4 years agostats: openmentrics: Change histogram bucket unit to seconds
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.

4 years agostats: refactor duration field name into a macro
Siavash Tavakoli [Thu, 18 Feb 2021 21:39:09 +0000 (21:39 +0000)] 
stats: refactor duration field name into a macro

4 years agolib-master: If config reading via doveconf exec fails, show details in the error
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

4 years agolib-master: Reset master_service.config_path_from_master if -c parameter is used
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.

4 years agoplugins: fts-solr: Use a private HTTP client.
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.

4 years agoplugins: fts: tika: Use a private HTTP client.
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.

4 years agolib: test-cpu-limit - Increase ALLOW_MSECS_BELOW to 500ms
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?

4 years agolib: test-cpu-limit - Use test_assert_cmp()
Timo Sirainen [Wed, 17 Feb 2021 11:18:38 +0000 (13:18 +0200)] 
lib: test-cpu-limit - Use test_assert_cmp()

4 years agolib-test: Add test_assert_ucmp[_idx]()
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*()

4 years agolib-test: Add test_assert_cmp[_idx]()
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.

4 years agoacl: acl_lookup_dict_rebuild_update()
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.

4 years agoMakefile.am: Don't delete dovecot.socket in make clean
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

4 years agoimap: Fix PREVIEW behavior to support RFC 8970
Michael M Slusarz [Tue, 22 Dec 2020 04:02:23 +0000 (21:02 -0700)] 
imap: Fix PREVIEW behavior to support RFC 8970

4 years agombox: Fix potentially logging read error when there was no error
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

4 years agoimap: NOTIFY - Fix crash if client disconnects while sending FETCH notification
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

4 years agodoveadm: Avoid duplicate error logging with doveadm_print_istream()
Timo Sirainen [Wed, 3 Feb 2021 15:38:08 +0000 (17:38 +0200)] 
doveadm: Avoid duplicate error logging with doveadm_print_istream()

4 years agolib-compression, global: Remove support for implicit error logging
Timo Sirainen [Wed, 3 Feb 2021 15:34:01 +0000 (17:34 +0200)] 
lib-compression, global: Remove support for implicit error logging

4 years agodoveadm zlibconnect: Avoid duplicate 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.

4 years agodoveadm dump -t imapzlib: Explicitly log compress istream errors
Timo Sirainen [Wed, 3 Feb 2021 15:04:16 +0000 (17:04 +0200)] 
doveadm dump -t imapzlib: Explicitly log compress istream errors

4 years agozlib: Remove extra error logging for istream failures
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.

4 years agombox: istream-raw-mbox - Log parent istream read errors
Timo Sirainen [Wed, 3 Feb 2021 15:32:11 +0000 (17:32 +0200)] 
mbox: istream-raw-mbox - Log parent istream read errors

4 years agombox: Use mbox_ostream_set_syscall_error()
Timo Sirainen [Wed, 3 Feb 2021 15:18:18 +0000 (17:18 +0200)] 
mbox: Use mbox_ostream_set_syscall_error()

4 years agombox: Use mbox_istream_set_syscall_error()
Timo Sirainen [Wed, 3 Feb 2021 15:24:14 +0000 (17:24 +0200)] 
mbox: Use mbox_istream_set_syscall_error()

4 years agombox: Add mbox_[io]stream_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.

4 years agolib-master: Fix haproxy PROXY protocol LOCAL type connection behavior when header...
Alex/AT [Thu, 23 Apr 2020 12:26:22 +0000 (15:26 +0300)] 
lib-master: Fix haproxy PROXY protocol LOCAL type connection behavior when header includes address information or TLVs

PROXY protocol LOCAL type headers can actually include supplementary
information (addresses, TLVs) which need to be skipped to correctly handle the
header. Fixes Invalid TLV bug with haproxy 2.0.14 service checks.

More info here: https://github.com/haproxy/haproxy/issues/511
And here: https://www.mail-archive.com/haproxy@formilux.org/msg36890.html

4 years agolib: cpu-limit - Don't round current CPU usage up when checking if rlim_max is reached
Timo Sirainen [Tue, 16 Feb 2021 14:40:35 +0000 (16:40 +0200)] 
lib: cpu-limit - Don't round current CPU usage up when checking if rlim_max is reached

The fatal error could trigger half a second too early.

Also always increase the provided cpu_limit_sec by 1 second to make sure it
won't trigger too early. Although even with this change it can still
trigger a few milliseconds too early for some reason.

4 years agolib: cpu-limit - Allow time comparisons to be more relaxed
Timo Sirainen [Tue, 16 Feb 2021 14:42:54 +0000 (16:42 +0200)] 
lib: cpu-limit - Allow time comparisons to be more relaxed

This should fix random failures.

4 years agolib-storage: Fix assert-crash when parsing binary attachments
Timo Sirainen [Tue, 10 Nov 2020 14:33:41 +0000 (16:33 +0200)] 
lib-storage: Fix assert-crash when parsing binary attachments

EOF may not have been detected in the cur_block istream early enough,
causing the calculation to go wrong. This happened at least with empty
base64 bodies, but could have possibly happened in other situations also.

Fixes:
Panic: file index-mail-binary.c: line 357 (blocks_count_lines): assertion failed: (block_count == 0 || block_idx+1 == block_count)

4 years agoconfig: test-config-parser - Change filename to match .gitignore pattern
Aki Tuomi [Fri, 12 Feb 2021 12:45:39 +0000 (14:45 +0200)] 
config: test-config-parser - Change filename to match .gitignore pattern

4 years agoconfig: test-config-parser - Cleanup input file after test
Aki Tuomi [Fri, 12 Feb 2021 12:32:01 +0000 (14:32 +0200)] 
config: test-config-parser - Cleanup input file after test

4 years agoacl: acl_lookup_dict_rebuild_update() - Commit transaction after each [un]set
Markus Valentin [Mon, 1 Feb 2021 14:38:49 +0000 (15:38 +0100)] 
acl: acl_lookup_dict_rebuild_update() - Commit transaction after each [un]set

When used with Cassandra an error can occur if multiple changes are
included into one transaction: "Multiple changes in transaction not
supported". Prevent these errors by committing every change on it's
own.

4 years agolib-storage: Fix assert-crash in shared namespace if storage has no directories
Timo Sirainen [Tue, 15 Dec 2020 22:13:19 +0000 (00:13 +0200)] 
lib-storage: Fix assert-crash in shared namespace if storage has no directories

This allows using imapc with shared namespaces.

Fixes:
Panic: file mailbox-list.c: line 1419: unreached

4 years agoacl: Add acl_ignore_namespace* settings
Timo Sirainen [Tue, 15 Dec 2020 22:09:32 +0000 (00:09 +0200)] 
acl: Add acl_ignore_namespace* settings

Ignore ACLs entirely for the listed namespaces. For example:

plugin {
  acl_ignore_namespace = virtual/
  acl_ignore_namespace2 = shared/*
}