]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
4 years agostats: Revert the previous OpenMetrics info type revert
Timo Sirainen [Tue, 27 Jul 2021 17:13:24 +0000 (20:13 +0300)] 
stats: Revert the previous OpenMetrics info type revert

The OpenMetrics standard does support "info" type. The original Prometheus
format doesn't support it, but our support is for OpenMetrics. They don't
even have any overlapping types that could be used for this, so the only
other possibility would have been to make this configurable.

Reverts 55a519d18fbbb8435854f1fcf2642b908d6fc074

4 years agosubmission-login: Fix compiling error with some older compilers
Timo Sirainen [Wed, 28 Jul 2021 13:39:59 +0000 (16:39 +0300)] 
submission-login: Fix compiling error with some older compilers

4 years agosubmission-login: submission-proxy - Optionally send XCLIENT LOGIN to backend and...
Stephan Bosch [Sun, 4 Jul 2021 22:37:46 +0000 (00:37 +0200)] 
submission-login: submission-proxy - Optionally send XCLIENT LOGIN to backend and skip authentication.

This behavior is enabled by returning proxy_noauth from passdb.

4 years agologin-common: Add proxy field proxy_noauth.
Stephan Bosch [Sun, 18 Jul 2021 22:29:23 +0000 (00:29 +0200)] 
login-common: Add proxy field proxy_noauth.

4 years agosubmission-login: submission-proxy - Move submission_proxy_success_reply_sent().
Stephan Bosch [Sun, 18 Jul 2021 22:24:32 +0000 (00:24 +0200)] 
submission-login: submission-proxy - Move submission_proxy_success_reply_sent().

4 years agodict: Use the dict name as the log prefix
Timo Sirainen [Tue, 18 May 2021 17:18:45 +0000 (20:18 +0300)] 
dict: Use the dict name as the log prefix

Otherwise if there are multiple dicts it may not be obvious which one is
causing the errors.

4 years agostats: Revert dovecot build information to untyped data
Aki Tuomi [Thu, 22 Jul 2021 08:26:10 +0000 (11:26 +0300)] 
stats: Revert dovecot build information to untyped data

OpenMetrics does not know type 'info', so use 'untyped' instead.

Broken in ae678116a79fff609cdf4fb1eb7eb3db2975bf1c

4 years agolib-storage: mail_cache_*_fields - Check for invalid header names while parsing config
Timo Sirainen [Wed, 21 Jul 2021 15:12:36 +0000 (18:12 +0300)] 
lib-storage: mail_cache_*_fields - Check for invalid header names while parsing config

This way the errors are noticed early on.

4 years agolib-storage: mail_cache_*_fields - Log an error if hdr.<name> isn't valid
Timo Sirainen [Tue, 14 Apr 2020 09:24:50 +0000 (12:24 +0300)] 
lib-storage: mail_cache_*_fields - Log an error if hdr.<name> isn't valid

Mainly verify that it doesn't have accidental UTF-8 characters that aren't
easily visible in text editors.

4 years agolib-mail: Add message_header_name_is_valid()
Timo Sirainen [Sun, 19 Apr 2020 11:03:24 +0000 (14:03 +0300)] 
lib-mail: Add message_header_name_is_valid()

4 years agologin-proxy: Make sure input line isn't freed too early
Timo Sirainen [Thu, 22 Jul 2021 13:38:22 +0000 (16:38 +0300)] 
login-proxy: Make sure input line isn't freed too early

proxy_parse_line() could free the proxy's istream, which frees the line
string. With IMAP the line could have been used as part of the error string
passed to login_proxy_failed(), which can free the istream before using
the string for logging purposes. This could have resulted in logging a
corrupted line or a crash.

Broken by e3134289529cec16ade44cefd0fd26594ae40e30

4 years agolib-test: Make sure child processes exit cleanly with SIGTERM
Timo Sirainen [Fri, 23 Jul 2021 12:45:03 +0000 (14:45 +0200)] 
lib-test: Make sure child processes exit cleanly with SIGTERM

It's normal behavior that the parent process kills the child process with
SIGTERM. This shouldn't result in the child process dying with SIGTERM, but
a clean exit. This was causing http-test-client-errors unit tests to fail
somewhat randomly, especially when running them only with 1 CPU.

