]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Danny Al-Gaaf [Wed, 30 May 2018 09:16:04 +0000 (11:16 +0200)]
str_data(): cast return to correct type to fix include in c++ code
/usr/include/dovecot/str.h: In function ‘const unsigned char* str_data(const string_t*)’:
/usr/include/dovecot/str.h:22:14: warning: invalid conversion from ‘const void*’ to ‘const unsigned char*’ [-fpermissive]
return str->data;
~~~~~^~~~
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Timo Sirainen [Fri, 8 Jun 2018 20:17:04 +0000 (23:17 +0300)]
lib: istream-try - Don't assert-crash with empty parent istream
Fixes:
Panic: file istream.c: line 327 (i_stream_read_memarea): assertion failed: (stream->eof)
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
Timo Sirainen [Tue, 12 Jun 2018 13:07:25 +0000 (16:07 +0300)]
lib-storage: Fix memory leak when mail_storage_service_next() is called multiple times
dsync uses it twice for the same mail_storage_service_user.
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 [Thu, 7 Jun 2018 11:20:33 +0000 (14:20 +0300)]
imap: Finish client ostream at disconnect
With IMAP COMPRESS this sends the EOF marker, indicating cleanly closed
connection.
Timo Sirainen [Fri, 8 Jun 2018 16:56:01 +0000 (19:56 +0300)]
doveadm: Fix compiler warning
Timo Sirainen [Tue, 5 Jun 2018 17:28:45 +0000 (20:28 +0300)]
doveadm: Simplify destroying ioloop using o_stream_switch_ioloop_to()
Timo Sirainen [Tue, 5 Jun 2018 17:23:52 +0000 (20:23 +0300)]
doveadm-server: Fix hang when sending a lot of output to clients
Nowadays ostream adds its io to the stream's specified ioloop, not to
current ioloop.
Timo Sirainen [Tue, 5 Jun 2018 10:57:26 +0000 (13:57 +0300)]
lib-compression: Use i_stream_nonseekable_try_seek() instead of reimplementing it
Timo Sirainen [Tue, 5 Jun 2018 10:53:51 +0000 (13:53 +0300)]
lib-compression: Use i_stream_default_stat() instead of reimplementing it
Timo Sirainen [Tue, 5 Jun 2018 11:22:08 +0000 (14:22 +0300)]
lib-compression: deflate ostream - Use Z_FINISH on final flush
Nowadays we have o_stream_finish(), so we can differentiate between
intermediate flush and final flush. Using this allows istream-zlib to
cleanly see that the stream ends.
Timo Sirainen [Tue, 5 Jun 2018 10:34:47 +0000 (13:34 +0300)]
lib: i_stream_default_stat() - Get seekable streams' sizes by reading the stream
After the stream size is found, seek back to original offset.
Timo Sirainen [Tue, 5 Jun 2018 10:34:02 +0000 (13:34 +0300)]
lib-dcrypt: istream-decrypt - Add support for seeking
Timo Sirainen [Tue, 5 Jun 2018 10:25:30 +0000 (13:25 +0300)]
lib: Add i_stream_nonseekable_try_seek()
This can be used by istreams to more easily implement seeking backwards when
it has to be done by first seeking back to offset 0 and reading from there.
Aki Tuomi [Mon, 28 May 2018 09:57:03 +0000 (12:57 +0300)]
quota-clone: Fix CONTEXT_REQUIRE use
Fixes Panic: Module context quota_clone_user_module missing
Broken in
7f7e7c16d956de8e92376a0633ca6e4cb85e8d84
Timo Sirainen [Mon, 4 Jun 2018 16:16:04 +0000 (19:16 +0300)]
lib-storage: Set index_mail_data.body_size if it can be calculated easily
Probably doesn't help with anything currently, but makes the code more
consistent in how it works.
Timo Sirainen [Thu, 31 May 2018 13:52:54 +0000 (16:52 +0300)]
imapc: Don't use RFC822.SIZE values for message body size calculation
If the RFC822.SIZE doesn't match the exact stream size, the body size
calculation will become wrong. The only downside to this patch is that
now the body size will need to be calculated by parsing the stream, but
there shouldn't be any need to do that unless the body was already
FETCHed, so it shouldn't cause any extra IMAP traffic.
Timo Sirainen [Mon, 4 Jun 2018 16:03:20 +0000 (19:03 +0300)]
lib-storage: Move code to index_mail_try_set_body_size()
This also adds a check to make sure virtual_size is set. With the current
caller it was already guaranteed to be set.
Timo Sirainen [Thu, 31 May 2018 13:49:34 +0000 (16:49 +0300)]
lib-storage: Don't set virtual_size from index record if it's already set
The existing virtual_size may be a correct one, while the one in the index
may be wrong. This will be an especially important fix with the next
commit, because it would make the existing inexact_total_sizes=FALSE wrong.
Timo Sirainen [Mon, 4 Jun 2018 16:37:15 +0000 (19:37 +0300)]
lib-storage: Don't enforce creation of vsize header.
It's useful for caching quota=count and for STATUS (X-SIZE). If neither is
used the header shouldn't be created and kept up-to-date. If the header is
enabled, it also triggers creation of per-email vsize records.
Aki Tuomi [Wed, 14 Mar 2018 17:42:42 +0000 (19:42 +0200)]
push-notification: Add lua driver
Aki Tuomi [Wed, 14 Mar 2018 17:07:53 +0000 (19:07 +0200)]
mail-lua: Add Lua support plugin for mail storage
Aki Tuomi [Wed, 14 Mar 2018 16:49:50 +0000 (18:49 +0200)]
lib-lua: Add lua_pushboolean helper to push real booleans
Makes boolean handling in dovecot code slightly easier
Aki Tuomi [Wed, 14 Mar 2018 18:05:29 +0000 (20:05 +0200)]
push-notification: Fix mailbox unsubscribe event
Subscribe should be FALSE here.
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))
Hannu Ylitalo [Tue, 29 May 2018 07:29:50 +0000 (10:29 +0300)]
dovecot.service: Update LimitNOFILE=65535
Current value of 8192 is too low for most production setups and it needs
to be changed every time something is deployed. Setting the default to
65535 is enough for most production environments so this would be one
task less when deploying a production platform.
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".
Aki Tuomi [Tue, 29 May 2018 08:53:15 +0000 (11:53 +0300)]
pop3c: Ensure pop3c index directory is autocreated
Otherwise we might think that the box has been unexpectedly
autodeleted and pop3_migration will fail.
Broken by
91ee70ed04d33fecd7fc94621f236013d520d7b3
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 [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.
Michael Slusarz [Fri, 25 May 2018 03:43:42 +0000 (21:43 -0600)]
push-notification: Add SSL support for OX driver
Timo Sirainen [Sun, 27 May 2018 12:48:42 +0000 (15:48 +0300)]
imap: Log unhibernation debug message only with mail_debug=yes
Stephan Bosch [Sat, 26 May 2018 12:49:01 +0000 (14:49 +0200)]
lib-smtp: client: Avoid sending an XCLIENT command longer than 512 bytes.
Send several separate XCLIENT commands instead. This way, it complies with the
base SMTP line length limit and with Postfix' original specification for the
XCLIENT command.
With the XCLIENT fields that Dovecot currently uses, this is very unlikely to
happen. Still, this needs to be fixed to make things reliable.
Stephan Bosch [Sun, 27 May 2018 09:30:06 +0000 (11:30 +0200)]
lib-smtp: client: Do not start authentication before initial XCLIENT gets reply.
Stephan Bosch [Sat, 26 May 2018 13:44:43 +0000 (15:44 +0200)]
lib-smtp: server: Provide full proxy data to the conn_proxy_data_updated() callback.
Before, it would only provide the fields that were updated, meaning that some
fields would remain unset, which caused problems for LMTP when more than one
XCLIENT command was sent or the ADDR field was not specified.
Josef 'Jeff' Sipek [Fri, 25 May 2018 23:13:30 +0000 (19:13 -0400)]
global: start relying on http_client_request_abort(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- http_client_request_abort(&E);
- }
+ http_client_request_abort(&E);
Josef 'Jeff' Sipek [Fri, 25 May 2018 23:11:35 +0000 (19:11 -0400)]
lib-http: http_client_request_abort(NULL) should be a no-op
Stephan Bosch [Sat, 26 May 2018 11:12:26 +0000 (13:12 +0200)]
lda: Allow -f sender to omit domain.
Several people complained about the original enforcement of the presence of a
domain (added for v2.3.0) to be too restrictive. Apparently, this legitimately
happens with bounce messages on certain platforms.
Josef 'Jeff' Sipek [Fri, 25 May 2018 15:07:38 +0000 (11:07 -0400)]
lib-fs: fs_unlock(NULL) should be a no-op
Josef 'Jeff' Sipek [Fri, 25 May 2018 15:03:25 +0000 (11:03 -0400)]
global: start relying on fs_iter_deinit(NULL) being a no-op
Josef 'Jeff' Sipek [Fri, 25 May 2018 15:02:56 +0000 (11:02 -0400)]
lib-fs: fs_iter_deinit(NULL) should be a no-op
Josef 'Jeff' Sipek [Fri, 25 May 2018 14:53:54 +0000 (10:53 -0400)]
global: start relying on fs_deinit(NULL) and fs_unref(NULL) being no-ops
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- fs_unref(&E);
- }
+ fs_unref(&E);
@@
expression E;
@@
- if (E != NULL) {
- fs_deinit(&E);
- }
+ fs_deinit(&E);
Josef 'Jeff' Sipek [Fri, 25 May 2018 14:48:29 +0000 (10:48 -0400)]
lib-fs: fs_unref(NULL) should be a no-op
Josef 'Jeff' Sipek [Fri, 25 May 2018 14:38:36 +0000 (10:38 -0400)]
global: start relying on fs_file_close(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- fs_file_close(E);
- }
+ fs_file_close(E);
Josef 'Jeff' Sipek [Fri, 25 May 2018 14:35:35 +0000 (10:35 -0400)]
lib-fs: fs_file_close(NULL) should be a no-op
Josef 'Jeff' Sipek [Fri, 25 May 2018 14:31:27 +0000 (10:31 -0400)]
global: start relying on fs_file_deinit(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- fs_file_deinit(&E);
- }
+ fs_file_deinit(&E);
Josef 'Jeff' Sipek [Fri, 25 May 2018 14:18:34 +0000 (10:18 -0400)]
lib-fs: fs_file_deinit(NULL) should be a no-op
Stephan Bosch [Sat, 17 Mar 2018 23:57:36 +0000 (00:57 +0100)]
lib-smtp: Add test-smtp-payload, test-smtp-submit, test-smtp-client-errors, and test-smtp-server-errors to `make check`.
Stephan Bosch [Sat, 17 Mar 2018 23:53:14 +0000 (00:53 +0100)]
lib-http: Add test-http-payload, test-http-client-errors, and test-http-server-errors to `make check`.
Stephan Bosch [Sun, 18 Mar 2018 00:25:42 +0000 (01:25 +0100)]
lib-http: test-http-client-errors: Make the reconnect failure test less time-sensitive.
Easily breaks in Valgrind.
Stephan Bosch [Sat, 17 Mar 2018 23:46:32 +0000 (00:46 +0100)]
lib-smtp: test-smtp-payload: Terminate the test if it is hanging for some reason.
Stephan Bosch [Sat, 17 Mar 2018 23:34:22 +0000 (00:34 +0100)]
lib-smtp: test-smtp-client-errors: Terminate the test if it is hanging for some reason.
Stephan Bosch [Thu, 28 Dec 2017 15:33:49 +0000 (16:33 +0100)]
lib-http: test-http-client-errors: Terminate the test if it is hanging for some reason.
Stephan Bosch [Fri, 9 Feb 2018 22:58:51 +0000 (23:58 +0100)]
lib-http: test-http-payload: Add SSL tests.
Stephan Bosch [Fri, 9 Feb 2018 21:09:27 +0000 (22:09 +0100)]
lib-smtp: test-smtp-payload: Add SSL tests.
Stephan Bosch [Fri, 9 Feb 2018 23:00:17 +0000 (00:00 +0100)]
lib-http: test-http-payload: Ignore SIGPIPE.
Stephan Bosch [Fri, 9 Feb 2018 21:09:47 +0000 (22:09 +0100)]
lib-smtp: test-smtp-payload: Ignore SIGPIPE.
Stephan Bosch [Fri, 9 Feb 2018 21:27:00 +0000 (22:27 +0100)]
lib-http: server: Allow creating server with custom SSL settings.
Normally, the settings are obtained through lib-master, but that is not
really suitable for the test suite.
Stephan Bosch [Fri, 9 Feb 2018 21:06:49 +0000 (22:06 +0100)]
lib-smtp: server: Allow creating server with custom SSL settings.
Normally, the settings are obtained through lib-master, but that is not
really suitable for the test suite.
Stephan Bosch [Sat, 17 Mar 2018 20:08:09 +0000 (21:08 +0100)]
lib-smtp: client: Amend connection debug message with source ip:port.
Helps matching debug logs between client and server.
Stephan Bosch [Sat, 17 Mar 2018 17:10:04 +0000 (18:10 +0100)]
lib-smtp: test-smtp-payload: Keep the number of pending transactions constant.
Before, a window was used.
Stephan Bosch [Sat, 17 Mar 2018 17:05:01 +0000 (18:05 +0100)]
lib-smtp: test-smtp-payload: Make proper definition for the maximum number of parallel transactions.
Stephan Bosch [Sat, 10 Feb 2018 01:20:31 +0000 (02:20 +0100)]
lib-http: test-http-payload: Add test for exchanging payload with unknown size.
This will force using the chunked transfer encoding.
Stephan Bosch [Sat, 17 Mar 2018 20:34:11 +0000 (21:34 +0100)]
lib-http: test-http-payload: server: Fix asynchronous listening.
The listening socket was blocking and the io handler only accepted one connection per run.
Stephan Bosch [Sat, 17 Mar 2018 13:14:03 +0000 (14:14 +0100)]
lib-smtp: test-smtp-payload: server: Fix asynchronous listening.
The listening socket was blocking and the io handler only accepted one connection per run.
Stephan Bosch [Fri, 9 Feb 2018 21:04:23 +0000 (22:04 +0100)]
lib-ssl-iostream: Add support for creating server and client test SSL settings.
This is useful for building test cases with SSL support.
Timo Sirainen [Wed, 23 May 2018 12:14:50 +0000 (15:14 +0300)]
lib-master: If stats process wants no events, send nothing to it
Instead of sending everything to it..
Timo Sirainen [Mon, 21 May 2018 21:22:42 +0000 (00:22 +0300)]
lib-charset: test-charset can now be used to convert input file
Usage: test-charset <charset> [<input path>]
If <input path> isn't specified, read input from stdin. The input is
converted to UTF-8 and written to stdout.
Timo Sirainen [Wed, 23 May 2018 14:13:23 +0000 (17:13 +0300)]
doveadm director: Remove unnecessary extra newlines from output
Martti Rannanjärvi [Thu, 24 May 2018 11:55:59 +0000 (14:55 +0300)]
lib-master: Move const char *error declaration inside ifdef HAVE_SSL
This is so you can compile dovecot without ssl.
Timo Sirainen [Tue, 22 May 2018 19:45:32 +0000 (22:45 +0300)]
lib: io_loop_stop() should stop the ioloop immediately
Other timeouts or IOs shouldn't be called anymore.
Timo Sirainen [Wed, 23 May 2018 21:40:41 +0000 (00:40 +0300)]
lib: test-multiplex - Make sure alt istream's final input is read
Previously the code trusted that the the alt istream's final IO callback was
called even after io_loop_stop().
Timo Sirainen [Wed, 23 May 2018 22:32:40 +0000 (01:32 +0300)]
cassandra: Fix empty binary parameters with prepared statements
Fixes:
Panic: Trying to allocate 0 bytes