]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
8 years agolib-storage: Don't duplicate service user's settings into mail_user
Timo Sirainen [Sat, 4 Feb 2017 11:51:13 +0000 (13:51 +0200)] 
lib-storage: Don't duplicate service user's settings into mail_user

The mail_storage_service_user.user_set isn't used afterwards, so it can be
directly used to avoid wasting memory.

8 years agolib-storage: Don't unnecessarily duplicate user's all setting strings
Timo Sirainen [Sat, 4 Feb 2017 11:38:17 +0000 (13:38 +0200)] 
lib-storage: Don't unnecessarily duplicate user's all setting strings

user->unexpanded_set and user->set have the same life-time, so they can
point to same strings.

8 years agolib-ssl-iostream: Remove libdovecot_openssl_common.la
Timo Sirainen [Sun, 5 Feb 2017 18:29:10 +0000 (20:29 +0200)] 
lib-ssl-iostream: Remove libdovecot_openssl_common.la

Using such a library results in the same code being duplicated (in OSX) in
both libssl_iostream_openssl.so and libdcrypt_openssl.so.  This breaks the
idea of openssl_init_refcount, because each one will have their own one.

libdcrypt_openssl.so now links to libssl_iostream_openssl.so, which
shouldn't really be a problem, because lib-ssl-iostream is part of the core
libdovecot.so already. It would have been possible to also install
libdovecot_openssl_common.so and link it to both libssl_iostream_openssl.so
and libdcrypt_openssl.so, but that seems unnecessarily complicated.

8 years agolib-ssl-iostream: Remove empty $(ssl_sources) from Makefile
Timo Sirainen [Sun, 5 Feb 2017 18:28:04 +0000 (20:28 +0200)] 
lib-ssl-iostream: Remove empty $(ssl_sources) from Makefile

8 years agolib-dcrypt: Link unit tests with libssl_iostream.la
Timo Sirainen [Sun, 5 Feb 2017 18:26:12 +0000 (20:26 +0200)] 
lib-dcrypt: Link unit tests with libssl_iostream.la

libssl_iostream_openssl.so requires this, and it doesn't get added from
anywhere automatically.

8 years agolib-dcrypt: Remove unnecessary -shared link flag
Timo Sirainen [Sun, 5 Feb 2017 18:24:41 +0000 (20:24 +0200)] 
lib-dcrypt: Remove unnecessary -shared link flag

Not sure if this is harmful, but since no other plugin uses this it's not
needed either.

8 years agolib-dcrypt: Don't link liblib.la to libdcrypt_openssl.so
Timo Sirainen [Sun, 5 Feb 2017 18:22:27 +0000 (20:22 +0200)] 
lib-dcrypt: Don't link liblib.la to libdcrypt_openssl.so

At best this does nothing, at worst (like with OSX) it duplicates the
entire liblib and creates split state between the two instances.

8 years agolib-dcrypt: If dcrypt can't be initialized, log also the reason.
Timo Sirainen [Sun, 5 Feb 2017 18:20:37 +0000 (20:20 +0200)] 
lib-dcrypt: If dcrypt can't be initialized, log also the reason.

This is very helpful when debugging linking issues.

8 years agolib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via configure
Timo Sirainen [Sun, 5 Feb 2017 19:38:33 +0000 (21:38 +0200)] 
lib-ssl-iostream: Detect whether to call ERR_remove_[thread_]state() via configure

8 years agolib-ssl-iostream: Call OBJ_cleanup() for all OpenSSL versions
Timo Sirainen [Sun, 5 Feb 2017 19:31:08 +0000 (21:31 +0200)] 
lib-ssl-iostream: Call OBJ_cleanup() for all OpenSSL versions

Just to reduce the #if checks that uglify the code.

8 years agolib-ssl-iostream: Detect OPENSSL_cleanup() via configure
Timo Sirainen [Sun, 5 Feb 2017 19:10:04 +0000 (21:10 +0200)] 
lib-ssl-iostream: Detect OPENSSL_cleanup() via configure