4 years agolib-test: Ensure we send signals to regular PIDs only
Aki Tuomi [Wed, 21 Jul 2021 11:06:55 +0000 (14:06 +0300)] 
lib-test: Ensure we send signals to regular PIDs only

4 years agolib-test: Update subprocess list after forking
Aki Tuomi [Wed, 21 Jul 2021 11:05:34 +0000 (14:05 +0300)] 
lib-test: Update subprocess list after forking

Due to a race condition, we could end up killing PID 0 by accident
sometimes.

4 years agolib: random_fill() - Optimize away memmove()
Timo Sirainen [Thu, 22 Jul 2021 08:23:00 +0000 (11:23 +0300)] 
lib: random_fill() - Optimize away memmove()

We just need to track the position of how far the random_next buffer has
been used.

4 years agosubmission-login: submission-proxy - Send XCLIENT data in multiple commands if line...
Stephan Bosch [Sun, 4 Jul 2021 22:36:36 +0000 (00:36 +0200)] 
submission-login: submission-proxy - Send XCLIENT data in multiple commands if line exceeds 512 bytes.

When the proxy talks to non-Dovecot software, failures could occur otherwise. Particularly Postfix will fail.

4 years agosubmission-login: submission-proxy - Send PROTO and HELO XCLIENT fields.
Stephan Bosch [Fri, 18 Jun 2021 22:31:19 +0000 (00:31 +0200)] 
submission-login: submission-proxy - Send PROTO and HELO XCLIENT fields.

4 years agosubmission-login: submission-proxy - Properly send EHLO after XCLIENT.
Stephan Bosch [Fri, 18 Jun 2021 17:32:03 +0000 (19:32 +0200)] 
submission-login: submission-proxy - Properly send EHLO after XCLIENT.

4 years agosubmission-login: submission-proxy - Reorder XCLIENT fields to match lib-smtp client.
Stephan Bosch [Mon, 5 Jul 2021 21:33:51 +0000 (23:33 +0200)] 
submission-login: submission-proxy - Reorder XCLIENT fields to match lib-smtp client.

4 years agosubmission-login: submission-proxy - Handle EHLO reply in a separate function.
Stephan Bosch [Fri, 18 Jun 2021 22:25:02 +0000 (00:25 +0200)] 
submission-login: submission-proxy - Handle EHLO reply in a separate function.

4 years agosubmission-login: submission-proxy - Move sending STARTTLS to separate function.
Stephan Bosch [Fri, 18 Jun 2021 21:58:38 +0000 (23:58 +0200)] 
submission-login: submission-proxy - Move sending STARTTLS to separate function.

4 years agosubmission-login: submission-proxy - Avoid sending empty XCLIENT FORWARD field.
Stephan Bosch [Fri, 18 Jun 2021 17:52:33 +0000 (19:52 +0200)] 
submission-login: submission-proxy - Avoid sending empty XCLIENT FORWARD field.

4 years agosubmission: Separately pass XCLIENT HELO value from pre-login to post-login service.
Stephan Bosch [Fri, 18 Jun 2021 17:31:54 +0000 (19:31 +0200)] 
submission: Separately pass XCLIENT HELO value from pre-login to post-login service.

4 years agosubmission: submission-backend-relay - Use smtp_server_connection_get_proxy_data...
Stephan Bosch [Fri, 18 Jun 2021 15:02:23 +0000 (17:02 +0200)] 
submission: submission-backend-relay - Use smtp_server_connection_get_proxy_data() for composing client settings.

4 years agosubmission: main - Restructure parsing of login input data.
Stephan Bosch [Fri, 18 Jun 2021 15:46:07 +0000 (17:46 +0200)] 
submission: main - Restructure parsing of login input data.

Needed for adding additional fields.

4 years agosubmission-login: client-authenticate - Restructure composition of master_prefix.
Stephan Bosch [Fri, 18 Jun 2021 14:43:55 +0000 (16:43 +0200)] 
submission-login: client-authenticate - Restructure composition of master_prefix.

Needed for later commit.

