]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Sat, 21 Apr 2018 11:53:25 +0000 (14:53 +0300)]
lib-mail: message_snippet_generate() - Ignore NULs without shrinking snippet size
Previously the NULs also weren't in the snippet content, but they were
included in the snippet size.
Timo Sirainen [Sat, 21 Apr 2018 11:31:08 +0000 (14:31 +0300)]
lib-storage: Fix truncating header values at NUL when adding to cache
For example FETCH BODY.PEEK[HEADER.FIELDS (Subject)] could have returned
the NUL on the first fetch when the mail wasn't in dovecot.index.cache,
but the second FETCH would have returned it truncated at the NUL.
Timo Sirainen [Sun, 27 May 2018 12:42:26 +0000 (15:42 +0300)]
lib: Fix filtering by event name in log_core_filter
event->sending_name was already cleared by the time it was checked, so any
event:* filters never matched.
Josef 'Jeff' Sipek [Mon, 20 Aug 2018 22:07:30 +0000 (18:07 -0400)]
master: Wait 1 second for SIGQUITs to get handled
The delay (previously 100ms, now 1s) is intended to delay our exit enough so
that the child processes have a chance to receive & handle the SIGQUITs we
just sent. If we don't wait long enough, it is possible that we'll get
restarted before our children had the chance to stop listening on their
sockets and we'll hit "address already in use" type errors.
Increasing the delay does not fix the issue, but it masks it better.
Timo Sirainen [Fri, 18 May 2018 14:04:36 +0000 (17:04 +0300)]
*-login: Fix non-global ssl=no configuration
For example local 127.0.0.2 { ssl=no } wasn't working.
Timo Sirainen [Thu, 28 Jun 2018 08:51:22 +0000 (11:51 +0300)]
dict-file: If write failed, file was left locked
Timo Sirainen [Thu, 28 Jun 2018 08:50:36 +0000 (11:50 +0300)]
dict-file: Fix memory leak when file is recreated during lock wait
Timo Sirainen [Wed, 27 Jun 2018 15:28:23 +0000 (18:28 +0300)]
lda: Deinitialize cleanly if user doesn't exist in userdb
Timo Sirainen [Wed, 27 Jun 2018 15:24:06 +0000 (18:24 +0300)]
lda: Deinitialize cleanly if mail delivery fails
Timo Sirainen [Wed, 27 Jun 2018 15:22:01 +0000 (18:22 +0300)]
lda: Cleanup - move code to lda_deliver() function
No functional changes.
Timo Sirainen [Wed, 27 Jun 2018 15:17:23 +0000 (18:17 +0300)]
lda: Cleanup - reorder code
Makes the next commit cleaner.
Timo Sirainen [Wed, 27 Jun 2018 10:22:03 +0000 (13:22 +0300)]
lib-storage: Fix memory leak in mail_storage_set_internal_error()
Timo Sirainen [Tue, 19 Jun 2018 14:42:55 +0000 (17:42 +0300)]
lib: Fix memory leak at deinit if log_core_filter is set
Timo Sirainen [Wed, 13 Jun 2018 17:09:32 +0000 (20:09 +0300)]
doveadm dump: Fix dumping "vsize" header in dovecot.index
It was trying to print it as the "vsize" header in dovecot.list.index.
This caused confusing output, as well as potentially accessing memory
out of bounds.
Timo Sirainen [Wed, 13 Jun 2018 17:08:08 +0000 (20:08 +0300)]
doveadm log find: Fix memory leak
Timo Sirainen [Wed, 13 Jun 2018 17:07:52 +0000 (20:07 +0300)]
doveadm user: Fix memory leak
Timo Sirainen [Wed, 13 Jun 2018 17:07:28 +0000 (20:07 +0300)]
dsync: Fix memory leak - unreference iostreams at deinit
Only some of the code paths need unreferencing, so also add a reference to
the other code paths.
Timo Sirainen [Wed, 13 Jun 2018 17:06:11 +0000 (20:06 +0300)]
dsync: ibc - reference iostreams internally
This makes it clearer who needs to reference and unreference the streams.
Timo Sirainen [Tue, 12 Jun 2018 21:58:55 +0000 (00:58 +0300)]
lib-master: Allow calling master_service_deinit() without _init_finish()
Timo Sirainen [Tue, 12 Jun 2018 19:05:52 +0000 (22:05 +0300)]
lib: restrict-access: Free chroot_dir at deinit
Timo Sirainen [Tue, 12 Jun 2018 19:05:35 +0000 (22:05 +0300)]
lib: Free global_event_stack array at deinit
Timo Sirainen [Tue, 12 Jun 2018 15:01:21 +0000 (18:01 +0300)]
virtual: Fix memory leak when selecting mailboxes with '-' or /metadata
Timo Sirainen [Tue, 12 Jun 2018 14:23:35 +0000 (17:23 +0300)]
mail-crypt-acl: Fix memory leak when updating ACLs
Timo Sirainen [Tue, 12 Jun 2018 14:08:04 +0000 (17:08 +0300)]
lib-dcrypt, mail-crypt: Fix leaking memory when using non-global keys
The users' private keys had one reference too much. Because of key cache,
most likely the keys were leaked only once at deinit.
Changed the i_stream_create_decrypt_callback() API so that it allows the
callback to create the key itself without having to store it anywhere.
In this case the key was already added to cache, which increased its
refcount. So an alternative fix would have been to simply unreferenced the
key before returning it. It's a bit ugly though to rely on such caches,
since without the cache the code would be buggy.
Timo Sirainen [Tue, 12 Jun 2018 13:56:51 +0000 (16:56 +0300)]
mail-crypt: Fix memory leak in "doveadm mailbox cryptokey generate"
Timo Sirainen [Tue, 12 Jun 2018 13:49:36 +0000 (16:49 +0300)]
lib-smtp: server: Fix memory leak when handling BDAT command
Timo Sirainen [Tue, 12 Jun 2018 13:45:26 +0000 (16:45 +0300)]
imapc: Fix leaking memory when sending imapc commands after authentication failure
Aki Tuomi [Mon, 6 Aug 2018 08:34:35 +0000 (11:34 +0300)]
lib: test-strfuncs - Rename test i_strbegins to str_begins
Matches the real name
Aki Tuomi [Mon, 6 Aug 2018 08:36:41 +0000 (11:36 +0300)]
doveconf: Fix compiler nit
Ensure secret_r cannot be NULL unless none was found.
Aki Tuomi [Tue, 14 Aug 2018 12:25:40 +0000 (15:25 +0300)]
doveconf: Improve secret hiding
Hide with more wide filtering.
Aki Tuomi [Tue, 14 Aug 2018 12:24:56 +0000 (15:24 +0300)]
doveconf: Use key_ends_with to compare suffixes
Fixes key hiding.
Broken in
1518e085
Aki Tuomi [Wed, 1 Aug 2018 05:47:34 +0000 (08:47 +0300)]
doveconf: Do not skip over secrets when hiding them
All candidates for hiding need to be considered, otherwise
it might skip over some of them and leave them unhidden.
Aki Tuomi [Wed, 30 May 2018 11:10:41 +0000 (14:10 +0300)]
doveconf: Hide URL userpart
Aki Tuomi [Tue, 19 Jun 2018 11:26:29 +0000 (14:26 +0300)]
doveconf: Add find_next_secret
Find start of possible next secret, and return
what the found secret was. Makes next commit easier.
Aki Tuomi [Wed, 9 May 2018 07:19:02 +0000 (10:19 +0300)]
config: Fix crash in doveconf -n when hiding sensitive information
Broken by
fc02343f
Aki Tuomi [Wed, 9 May 2018 07:18:39 +0000 (10:18 +0300)]
lib: Add str_append_escaped and use it with str_escape
Timo Sirainen [Thu, 12 Apr 2018 13:07:31 +0000 (16:07 +0300)]
doveconf: Fix infinite loop when hiding sensitive information
For example with "nopassword=y". Broken in
fc02343fd81a6fab272ac0366b15fc60ec44a8b6
Aki Tuomi [Mon, 12 Mar 2018 07:11:53 +0000 (09:11 +0200)]
config: Hide more sensitive information
Hide parts of values where we can see a key that has word
key, secret or pass as prefix and is a key-value pair
separated by =.
Aki Tuomi [Mon, 12 Mar 2018 07:11:14 +0000 (09:11 +0200)]
config: Move sensitive value hiding to own function
Simplifies next change
Aki Tuomi [Sat, 10 Mar 2018 16:20:32 +0000 (18:20 +0200)]
lib: Add str_nescape
For partial escaping
Aki Tuomi [Sat, 10 Mar 2018 15:56:33 +0000 (17:56 +0200)]
lib: Add i_strstr_arr for searching string for multiple needles
Aki Tuomi [Fri, 9 Mar 2018 15:09:28 +0000 (17:09 +0200)]
man: doveconf - Document -P flag
Timo Sirainen [Mon, 28 May 2018 07:32:21 +0000 (10:32 +0300)]
imap: Fix assert-crash when client is disconnected during a long COPY/MOVE
Similar fix than
481992bfe2740bdec70fcd7366dea50ed9128966
Fixes:
Panic: file cmd-copy.c: line 50 (fetch_and_copy): assertion failed: (o_stream_is_corked(client->output))
Phil Carmody [Thu, 14 Dec 2017 22:44:51 +0000 (00:44 +0200)]
lib/data-stack - in panic scenarios, use the panic memory buffer
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Thu, 14 Dec 2017 22:35:39 +0000 (00:35 +0200)]
lib/datastack - remove useless thing
It was useless.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Timo Sirainen [Thu, 21 Jul 2016 14:32:52 +0000 (08:32 -0600)]
lib-storage: Deduplicate headers in struct mailbox_header_lookup_ctx
This might slightly improve performance.
Michael M Slusarz [Tue, 31 Jul 2018 23:40:08 +0000 (17:40 -0600)]
man: Add missing commands to doveadm
Josef 'Jeff' Sipek [Sat, 30 Jun 2018 14:13:10 +0000 (10:13 -0400)]
global: Start relying on event_set_forced_debug(e, FALSE) being a no-op
Converted using the following semantic patch:
@@
expression event;
expression cond;
@@
- if (cond) {
- event_set_forced_debug(event,
(
- TRUE
|
- cond
)
- );
- }
+ event_set_forced_debug(event, cond);
Josef 'Jeff' Sipek [Sat, 30 Jun 2018 14:08:27 +0000 (10:08 -0400)]
lib: Change event_set_forced_debug(e, FALSE) to be a no-op
Josef 'Jeff' Sipek [Sat, 30 Jun 2018 14:06:04 +0000 (10:06 -0400)]
lib: Add event_unset_forced_debug()
Timo Sirainen [Wed, 27 Jun 2018 14:16:24 +0000 (17:16 +0300)]
lib-storage: Initialize reset_id in index_index_copy_cache
Makes valgrind happy with clang's optimizations.
Timo Sirainen [Wed, 20 Jun 2018 07:49:46 +0000 (10:49 +0300)]
lmtp, submission: Remove extra spaces from "state = X" in disconnect log line
Other Dovecot log messages don't have spaces in key=value.
Aki Tuomi [Mon, 11 Jun 2018 11:22:38 +0000 (14:22 +0300)]
doveadm-dict: Initialize set variable in cmd_dict_init
Makes valgrind happy with clang's optimizations
Aki Tuomi [Mon, 11 Jun 2018 11:06:20 +0000 (14:06 +0300)]
doveadm-dict: Remove spurious `key =` debug logging
Was added in
42db3821
Timo Sirainen [Tue, 31 Jul 2018 09:40:28 +0000 (12:40 +0300)]
lib-dict-backend: Fix linking order for test-dict-sql
Timo Sirainen [Fri, 25 May 2018 11:44:10 +0000 (14:44 +0300)]
lib-dict-backend: Fix building --with-cdb --without-shared-libs
Timo Sirainen [Tue, 22 May 2018 07:24:33 +0000 (10:24 +0300)]
log: Fix the default prefix
"listen_fd(123): foo" is better than "listen_fd 14foo"
Timo Sirainen [Sun, 20 May 2018 12:56:51 +0000 (15:56 +0300)]
lib-index: fsck: Fix small log offsets to file's correct header size
Use the file's actual current header size, not
MAIL_TRANSACTION_LOG_HEADER_MIN_SIZE, which is nowadays smaller. This
resulted in unnecessary errors like:
Corrupted transaction log file ...: Invalid min_file_offset: ..., min_file_offset (24) < hdr_size (40)
Timo Sirainen [Sun, 20 May 2018 12:55:03 +0000 (15:55 +0300)]
lib-index: fsck: Don't change log_file_tail_offset=0
Timo Sirainen [Sun, 22 Apr 2018 10:11:16 +0000 (13:11 +0300)]
imap-hibernate: Log error when connect(imap-master) fails
It was previously logged only with info-level.
Timo Sirainen [Sun, 20 May 2018 22:30:36 +0000 (01:30 +0300)]
lib-index: Remove #if'ed out code
Originally added by
0b2d4626c6fb4e40bc81c56d8227191f3c7e1ea3 . Possibly
accidentally.
Martti Rannanjärvi [Wed, 27 Jun 2018 21:34:14 +0000 (00:34 +0300)]
indexer: Don't log error when getting path to nonexistent mailbox fails
Martti Rannanjärvi [Wed, 27 Jun 2018 21:05:26 +0000 (00:05 +0300)]
indexer: Don't log mailbox was deleted under us error
Martti Rannanjärvi [Wed, 27 Jun 2018 20:58:11 +0000 (23:58 +0300)]
indexer: Don't log error when mailbox was not found
Martti Rannanjärvi [Wed, 27 Jun 2018 14:19:38 +0000 (17:19 +0300)]
fts-solr: Properly URL encode quotes for empty string
Invalid URL encoding of empty string made Solr server give 400 Bad
Request HTTP responses for searches like SEARCH HEADER FROM "".
Martti Rannanjärvi [Wed, 27 Jun 2018 14:27:15 +0000 (17:27 +0300)]
fts-solr: Fix default_ns parameter parsing
This version makes it possible to specify a value to the setting as
well.
Martti Rannanjärvi [Tue, 26 Jun 2018 09:38:50 +0000 (12:38 +0300)]
fts-solr: Append '/' to URL path when missing in configuration
This fixes a crash when url parameter has empty path like
http://localhost:8080 instead of http://localhost:8080/ and makes using
url like http://localhost:8080/solr behave the same as
http://localhost:8080/solr/
Aki Tuomi [Tue, 31 Jul 2018 05:45:29 +0000 (08:45 +0300)]
lib-master: Copy ssl_curve_list setting
Otherwise it won't get used.
Broken in
30dca95419
Aki Tuomi [Tue, 31 Jul 2018 09:26:35 +0000 (12:26 +0300)]
lib-ssl-iostream: Remove unused DH members
These are not being used anywhere.
Aki Tuomi [Mon, 30 Jul 2018 17:26:19 +0000 (20:26 +0300)]
lib-ssl-iostream: Make DH parameters optional
Since a lot of connections use elliptic curve
Diffie-Hellman these days, make it possible to
use dovecot without providing Diffie-Hellman
parameters. This reduces setup cost as the
parameters do not need to be generated, which
can be a time consuming task.
Timo Sirainen [Mon, 9 Jul 2018 08:39:59 +0000 (11:39 +0300)]
m4, quota: Support rquota using libtirpc
Timo Sirainen [Mon, 9 Jul 2018 08:33:23 +0000 (11:33 +0300)]
m4: Enable rquota only if rpc/rpc.h exists
It's been removed in glibc 2.26
Aki Tuomi [Wed, 27 Jun 2018 06:10:39 +0000 (09:10 +0300)]
lib-ssl-iostream: Turn on SSL_OP_SINGLE_DH_USE
Improves forward secrecy in case a DH cipher is used.
Timo Sirainen [Wed, 13 Jun 2018 14:26:57 +0000 (17:26 +0300)]
lib: Assert-crash if duplicate event categories are tried to be registered
Stephan Bosch [Thu, 21 Jun 2018 20:55:50 +0000 (22:55 +0200)]
lib-smtp: server: data command: Hold a reference to the connection while handling input.
Makes sure connection object remains available while command is handled. Fixes a
valgrind error reported for accessing the connection object after it is freed,
which happens for the destroy debug message of the command (even when debugging
is not enabled).
Stephan Bosch [Thu, 21 Jun 2018 20:51:26 +0000 (22:51 +0200)]
lib-smtp: server: data command: Dereference command at single place during input handling.
Aki Tuomi [Tue, 26 Jun 2018 10:18:20 +0000 (13:18 +0300)]
lib-storage: Turn on debug early if MAIL_STORAGE_SERVICE_FLAG_DEBUG set
Aki Tuomi [Tue, 26 Jun 2018 10:22:20 +0000 (13:22 +0300)]
lib-storage: Use provided flags in mail_storage_service_first_init
Aki Tuomi [Tue, 26 Jun 2018 10:18:00 +0000 (13:18 +0300)]
lib-storage: Fix MAIL_STORAGE_SERVICE_FLAG_DEBUG work again
Sergey Kitov [Wed, 23 May 2018 11:39:44 +0000 (14:39 +0300)]
auth: pass overriden auth_debug setting to auth process
Sergey Kitov [Tue, 20 Mar 2018 09:22:43 +0000 (11:22 +0200)]
lib-storage: Replace "if(mail_debug)" with "if(event_want_debug_log)"
Sergey Kitov [Tue, 20 Mar 2018 09:20:44 +0000 (11:20 +0200)]
plugins: replace "if(mail_debug){i_debug}" with "e_debug"
Sergey Kitov [Tue, 20 Mar 2018 09:05:13 +0000 (11:05 +0200)]
lib-storage: Replace "if(mail_debug){i_debug}" "e_debug"
Sergey Kitov [Thu, 24 May 2018 12:18:30 +0000 (15:18 +0300)]
lib-storage: Force mail_storage_service_user event debug when mail_debug=yes
Sergey Kitov [Tue, 20 Mar 2018 08:51:21 +0000 (10:51 +0200)]
lda & lib-lda: "if(mail_debug){i_debug}" with "e_debug"
Sergey Kitov [Tue, 20 Mar 2018 08:49:08 +0000 (10:49 +0200)]
indexer: Replace "if(mail_debug){i_debug}" with "e_debug"
Sergey Kitov [Tue, 20 Mar 2018 08:46:19 +0000 (10:46 +0200)]
imap: Replace "if(mail_debug){i_debug}" with "e_debug"
Sergey Kitov [Tue, 20 Mar 2018 08:17:27 +0000 (10:17 +0200)]
lib-imap-urlauth & imap-urlauth: replace "if(mail_debug){i_debug}" with "e_debug(client->event)"
Sergey Kitov [Tue, 20 Mar 2018 07:52:38 +0000 (09:52 +0200)]
imap-urlauth: Add event with "imap-urlauth" category to struct client of imap-urlauth
Sergey Kitov [Tue, 20 Mar 2018 07:05:26 +0000 (09:05 +0200)]
global: Replace check for auth_debug with event_want_debug_log in doveadm-auth::auth_connected()
These functions will create event with "auth" category and unref it in
the end.
Sergey Kitov [Mon, 19 Mar 2018 14:10:49 +0000 (16:10 +0200)]
global: Replace "if(auth_debug){i_debug(...)}" with e_debug(event, ...)
event is one of: global auth::auth_event,
auth_client_connection->event, auth_request->event,
login-common::event_auth. These event have category "auth".
Sergey Kitov [Mon, 19 Mar 2018 12:50:31 +0000 (14:50 +0200)]
global: Remove unnecessary checks for mail_debug and auth_request->debug
These checks are performed before calling auth_request_log_debug() and
push_notification_driver_debug(), while the same checks are performed
inside of these functions, and they return without doing anything.
Sergey Kitov [Mon, 19 Mar 2018 11:53:33 +0000 (13:53 +0200)]
auth: Add event with category "auth" to struct auth_request.
Sergey Kitov [Mon, 19 Mar 2018 10:16:23 +0000 (12:16 +0200)]
auth: Add event with category "auth" to struct auth_client_connection.
Sergey Kitov [Mon, 19 Mar 2018 09:44:59 +0000 (11:44 +0200)]
login-common: Add global event_auth with "auth" category.
Sergey Kitov [Mon, 19 Mar 2018 09:20:58 +0000 (11:20 +0200)]
lib: Add event_want_debug and event_want_debug_log macros
Sergey Kitov [Mon, 19 Mar 2018 09:14:22 +0000 (11:14 +0200)]
auth: Add global auth_event with category "auth".
Michael Slusarz [Fri, 25 May 2018 03:43:42 +0000 (21:43 -0600)]
push-notification: Add SSL support for OX driver
Michael M Slusarz [Tue, 31 Jul 2018 22:32:48 +0000 (16:32 -0600)]
config: generation of clean config should copy sensitive data
Add -P parameter to the CLI warning doveconf example
Phil Carmody [Fri, 11 May 2018 06:19:21 +0000 (09:19 +0300)]
lib: bits - macros to simplify expressions when using -Wstrict-bool
To be strict-bool compliant, your expressions need to be a bit verbose,
these might simplify things.
There are presently over 400 instances matching HAS_NO_BITS(), and nearly
1300 instances matching HAS_ANY_BITS(), so it's a very common pattern.
Signed-off-by: Phil Carmody <phil@dovecot.fi>