It's ugly to have both OpenSSL version number check and a special LibreSSL
check.

8 years agolib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure
Timo Sirainen [Sun, 5 Feb 2017 19:04:35 +0000 (21:04 +0200)] 
lib-ssl-iostream: Detect OpenSSL memory functions' parameters via configure

The version number check doesn't work correctly for LibreSSL.

8 years agolib-ssl-iostream: Use ASN1_STRING_get0_data() if it exists
Timo Sirainen [Sun, 5 Feb 2017 19:56:20 +0000 (21:56 +0200)] 
lib-ssl-iostream: Use ASN1_STRING_get0_data() if it exists

This avoids deprecation warnings about ASN1_STRING_data() in OpenSSL v1.1.

8 years agolib-ssl-iostream: Use RSA_generate_key_ex() if it exists
Timo Sirainen [Sun, 5 Feb 2017 19:51:29 +0000 (21:51 +0200)] 
lib-ssl-iostream: Use RSA_generate_key_ex() if it exists

This avoids deprecation warnings about RSA_generate_key() in OpenSSL v1.1.

8 years agodict-sql: Move USING TIMESTAMP to correct location for INSERTs
Timo Sirainen [Sun, 5 Feb 2017 22:11:14 +0000 (00:11 +0200)] 
dict-sql: Move USING TIMESTAMP to correct location for INSERTs

8 years agoauth: Pass through passdb extra fields to auth-worker requests
Timo Sirainen [Sun, 5 Feb 2017 22:48:18 +0000 (00:48 +0200)] 
auth: Pass through passdb extra fields to auth-worker requests

8 years agoauth: Code cleanup - Move userdb extra fields exporting to its own function
Timo Sirainen [Sun, 5 Feb 2017 22:46:55 +0000 (00:46 +0200)] 
auth: Code cleanup - Move userdb extra fields exporting to its own function

8 years agolib: Fix compiler warning with non-Linux
Timo Sirainen [Sun, 5 Feb 2017 17:52:20 +0000 (19:52 +0200)] 
lib: Fix compiler warning with non-Linux

8 years agolib-storage: Expunging now uses GUID only if it's in cache.
Timo Sirainen [Wed, 25 Jan 2017 21:26:35 +0000 (23:26 +0200)] 
lib-storage: Expunging now uses GUID only if it's in cache.

Otherwise the GUID lookup may be expensive, which is especially bad when
deleting a large number of mails.

8 years agolib-storage: Fix autoexpunge locking to actually work correctly.
Timo Sirainen [Fri, 3 Feb 2017 17:40:54 +0000 (19:40 +0200)] 
lib-storage: Fix autoexpunge locking to actually work correctly.

It wasn't actually skipping the autoexpunging if the lock already existed.
It autoexpunged anyway.

8 years agolib-storage: Put vsize in index only if it's not there
Aki Tuomi [Sat, 4 Feb 2017 08:42:21 +0000 (10:42 +0200)] 
lib-storage: Put vsize in index only if it's not there

8 years agofts: Use mailbox_list_created hook
Aki Tuomi [Fri, 3 Feb 2017 12:22:02 +0000 (14:22 +0200)] 
fts: Use mailbox_list_created hook

Otherwise the deinit hook might get lost and fts would not be deinitialized.

Reverts 11f12ca1c97583b551a4286fa6cd1ab33aa67680 which seems to have been unnecessary

Fixes indexer-worker signal 11 crash

8 years agolib-storage: Once hooks have run, set vlast to NULL to make sure it's not used
Timo Sirainen [Fri, 3 Feb 2017 14:16:26 +0000 (16:16 +0200)] 
lib-storage: Once hooks have run, set vlast to NULL to make sure it's not used

The functions can't be correctly overridden outside their own specific
hooks. It would work only if hook_build_update() is called afterwards and
currently there's no public API for that.