4 years agolib-smtp: smtp-server-connection - Record proxied EHLO domain separately.
Stephan Bosch [Fri, 18 Jun 2021 17:27:40 +0000 (19:27 +0200)] 
lib-smtp: smtp-server-connection - Record proxied EHLO domain separately.

This prevents it from being overriden by a local EHLO command.

4 years agolib-smtp: smtp-server - Make smtp_server_connection_set_proxy_data() public.
Stephan Bosch [Fri, 18 Jun 2021 17:02:34 +0000 (19:02 +0200)] 
lib-smtp: smtp-server - Make smtp_server_connection_set_proxy_data() public.

4 years agolib-smtp: smtp-server-connection - Use smtp_server_connection_get_proxy_data() for...
Stephan Bosch [Fri, 18 Jun 2021 14:54:51 +0000 (16:54 +0200)] 
lib-smtp: smtp-server-connection - Use smtp_server_connection_get_proxy_data() for the conn_proxy_data_updated() callback.

Removes code duplication.

4 years agolib-smtp: smtp-server-connection - Allow username/ehlo to be set before smtp_server_c...
Stephan Bosch [Fri, 18 Jun 2021 14:52:26 +0000 (16:52 +0200)] 
lib-smtp: smtp-server-connection - Allow username/ehlo to be set before smtp_server_connection_login().

This allows setting the proxy data early.

4 years agolib-smtp: Reformat smtp-server.h.
Stephan Bosch [Fri, 18 Jun 2021 17:25:43 +0000 (19:25 +0200)] 
lib-smtp: Reformat smtp-server.h.

4 years agosubmission: Reformat submission-client.h.
Stephan Bosch [Fri, 18 Jun 2021 14:31:08 +0000 (16:31 +0200)] 
submission: Reformat submission-client.h.

4 years agosubmission: Reformat submission-client.c.
Stephan Bosch [Fri, 18 Jun 2021 14:30:52 +0000 (16:30 +0200)] 
submission: Reformat submission-client.c.

4 years agologin-common: Add support for recording rawlog of connection between proxy and backend.
Stephan Bosch [Wed, 23 Jun 2021 22:19:16 +0000 (00:19 +0200)] 
login-common: Add support for recording rawlog of connection between proxy and backend.

4 years agodoveadm: Mark fs_cmd_help() with ATTR_NORETURN
Timo Sirainen [Wed, 21 Jul 2021 14:14:26 +0000 (17:14 +0300)] 
doveadm: Mark fs_cmd_help() with ATTR_NORETURN

This helps static analyzers understand that the function doesn't return.

4 years agodoveadm: Avoid passing NULL to memcpy() even though zero bytes are copied
Timo Sirainen [Wed, 21 Jul 2021 14:12:05 +0000 (17:12 +0300)] 
doveadm: Avoid passing NULL to memcpy() even though zero bytes are copied

Makes static analyzers happier.

4 years agodoveadm: Remove dead assignment
Timo Sirainen [Mon, 19 Jul 2021 13:38:08 +0000 (16:38 +0300)] 
doveadm: Remove dead assignment

4 years agolib: Use 32 byte buffer for getting randomness
Timo Sirainen [Thu, 22 Apr 2021 08:09:49 +0000 (11:09 +0300)] 
lib: Use 32 byte buffer for getting randomness

This reduces the number of syscalls when small amount of randomness is
requested, like i_rand*() calls using only 4 bytes at a time.

4 years agodoveadm: Remove code related to obsolete doveadm_mail_cmd handling
Timo Sirainen [Thu, 10 Jun 2021 09:16:20 +0000 (12:16 +0300)] 
doveadm: Remove code related to obsolete doveadm_mail_cmd handling

struct doveadm_mail_cmd couldn't be completely removed since v2 mail
commands are still converted to it.

4 years agodoveadm sync/backup/dsync-server: Convert to v2 command
Timo Sirainen [Thu, 10 Jun 2021 09:06:40 +0000 (12:06 +0300)] 
doveadm sync/backup/dsync-server: Convert to v2 command

4 years agodoveadm batch: Convert to v2 command
Timo Sirainen [Thu, 10 Jun 2021 08:51:51 +0000 (11:51 +0300)] 
doveadm batch: Convert to v2 command

4 years agodoveadm: Remove struct doveadm_cmd and related code
Timo Sirainen [Wed, 9 Jun 2021 22:14:14 +0000 (01:14 +0300)] 
doveadm: Remove struct doveadm_cmd and related code

4 years agodoveadm: Remove doveadm_cmd_ver2.old_cmd
Timo Sirainen [Wed, 9 Jun 2021 22:09:34 +0000 (01:09 +0300)] 
doveadm: Remove doveadm_cmd_ver2.old_cmd

4 years agodoveadm proxy: Convert to v2 commands
Timo Sirainen [Wed, 9 Jun 2021 22:08:16 +0000 (01:08 +0300)] 
doveadm proxy: Convert to v2 commands

4 years agodoveadm oldstats: Convert to v2 commands
Timo Sirainen [Wed, 9 Jun 2021 22:03:46 +0000 (01:03 +0300)] 
doveadm oldstats: Convert to v2 commands

4 years agodoveadm stop/reload: Convert to v2 commands
Timo Sirainen [Wed, 9 Jun 2021 21:59:53 +0000 (00:59 +0300)] 
doveadm stop/reload: Convert to v2 commands

4 years agodoveadm fs: Convert to v2 commands
Timo Sirainen [Wed, 9 Jun 2021 21:58:45 +0000 (00:58 +0300)] 
doveadm fs: Convert to v2 commands

4 years agodoveadm auth cache flush: Convert auth-server command to v2
Timo Sirainen [Wed, 9 Jun 2021 21:45:43 +0000 (00:45 +0300)] 
doveadm auth cache flush: Convert auth-server command to v2

4 years agodoveadm auth: Convert to v2 commands
Timo Sirainen [Wed, 9 Jun 2021 21:42:38 +0000 (00:42 +0300)] 
doveadm auth: Convert to v2 commands

4 years agodoveadm instance: Convert to v2 commands
Timo Sirainen [Wed, 9 Jun 2021 21:18:17 +0000 (00:18 +0300)] 
doveadm instance: Convert to v2 commands

4 years agodoveadm log: Convert to v2 commands
Timo Sirainen [Wed, 9 Jun 2021 21:05:28 +0000 (00:05 +0300)] 
doveadm log: Convert to v2 commands

4 years agodoveadm replicator: Convert to v2 commands
Timo Sirainen [Wed, 9 Jun 2021 21:01:00 +0000 (00:01 +0300)] 
doveadm replicator: Convert to v2 commands

4 years agodoveadm config: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 20:48:10 +0000 (23:48 +0300)] 
doveadm config: Convert to v2 command

4 years agodoveadm exec: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 20:45:51 +0000 (23:45 +0300)] 
doveadm exec: Convert to v2 command

4 years agodoveadm: Add CMD_FLAG_NO_UNORDERED_OPTIONS
Timo Sirainen [Thu, 10 Jun 2021 11:23:46 +0000 (14:23 +0300)] 
doveadm: Add CMD_FLAG_NO_UNORDERED_OPTIONS

4 years agodoveadm: Add CMD_FLAG_NO_OPTIONS
Timo Sirainen [Wed, 9 Jun 2021 20:44:29 +0000 (23:44 +0300)] 
doveadm: Add CMD_FLAG_NO_OPTIONS

This allows command to process all parameters, including parameters starting
with "-".

4 years agodoveadm: Split off doveadm_cmd_process_options()
Timo Sirainen [Wed, 9 Jun 2021 20:39:54 +0000 (23:39 +0300)] 
doveadm: Split off doveadm_cmd_process_options()

4 years agodoveadm: Reformat doveadm-cmd.c
Timo Sirainen [Wed, 9 Jun 2021 20:37:19 +0000 (23:37 +0300)] 
doveadm: Reformat doveadm-cmd.c

4 years agodoveadm help: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 20:21:27 +0000 (23:21 +0300)] 
doveadm help: Convert to v2 command

4 years agodoveadm dump: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 20:13:30 +0000 (23:13 +0300)] 
doveadm dump: Convert to v2 command