8 years agolib-storage: Add assert to make sure header parsing isn't recursed
Timo Sirainen [Mon, 30 Jan 2017 19:28:20 +0000 (21:28 +0200)] 
lib-storage: Add assert to make sure header parsing isn't recursed

8 years agolib-http: client: Fixed peer reconnection failure handling.
Stephan Bosch [Thu, 2 Feb 2017 00:36:50 +0000 (01:36 +0100)] 
lib-http: client: Fixed peer reconnection failure handling.

The addressed problem occurs in a very specific situation in which the original successful connection is dropped, yet a new connection fails.
It manifests as an assertion failure or panic:

Panic: file ioloop-epoll.c: line 189 (io_loop_handler_run_internal): assertion failed: (msecs >= 0)
Panic: BUG: No IOs or timeouts set. Not waiting for infinity.

The timing is very critical. However, this doesn't mean that the occurrence of this problem is very unlikely; it can happen frequently under high load.

8 years agolib-http: client: Respect the connection idle timeout, even when all queues have...
Stephan Bosch [Thu, 2 Feb 2017 00:34:35 +0000 (01:34 +0100)] 
lib-http: client: Respect the connection idle timeout, even when all queues have unlinked from a peer.

Otherwise, the DNS TTL timeout dictates the connection idle timeout in some situations.

8 years agodict: Fix error logging if TIMESTAMP parameters are wrong.
Timo Sirainen [Thu, 2 Feb 2017 09:47:24 +0000 (11:47 +0200)] 
dict: Fix error logging if TIMESTAMP parameters are wrong.

8 years agolib-master: Ignore t_readlink ENOENT error on updating instances list
Martti Rannanjärvi [Wed, 1 Feb 2017 08:48:37 +0000 (10:48 +0200)] 
lib-master: Ignore t_readlink ENOENT error on updating instances list

The list may contain paths that don't exist anymore.

8 years agoimap: Fix panic on FETCH X-MAILBOX in virtual mailbox when mail is expunged
Timo Sirainen [Tue, 31 Jan 2017 19:03:29 +0000 (21:03 +0200)] 
imap: Fix panic on FETCH X-MAILBOX in virtual mailbox when mail is expunged

8 years agolib: Fix -Wstrict-bool compiler warnings.
Timo Sirainen [Tue, 31 Jan 2017 18:27:54 +0000 (20:27 +0200)] 
lib: Fix -Wstrict-bool compiler warnings.

8 years agolib: Implicitly ignore memmove and memcpy return values in path-util
Martti Rannanjärvi [Mon, 30 Jan 2017 17:45:28 +0000 (19:45 +0200)] 
lib: Implicitly ignore memmove and memcpy return values in path-util

This is because dovecot code doesn't explicitly ignore the return values
of those functions elsewhere either.

8 years agolib-http: server: Fix premature connection destroy in http_server_connection_output().
Stephan Bosch [Tue, 31 Jan 2017 12:41:48 +0000 (13:41 +0100)] 
lib-http: server: Fix premature connection destroy in http_server_connection_output().

Added a reference to the connection object while it is sending the remainder of a response's payload.
This is necessary, since http_server_response_send_more() can destroy the connection, for example when the request has a "Connection: close" header.
This will only occur for responses with a very large payload, because otherwise the payload is fully sent in in the initial pass.

8 years agolib-storage: When logging corrupted mail size, disable logging Message-ID for now
Timo Sirainen [Mon, 9 Jan 2017 21:13:03 +0000 (23:13 +0200)] 
lib-storage: When logging corrupted mail size, disable logging Message-ID for now

This was causing crashes in some situations. It was originally added to
figure out if there were problems with dovecot.index.cache containing
data for wrong messages. This was never found to happen, although now
thinking about it, the problem may have been
741287129c22cadc14c05584704685b31169dbce. So perhaps this code could be
removed permanently as well.

6b44fc75c0039d1006ce4d543544552449b8e229 also attempted to fix this, but it
wasn't enough. There was still some code path that lead to recursive header
parsing.

8 years agolib: path-util: Fixed assertion in path_normalize().
Stephan Bosch [Mon, 30 Jan 2017 22:20:48 +0000 (23:20 +0100)] 
lib: path-util: Fixed assertion in path_normalize().

The invariant was using the wrong variable for comparison, causing it to trigger erraticly.

8 years agolib: Fix t_get_working_dir() to properly allocate memory in data stack.
Timo Sirainen [Mon, 30 Jan 2017 17:17:33 +0000 (19:17 +0200)] 
lib: Fix t_get_working_dir() to properly allocate memory in data stack.

8 years agolib-mail: Fix message_part_data_is_plain_7bit()
Timo Sirainen [Mon, 30 Jan 2017 19:53:01 +0000 (21:53 +0200)] 
lib-mail: Fix message_part_data_is_plain_7bit()

Content-Type parameters weren't handled exactly right.
Broken by recent changes.

8 years agolib-imap: Fix another compiler warning
Timo Sirainen [Mon, 30 Jan 2017 16:55:29 +0000 (18:55 +0200)] 
lib-imap: Fix another compiler warning

Unnecessary, but older gcc complains.

8 years agolib, lib-master: Add error_r to t_binary_abspath
Martti Rannanjärvi [Thu, 29 Dec 2016 21:32:04 +0000 (23:32 +0200)] 
lib, lib-master: Add error_r to t_binary_abspath

8 years agolib: Add error_r to t_abspath and its callers
Martti Rannanjärvi [Thu, 29 Dec 2016 21:04:56 +0000 (23:04 +0200)] 
lib: Add error_r to t_abspath and its callers

8 years agolib: Add tests for path-util
Martti Rannanjärvi [Tue, 29 Nov 2016 18:50:28 +0000 (20:50 +0200)] 
lib: Add tests for path-util

8 years agolib: Add Pigeonhole realpath functions to path-util
Martti Rannanjärvi [Sun, 4 Dec 2016 10:13:00 +0000 (12:13 +0200)] 
lib: Add Pigeonhole realpath functions to path-util

8 years agolib: Rename t_get_current_dir to t_get_working_dir
Martti Rannanjärvi [Sun, 4 Dec 2016 10:52:51 +0000 (12:52 +0200)] 
lib: Rename t_get_current_dir to t_get_working_dir

Also add an error_r parameter that cannot be NULL.

8 years agolib: Add error_r to t_readlink and its callers
Martti Rannanjärvi [Sun, 4 Dec 2016 10:47:22 +0000 (12:47 +0200)] 
lib: Add error_r to t_readlink and its callers

8 years agolib: Add asserts to t_abspath and t_abspath_to
Martti Rannanjärvi [Wed, 30 Nov 2016 10:03:30 +0000 (12:03 +0200)] 
lib: Add asserts to t_abspath and t_abspath_to

8 years agolib: Rename abspath to path-util
Martti Rannanjärvi [Wed, 30 Nov 2016 06:40:40 +0000 (08:40 +0200)] 
lib: Rename abspath to path-util

8 years agolib-imap: Fix compiler warning
Timo Sirainen [Mon, 30 Jan 2017 16:29:36 +0000 (18:29 +0200)] 
lib-imap: Fix compiler warning

Unnecessary, but older gcc complains.

8 years agolib-imap: Created test-imap-envelope.
Stephan Bosch [Sat, 14 Jan 2017 12:33:05 +0000 (13:33 +0100)] 
lib-imap: Created test-imap-envelope.

8 years agolib-imap: imap-envelope: Added function for parsing ENVELOPE from string.
Stephan Bosch [Thu, 29 Dec 2016 13:02:05 +0000 (14:02 +0100)] 
lib-imap: imap-envelope: Added function for parsing ENVELOPE from string.