4 years agodoveadm dump: Change doveadm_cmd_dump.cmd() API to be simpler
Timo Sirainen [Wed, 9 Jun 2021 20:10:08 +0000 (23:10 +0300)] 
doveadm dump: Change doveadm_cmd_dump.cmd() API to be simpler

4 years agodoveadm pw: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 20:02:36 +0000 (23:02 +0300)] 
doveadm pw: Convert to v2 command

4 years agodoveadm mailbox mutf7: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 19:55:55 +0000 (22:55 +0300)] 
doveadm mailbox mutf7: Convert to v2 command

4 years agodoveadm sis deduplicate/find: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 19:47:35 +0000 (22:47 +0300)] 
doveadm sis deduplicate/find: Convert to v2 command

4 years agodoveadm zlibconnect: Convert to v2 command
Timo Sirainen [Wed, 9 Jun 2021 19:42:54 +0000 (22:42 +0300)] 
doveadm zlibconnect: Convert to v2 command

4 years agodoveadm: Code cleanup - Add doveadm_cmdline_commands_ver2[]
Timo Sirainen [Wed, 9 Jun 2021 19:39:55 +0000 (22:39 +0300)] 
doveadm: Code cleanup - Add doveadm_cmdline_commands_ver2[]

4 years agodoveadm: Support building ARRAY type mail command parameters
Timo Sirainen [Thu, 10 Jun 2021 13:56:06 +0000 (16:56 +0300)] 
doveadm: Support building ARRAY type mail command parameters

4 years agodoveadm: Fix building IP/INT64 type mail command parameters
Timo Sirainen [Thu, 10 Jun 2021 13:55:04 +0000 (16:55 +0300)] 
doveadm: Fix building IP/INT64 type mail command parameters

4 years agodoveadm: Split off doveadm_cmd_parse_arg()
Timo Sirainen [Thu, 10 Jun 2021 13:51:58 +0000 (16:51 +0300)] 
doveadm: Split off doveadm_cmd_parse_arg()

4 years agolib: Fix assert-crash when destroying ioloop that has active context
Timo Sirainen [Thu, 3 Dec 2020 17:20:32 +0000 (19:20 +0200)] 
lib: Fix assert-crash when destroying ioloop that has active context

Normally the ioloop shouldn't have an active context at deinit, but it
seems to be possible in some situations. It's not really bad anyway, so
just allow it.

Fixes:
Panic: file ioloop.c: line 928 (io_loop_destroy): assertion failed: (ioloop->cur_ctx == NULL)

4 years agolib-mail: Fix memory leak in istream-header-filter
Timo Sirainen [Mon, 19 Jul 2021 11:56:47 +0000 (14:56 +0300)] 
lib-mail: Fix memory leak in istream-header-filter

Broken by 1c1b77dbf9a548aac788efb76973ce2d0fa6c732

4 years agolib: data-stack - t_try_realloc() - Add missing data_stack_last_buffer_reset() call
Timo Sirainen [Mon, 19 Jul 2021 10:54:24 +0000 (13:54 +0300)] 
lib: data-stack - t_try_realloc() - Add missing data_stack_last_buffer_reset() call

This fixes incorrect "buffer overflow" panics with DEBUG builds.