8 years agolib-imap: Added more comments to imap-bodystructure and imap-envelope.
Stephan Bosch [Wed, 26 Oct 2016 21:44:47 +0000 (23:44 +0200)] 
lib-imap: Added more comments to imap-bodystructure and imap-envelope.

8 years agolib-imap: imap-bodystructure: Added support for making imap_bodystructure_parse(...
Stephan Bosch [Sun, 23 Oct 2016 23:45:18 +0000 (01:45 +0200)] 
lib-imap: imap-bodystructure: Added support for making imap_bodystructure_parse() work without a pre-existing message_part tree.

It can now create the tree from the BODYSTRUCTURE string itself.

8 years agolib-mail: message-part-data: Implemented message_part_data_get_filename().
Stephan Bosch [Sun, 23 Oct 2016 23:01:19 +0000 (01:01 +0200)] 
lib-mail: message-part-data: Implemented message_part_data_get_filename().

Gets the message part's filename if it has any.

8 years agolib-mail: message-part-data: Renamed struct message_part_envelope_data to message_par...
Stephan Bosch [Sun, 23 Oct 2016 22:19:05 +0000 (00:19 +0200)] 
lib-mail: message-part-data: Renamed struct message_part_envelope_data to message_part_envelope.

8 years agolib-imap: imap-envelope: Moved imap_envelope_headers to lib-mail/message-part-data...
Stephan Bosch [Sun, 23 Oct 2016 20:29:49 +0000 (22:29 +0200)] 
lib-imap: imap-envelope: Moved imap_envelope_headers to lib-mail/message-part-data as message_part_envelope_headers.

8 years agolib-imap: imap-bodystructure: Moved message_part_data header parsing and query functi...
Stephan Bosch [Sun, 23 Oct 2016 18:05:33 +0000 (20:05 +0200)] 
lib-imap: imap-bodystructure: Moved message_part_data header parsing and query functions to their own module in lib-mail.

Moved code from imap-bodystructure and imap-envelope.

8 years agolib-imap: imap-bodystructure: Renamed imap_bodystructure_is_plain_7bit() to message_p...
Stephan Bosch [Sun, 23 Oct 2016 17:47:12 +0000 (19:47 +0200)] 
lib-imap: imap-bodystructure: Renamed imap_bodystructure_is_plain_7bit() to message_part_data_is_plain_7bit().

8 years agolib-imap: imap-envelope: Renamed imap_envelope_parse_header() to message_part_envelop...
Stephan Bosch [Sun, 23 Oct 2016 17:00:10 +0000 (19:00 +0200)] 
lib-imap: imap-envelope: Renamed imap_envelope_parse_header() to message_part_envelope_parse_from_header().

8 years agolib-imap: imap-evenvelope: Changed imap_envelope_get_field() into a private equivalent.
Stephan Bosch [Sun, 23 Oct 2016 16:10:01 +0000 (18:10 +0200)] 
lib-imap: imap-evenvelope: Changed imap_envelope_get_field() into a private equivalent.

8 years agolib-imap: imap-bodystructure: Renamed imap_bodystructure_parse_header() to message_pa...
Stephan Bosch [Sun, 23 Oct 2016 15:51:59 +0000 (17:51 +0200)] 
lib-imap: imap-bodystructure: Renamed imap_bodystructure_parse_header() to message_part_data_parse_from_header().

8 years agolib-imap: imap-bodystructure: Grouped together functions relating to the conversion...
Stephan Bosch [Sun, 23 Oct 2016 15:27:07 +0000 (17:27 +0200)] 
lib-imap: imap-bodystructure: Grouped together functions relating to the conversion of BODYSTRUCTURE to BODY.

This only moves code.

8 years agolib-imap: imap-bodystructure: Changed struct message_part_body to contain fully decod...
Stephan Bosch [Sun, 23 Oct 2016 14:50:25 +0000 (16:50 +0200)] 
lib-imap: imap-bodystructure: Changed struct message_part_body to contain fully decoded data.

Contained unparsed IMAP string data before.

8 years agolib-imap: imap-envelope: Added function to parse struct message_part_envelope_data...
Stephan Bosch [Sun, 23 Oct 2016 14:49:37 +0000 (16:49 +0200)] 
lib-imap: imap-envelope: Added function to parse struct message_part_envelope_data from parsed imap args.

8 years agolib-imap: imap-bodystructure: Renamed `d' parameter to `data' in parse_content_header...
Stephan Bosch [Sun, 23 Oct 2016 12:06:44 +0000 (14:06 +0200)] 
lib-imap: imap-bodystructure: Renamed `d' parameter to `data' in parse_content_header() function.

8 years agolib-imap: imap-envelope: Removed useless pool field from struct message_part_envelope...
Stephan Bosch [Sun, 23 Oct 2016 11:52:10 +0000 (13:52 +0200)] 
lib-imap: imap-envelope: Removed useless pool field from struct message_part_envelope_data.

8 years agolib-imap: imap-bodystructure: Removed useless pool field from struct message_part_data.
Stephan Bosch [Sun, 23 Oct 2016 11:50:05 +0000 (13:50 +0200)] 
lib-imap: imap-bodystructure: Removed useless pool field from struct message_part_data.

8 years agolib-mail: Gave message_part_data its own field in struct message_part.
Stephan Bosch [Sun, 23 Oct 2016 11:29:43 +0000 (13:29 +0200)] 
lib-mail: Gave message_part_data its own field in struct message_part.

8 years agolib-imap: imap-bodystructure: Renamed struct message_part_body_data to message_part_data.
Stephan Bosch [Sun, 23 Oct 2016 11:10:11 +0000 (13:10 +0200)] 
lib-imap: imap-bodystructure: Renamed struct message_part_body_data to message_part_data.

8 years agolib-imap: Removed existing envelope parsing function.
Stephan Bosch [Sun, 23 Oct 2016 10:10:44 +0000 (12:10 +0200)] 
lib-imap: Removed existing envelope parsing function.

This is currently only used by imaptest. Alternative API is provided in later commit.

8 years agolib-imap: test-imap-bodystructure: Added normalization tests.
Stephan Bosch [Sun, 8 Jan 2017 11:00:15 +0000 (12:00 +0100)] 
lib-imap: test-imap-bodystructure: Added normalization tests.

8 years agolib-imap: imap-bodystructure: Allow alternative syntax and omitted optional elements...
Stephan Bosch [Mon, 9 Jan 2017 01:03:25 +0000 (02:03 +0100)] 
lib-imap: imap-bodystructure: Allow alternative syntax and omitted optional elements in parser input.

This makes the parser accept any RFC-compliant BODYSTRUCTURE syntax, instead of only what Dovecot itself produces.
This way the parser could reliably be used in the lib-imap-client if ever needed.

8 years agolib-imap: test-imap-bodystructure: Added more tests.
Stephan Bosch [Mon, 9 Jan 2017 15:29:26 +0000 (16:29 +0100)] 
lib-imap: test-imap-bodystructure: Added more tests.

8 years agolib-imap: test-imap-bodystructure: Improved handing of parse errors.
Stephan Bosch [Mon, 9 Jan 2017 15:20:29 +0000 (16:20 +0100)] 
lib-imap: test-imap-bodystructure: Improved handing of parse errors.

Actually show the parse error.

8 years agolib-imap: test-imap-bodystructure: Added support for more than one test case.
Stephan Bosch [Mon, 9 Jan 2017 15:16:46 +0000 (16:16 +0100)] 
lib-imap: test-imap-bodystructure: Added support for more than one test case.

8 years agolib-imap: imap-bodystructure: Fixed parse error message about invalid Content-M5...
Stephan Bosch [Sun, 8 Jan 2017 21:50:02 +0000 (22:50 +0100)] 
lib-imap: imap-bodystructure: Fixed parse error message about invalid Content-M5 field.

8 years agolib-storage: Set vsize extension when copying mails.
Timo Sirainen [Mon, 30 Jan 2017 13:12:04 +0000 (15:12 +0200)] 
lib-storage: Set vsize extension when copying mails.

8 years agolib-storage: Add index_mail_get_vsize_extension()
Timo Sirainen [Mon, 30 Jan 2017 13:11:45 +0000 (15:11 +0200)] 
lib-storage: Add index_mail_get_vsize_extension()

8 years agolib-storage: Move index_mail.vsize_ext_id to mailbox.mail_vsize_ext_id
Timo Sirainen [Mon, 30 Jan 2017 13:06:46 +0000 (15:06 +0200)] 
lib-storage: Move index_mail.vsize_ext_id to mailbox.mail_vsize_ext_id

It's mailbox-specific, so it doesn't have to be looked up every time.
Also this is needed for the following fix.

8 years agoimapc: Allow using LAYOUT=none without crashing.
Timo Sirainen [Wed, 14 Dec 2016 16:13:25 +0000 (18:13 +0200)] 
imapc: Allow using LAYOUT=none without crashing.

8 years agoimap: Don't unregister internal commands at deinit.
Timo Sirainen [Sat, 28 Jan 2017 22:24:33 +0000 (00:24 +0200)] 
imap: Don't unregister internal commands at deinit.

This allows plugins to unregister commands without errors being logged.

8 years agolib-storage: Lock autoexpunging so only a single process does it.
Timo Sirainen [Thu, 26 Jan 2017 20:42:09 +0000 (22:42 +0200)] 
lib-storage: Lock autoexpunging so only a single process does it.

This hopefully helps to avoid duplicates with lazy_expunge plugin.

8 years agoimap: Use struct mailbox_status.flags for FLAGS reply
Timo Sirainen [Sat, 28 Jan 2017 23:08:23 +0000 (01:08 +0200)] 
imap: Use struct mailbox_status.flags for FLAGS reply

8 years agolib-storage: Add struct mailbox_status.flags
Timo Sirainen [Sat, 28 Jan 2017 23:06:55 +0000 (01:06 +0200)] 
lib-storage: Add struct mailbox_status.flags

This is similar to permanent_flags, except it tells which flags can be
changed at all in the session. Mainly it allows plugins to make changes to
IMAP's untagged FLAGS reply.

8 years agolib: io_loop_set_current() - do nothing if ioloop doesn't change
Timo Sirainen [Fri, 27 Jan 2017 19:36:14 +0000 (21:36 +0200)] 
lib: io_loop_set_current() - do nothing if ioloop doesn't change

There's no need to call the switch callbacks if the ioloop doesn't change.

8 years agodoveadm: add doveadm_http_rawlog_dir setting
Martti Rannanjärvi [Fri, 27 Jan 2017 11:56:30 +0000 (13:56 +0200)] 
doveadm: add doveadm_http_rawlog_dir setting

8 years agolib-fts: Fix assert-crash in fts_icu_lcase()
Timo Sirainen [Tue, 24 Jan 2017 15:18:07 +0000 (17:18 +0200)] 
lib-fts: Fix assert-crash in fts_icu_lcase()

Fixes:
Panic: file fts-icu.c: line 152 (fts_icu_lcase): assertion failed: (err != U_BUFFER_OVERFLOW_ERROR)

8 years agolib-storage: Fix comparison to use virtual size instead of body virtual size
Aki Tuomi [Fri, 27 Jan 2017 07:41:36 +0000 (09:41 +0200)] 
lib-storage: Fix comparison to use virtual size instead of body virtual size

Was forgotten on 7f1ecb14

8 years agolib-index: Don't log error on dovecot.index.cache delete if it doesn't exist
Timo Sirainen [Thu, 26 Jan 2017 07:55:22 +0000 (09:55 +0200)] 
lib-index: Don't log error on dovecot.index.cache delete if it doesn't exist

For example if a cache is marked as corrupted and there is no cache, it's
not really an error that it doesn't exist.

Fixes:
Error: unlink(.../dovecot.index.cache) failed: No such file or directory (in mail-cache.c:29)

8 years agolib-storage: Filling vsize to index on read used wrong size
Timo Sirainen [Thu, 26 Jan 2017 17:51:34 +0000 (19:51 +0200)] 
lib-storage: Filling vsize to index on read used wrong size

8 years agolib-storage: Clear virtual size from index if size is corrupted
Aki Tuomi [Thu, 26 Jan 2017 07:42:26 +0000 (09:42 +0200)] 
lib-storage: Clear virtual size from index if size is corrupted

8 years agofts: Fix search query generation when tokens are filtered out.
Timo Sirainen [Sat, 14 Jan 2017 16:34:11 +0000 (18:34 +0200)] 
fts: Fix search query generation when tokens are filtered out.

For example with English stopwords when searching "foo and bar" it should
be equilevant to "foo bar", since "and" is filtered out.

8 years agolib: Add t_hash helpers for hashing
Aki Tuomi [Mon, 9 Jan 2017 08:43:01 +0000 (10:43 +0200)] 
lib: Add t_hash helpers for hashing

8 years agolib-dict: Fix test-dict-sql in out-of-tree build
Aki Tuomi [Wed, 25 Jan 2017 08:11:05 +0000 (10:11 +0200)] 
lib-dict: Fix test-dict-sql in out-of-tree build

8 years agolib-dict: Add unit tests
Aki Tuomi [Mon, 16 Jan 2017 13:31:10 +0000 (15:31 +0200)] 
lib-dict: Add unit tests

8 years agolib-sql: Add test driver
Aki Tuomi [Mon, 16 Jan 2017 13:30:14 +0000 (15:30 +0200)] 
lib-sql: Add test driver

Mock SQL driver

8 years agodict-sql: Fix iterator to not fail
Aki Tuomi [Tue, 17 Jan 2017 07:59:54 +0000 (09:59 +0200)] 
dict-sql: Fix iterator to not fail

When iterating a prefix without exact key flag,
do not fail when no more maps are matched if at least
one map has already matched.

Fixes
Error: dict_iterate_deinit failed: sql dict iterate failed for ...: Invalid/unmapped path

8 years agodict-sql: Move struct sql_dict to header
Aki Tuomi [Mon, 16 Jan 2017 13:29:25 +0000 (15:29 +0200)] 
dict-sql: Move struct sql_dict to header

This allows dereferencing it on test programs

8 years agodict-sql: Do not increment on set
Aki Tuomi [Mon, 16 Jan 2017 12:01:57 +0000 (14:01 +0200)] 
dict-sql: Do not increment on set

When merging sets do not use increment mode in builder.

8 years agodirector: "doveadm director move" to same host now refreshes user's timeout
Timo Sirainen [Mon, 23 Jan 2017 16:02:05 +0000 (18:02 +0200)] 
director: "doveadm director move" to same host now refreshes user's timeout

This allows keeping user constantly in the same backend by just periodically
moving the user there.

8 years agoglobal: Update http_server_request_set_destroy_callback usage
Aki Tuomi [Tue, 24 Jan 2017 07:56:29 +0000 (09:56 +0200)] 
global: Update http_server_request_set_destroy_callback usage

8 years agolib-http: Improve http_server_request_set_destroy_callback API
Aki Tuomi [Tue, 24 Jan 2017 07:55:49 +0000 (09:55 +0200)] 
lib-http: Improve http_server_request_set_destroy_callback API

It now allows using non-void* context

8 years agoglobal: Update http_client_request_set_destroy_callback usage
Aki Tuomi [Sun, 22 Jan 2017 15:58:55 +0000 (17:58 +0200)] 
global: Update http_client_request_set_destroy_callback usage