4 years agolib: data-stack - data_stack_last_buffer_reset(() - Add comments and an assert
Timo Sirainen [Mon, 19 Jul 2021 10:52:58 +0000 (13:52 +0300)] 
lib: data-stack - data_stack_last_buffer_reset(() - Add comments and an assert

This clarifies how the function is expected to work.

4 years agolib-storage: Use escaped name length to calculate truncation margin
Markus Valentin [Mon, 12 Jul 2021 12:26:38 +0000 (14:26 +0200)] 
lib-storage: Use escaped name length to calculate truncation margin

This fixes corruption of mailbox names when the storage_name_escape_char
has been part of the parent folder name.

Broken by 5dd81d83d8d9120ed2a74d5bd2aa62622885b49c

4 years agolib-lua: Fix LIBDICT_LUA variable usage
Aki Tuomi [Mon, 12 Jul 2021 10:40:58 +0000 (13:40 +0300)] 
lib-lua: Fix LIBDICT_LUA variable usage

It needs to be appended to, not set again. Broken by
3d0b7e9bb59e3dc41fd5a4d09832eedea7a92933.

4 years agolib-lua: Only link libdict_lua if it's available
Aki Tuomi [Thu, 8 Jul 2021 09:24:47 +0000 (12:24 +0300)] 
lib-lua: Only link libdict_lua if it's available

4 years agoplugins/fts: Restore fts_indexer_cmd
Aki Tuomi [Thu, 8 Jul 2021 08:10:38 +0000 (11:10 +0300)] 
plugins/fts: Restore fts_indexer_cmd

It was removed in cf114f90e0ba25c18db846ee582e3a130bd52949 and that
broke some FTS plugins.

4 years agolib-dict: Fix linking when building without Lua
Timo Sirainen [Tue, 22 Jun 2021 11:28:34 +0000 (13:28 +0200)] 
lib-dict: Fix linking when building without Lua

Linking didn't work on some non-Linux OSes (non-GNU linkers?)

4 years agolib-compression: istream-zstd - Make sure parent stream error isn't overwritten
Timo Sirainen [Fri, 4 Jun 2021 08:16:53 +0000 (11:16 +0300)] 
lib-compression: istream-zstd - Make sure parent stream error isn't overwritten

This could have happened if the parent istream failed before the zstd header
was read. Practically this didn't happen currently, because the initial
parent stream error was normally already handled by istream-decompress
before istream-zstd was even called.

4 years agolib-compression: istream-zlib - Fix parent stream error handling near EOF
Timo Sirainen [Fri, 4 Jun 2021 08:16:22 +0000 (11:16 +0300)] 
lib-compression: istream-zlib - Fix parent stream error handling near EOF

This happened when gz stream (including trailer) was fully read, but the
final check to see if there is a concatenated gz stream afterwards failed
due to parent istream failure. In this case the error was ignored and
istream returned success, truncating any potential concatenated istream
input. This situation was very unlikely to happen.

4 years agolib-mail: Fix istream-header-filter snapshotting
Timo Sirainen [Thu, 27 May 2021 16:34:50 +0000 (19:34 +0300)] 
lib-mail: Fix istream-header-filter snapshotting

4 years agolib: Add istream_snapshot.free() to allow more complex snapshots
Timo Sirainen [Thu, 17 Jun 2021 16:55:56 +0000 (19:55 +0300)] 
lib: Add istream_snapshot.free() to allow more complex snapshots

4 years agolib-storage: Make use of MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX
Markus Valentin [Tue, 15 Jun 2021 10:21:22 +0000 (12:21 +0200)] 
lib-storage: Make use of MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX

4 years agolib-index: Introduce MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX
Markus Valentin [Tue, 15 Jun 2021 10:19:00 +0000 (12:19 +0200)] 
lib-index: Introduce MAIL_INDEX_VIEW_SYNC_FLAG_2ND_INDEX

This flag is used to make sure secondary views flags-index can work
properly without emitting warnings about inconsistency. If an
inconsistency is encountered fix it by fully syncing.

4 years agoRevert "lib-storage: Always fix inconsistency when syncing private flags index"
Markus Valentin [Tue, 15 Jun 2021 06:59:17 +0000 (08:59 +0200)] 
Revert "lib-storage: Always fix inconsistency when syncing private flags index"

This reverts commit 986d9cbbecffd836d977b6ad956b04e3ca606677.

This is reverted because storing flags on private indexes no longer send
untagged replies.

4 years agoacl: Ignore acls in acl_lookup_dict_rebuild_add_backend if ignore_acls is set
Markus Valentin [Thu, 1 Jul 2021 08:46:05 +0000 (10:46 +0200)] 
acl: Ignore acls in acl_lookup_dict_rebuild_add_backend if ignore_acls is set

In case an namespace has been configured to ignore ACLs also respect
that when acl_lookup_dict_rebuild is called.

Co-Authored-By: Vincent Brillault <vincent.brillault@cern.ch>
4 years agolib-smtp: test-smtp-payload - Set all timeouts to CLIENT_PROGRESS_TIMEOUT.
Stephan Bosch [Tue, 1 Jun 2021 22:40:19 +0000 (00:40 +0200)] 
lib-smtp: test-smtp-payload - Set all timeouts to CLIENT_PROGRESS_TIMEOUT.

This prevents connect and idle timeouts from triggering earlier than the
progress timeout.

4 years agoimap: PREVIEW responses need trailing space
Michael M Slusarz [Tue, 22 Jun 2021 17:52:02 +0000 (11:52 -0600)] 
imap: PREVIEW responses need trailing space

2.3.15 regression

Before 2.3.15, there was this same buggy behavior in error cases; 2.3.15
moved that buggy behavior to the success code path

DOP-2463

4 years agodoveadm-server: Add log prefix to logs written to client
Timo Sirainen [Mon, 14 Jun 2021 20:46:48 +0000 (23:46 +0300)] 
doveadm-server: Add log prefix to logs written to client

4 years agodoveadm-server: Simplify writing log output to client
Timo Sirainen [Mon, 14 Jun 2021 20:43:11 +0000 (23:43 +0300)] 
doveadm-server: Simplify writing log output to client

4 years agolib: Fix log prefix in internal handler when log handler has been overridden
Timo Sirainen [Mon, 14 Jun 2021 18:14:13 +0000 (20:14 +0200)] 
lib: Fix log prefix in internal handler when log handler has been overridden

Adds back mail_log_prefix to doveadm mail commands when doveadm-server was
accessed via TCP.

Originally broken by c9dd53f7180a78668cbc1e6eb34d5b1722beccb9

4 years agodict-file: Make sure home_dir doesn't change during operations
Siavash Tavakoli [Fri, 4 Jun 2021 22:00:21 +0000 (23:00 +0100)] 
dict-file: Make sure home_dir doesn't change during operations

file_dict is initialized for a specific user. Keep record of the user's
home_dir and check for all dict operations that the user did not change.

4 years agoglobal: Remove dict_settings.home_dir
Siavash Tavakoli [Wed, 2 Jun 2021 15:17:22 +0000 (16:17 +0100)] 
global: Remove dict_settings.home_dir

Allows dict to be shared across users. Dict operations use
dict_op_settings.home_dir if set.

4 years agodict: Split protocol command arguments in dict_command_input()
Siavash Tavakoli [Wed, 26 May 2021 14:18:20 +0000 (15:18 +0100)] 
dict: Split protocol command arguments in dict_command_input()

Instead of duplicating code and splitting in each command functions
separately.

4 years agolib-dict: Make sure username is valid as well when checking key prefix
Siavash Tavakoli [Wed, 26 May 2021 00:41:51 +0000 (01:41 +0100)] 
lib-dict: Make sure username is valid as well when checking key prefix

If this is a private key, username must be non-empty.

4 years agodict: Remove dict_connection.username and dict_settings.username
Siavash Tavakoli [Mon, 24 May 2021 11:54:58 +0000 (12:54 +0100)] 
dict: Remove dict_connection.username and dict_settings.username

- dict should be user agnostic. dict operations have username.
- same for dict connection
- also removes username from dict process' log prefix

4 years agodict: Add username field for command events
Siavash Tavakoli [Thu, 3 Jun 2021 18:59:23 +0000 (19:59 +0100)] 
dict: Add username field for command events

To prepare for connection username removal in next commit. Instead of
adding username field for the parent event, add it in command events.

Commands can now be run for different users. Having the same username
field as the one used in initialization can be wrong.

4 years agodict-client: Do not send username in initial handshake
Siavash Tavakoli [Mon, 24 May 2021 10:47:15 +0000 (11:47 +0100)] 
dict-client: Do not send username in initial handshake

Dict commands that need username have it included in their arguments now.

4 years agodict-fs: Remove unused fs_dict.username
Siavash Tavakoli [Mon, 24 May 2021 10:58:44 +0000 (11:58 +0100)] 
dict-fs: Remove unused fs_dict.username

4 years agodict-redis: Remove unused redis_dict.username
Siavash Tavakoli [Mon, 24 May 2021 10:58:02 +0000 (11:58 +0100)] 
dict-redis: Remove unused redis_dict.username