]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
7 years agoRelease 2.2.35 release-2.2.35 2.2.35
Aki Tuomi [Mon, 19 Mar 2018 12:25:02 +0000 (14:25 +0200)] 
Release 2.2.35

7 years agoNEWS: Add v2.2.35 release notes
Aki Tuomi [Mon, 19 Mar 2018 09:51:01 +0000 (11:51 +0200)] 
NEWS: Add v2.2.35 release notes

7 years agoNEWS: Update up to 2.2.34
Aki Tuomi [Mon, 19 Mar 2018 09:30:14 +0000 (11:30 +0200)] 
NEWS: Update up to 2.2.34

7 years agolib-dcrypt: Add libssl_iostream.la to LIBADD
Martti Rannanjärvi [Mon, 19 Mar 2018 10:20:14 +0000 (12:20 +0200)] 
lib-dcrypt: Add libssl_iostream.la to LIBADD

This allows running the tests in src/lib-dcrypt.

7 years agonotify: Fix crash if NO_NOTIFY transaction is rolled back during commit
Timo Sirainen [Wed, 7 Mar 2018 09:24:30 +0000 (11:24 +0200)] 
notify: Fix crash if NO_NOTIFY transaction is rolled back during commit

Fixes: Panic: no notify_mail_txn found
7 years agoimapc: Update mail size also when RFC822.SIZE is smaller than fetched header size
Timo Sirainen [Thu, 15 Mar 2018 11:19:53 +0000 (13:19 +0200)] 
imapc: Update mail size also when RFC822.SIZE is smaller than fetched header size

If this isn't done, istream-mail will detect that the fetched header is
larger than RFC822.SIZE and fail with "Cached message size smaller than
expected"

7 years agoimapc: Update mail size also when istream_opened() hook is called
Timo Sirainen [Thu, 15 Mar 2018 10:20:14 +0000 (12:20 +0200)] 
imapc: Update mail size also when istream_opened() hook is called

When fetching a message body the cached message size was set. However,
if istream_opened() hook was used this wasn't done. If a client had
fetched both (RFC822.SIZE BODY.PEEK[]) and the server sent a wrong
RFC822.SIZE, that size was used for the message body size, which resulted
in "Cached message size larger than expected" errors.

7 years agolib-master: Correctly match when local_name has multiple names
Aki Tuomi [Tue, 6 Mar 2018 13:15:01 +0000 (15:15 +0200)] 
lib-master: Correctly match when local_name has multiple names

Reported by J. Nick Koston <nick@cpanel.net>

7 years agolib-master: Reply from config process is tabescaped
Aki Tuomi [Tue, 6 Mar 2018 08:33:27 +0000 (10:33 +0200)] 
lib-master: Reply from config process is tabescaped

Found by J. Nick Koston <nick@cpanel.net>

7 years agoconfig: tabescape local name and service
Aki Tuomi [Sat, 10 Mar 2018 17:43:27 +0000 (19:43 +0200)] 
config: tabescape local name and service

7 years agoconfig: Make local_name comparison faster
Aki Tuomi [Tue, 6 Mar 2018 08:31:51 +0000 (10:31 +0200)] 
config: Make local_name comparison faster

Based on patch by J. Nick Koston <nick@cpanel.net>

7 years agolib-master: Fix dns_match_wildcard result value check
Aki Tuomi [Mon, 26 Feb 2018 10:53:19 +0000 (12:53 +0200)] 
lib-master: Fix dns_match_wildcard result value check

It returns 0, not TRUE.

7 years agoimapc: Don't try to add mails to index if they already exist there
Timo Sirainen [Mon, 12 Mar 2018 13:06:13 +0000 (15:06 +0200)] 
imapc: Don't try to add mails to index if they already exist there

Broken by 259a4ca5943123915a019799623d2e4a4ef7fd15 when imapc was used
with (not in-memory) index files.

This caused errors like "Append with UID 200, but next_uid = 201"

7 years agocharset-alias: Don't return value from void functions
Martti Rannanjärvi [Mon, 5 Mar 2018 12:55:04 +0000 (14:55 +0200)] 
charset-alias: Don't return value from void functions

7 years agolib-dcrypt: test-stream - Ensure more is read when buffer becomes empty
Aki Tuomi [Mon, 12 Mar 2018 12:50:32 +0000 (14:50 +0200)] 
lib-dcrypt: test-stream - Ensure more is read when buffer becomes empty

7 years agolib-dcrypt: istream-decrypt - Read more if buffer is empty
Aki Tuomi [Mon, 12 Mar 2018 12:48:41 +0000 (14:48 +0200)] 
lib-dcrypt: istream-decrypt - Read more if buffer is empty

If there is no more buffered data, try to decrypt more.

- Fixes Panic: file istream.c: line 192 (i_stream_read): assertion failed: (!stream->blocking)
- Fixes infinite loop when stream is not blocking

7 years agosdbox: Delete .temp* files on when save/copy transaction is rolled back
Timo Sirainen [Thu, 1 Mar 2018 10:17:16 +0000 (12:17 +0200)] 
sdbox: Delete .temp* files on when save/copy transaction is rolled back

For example when copying was aborted due to user being over quota, temp
files were left behind.

7 years agoglobal: Call rfc822_parser_deinit() wherever possible
Timo Sirainen [Fri, 22 Dec 2017 16:58:11 +0000 (18:58 +0200)] 
global: Call rfc822_parser_deinit() wherever possible

7 years agolib-mail: Refactor code to make the next commit smaller
Timo Sirainen [Tue, 9 Jan 2018 16:33:59 +0000 (11:33 -0500)] 
lib-mail: Refactor code to make the next commit smaller

7 years agolib-mail: Add rfc822_parser_deinit()
Timo Sirainen [Fri, 22 Dec 2017 16:56:53 +0000 (18:56 +0200)] 
lib-mail: Add rfc822_parser_deinit()

It's not a strict requirement to call this, but it assert-crashes if the
state isn't valid.

7 years agolib-mail: Make sure parsers don't accidentally go much beyond end pointer
Timo Sirainen [Fri, 22 Dec 2017 16:42:53 +0000 (18:42 +0200)] 
lib-mail: Make sure parsers don't accidentally go much beyond end pointer

7 years agolib-mail: Fix out-of-bounds read when parsing an invalid email address
Timo Sirainen [Fri, 22 Dec 2017 16:36:55 +0000 (18:36 +0200)] 
lib-mail: Fix out-of-bounds read when parsing an invalid email address

The included unit test doesn't fail, but running it with valgrind shows
"Invalid read of size 1" error.

Broken in d6737a17a27402e7a262f7ba8a2ed588d576f23c

Discovered by Aleksandar Nikolic of Cisco Talos

7 years agolib-mail: test-message-address - Add TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST flag
Timo Sirainen [Fri, 22 Dec 2017 16:36:09 +0000 (18:36 +0200)] 
lib-mail: test-message-address - Add TEST_MESSAGE_ADDRESS_FLAG_SKIP_LIST flag

This commit just adds the flag and sets it to 0 for all existing tests.

7 years agolib-mail: rfc822-parser - Add asserts to make sure parser state is correct
Timo Sirainen [Fri, 22 Dec 2017 16:31:52 +0000 (18:31 +0200)] 
lib-mail: rfc822-parser - Add asserts to make sure parser state is correct

7 years agolib-dns: Move before lib-master
Aki Tuomi [Mon, 19 Feb 2018 12:19:08 +0000 (14:19 +0200)] 
lib-dns: Move before lib-master

7 years agologin-common: Enable config filtering by local name
Aki Tuomi [Thu, 30 Nov 2017 18:52:11 +0000 (20:52 +0200)] 
login-common: Enable config filtering by local name

Prevents servername misuse.

7 years agolib-master: Support validating config filters against requests
Aki Tuomi [Thu, 30 Nov 2017 13:47:25 +0000 (15:47 +0200)] 
lib-master: Support validating config filters against requests

Validation will sanitize the input request and drop any fields
that have no filter in config. E.g. if you have a local block
with name, and nothing else, then lip/rip will be dropped
from the request.

7 years agoconfig: Add command to request all filters
Aki Tuomi [Thu, 30 Nov 2017 13:46:52 +0000 (15:46 +0200)] 
config: Add command to request all filters

7 years agoconfig: Add config_filter_get_all
Aki Tuomi [Thu, 30 Nov 2017 13:46:40 +0000 (15:46 +0200)] 
config: Add config_filter_get_all

Returns all filters

7 years agodoc: Update example-config description for ssl_require_crl
Aki Tuomi [Tue, 6 Mar 2018 07:42:46 +0000 (09:42 +0200)] 
doc: Update example-config description for ssl_require_crl

7 years agoexample-config: Add mail_attachment_detection_options
Timo Sirainen [Wed, 28 Feb 2018 13:09:02 +0000 (15:09 +0200)] 
example-config: Add mail_attachment_detection_options

7 years agodoveadm sync/backup: Don't override BROKENCHAR if it's already set
Timo Sirainen [Fri, 16 Feb 2018 14:03:46 +0000 (16:03 +0200)] 
doveadm sync/backup: Don't override BROKENCHAR if it's already set

This allows migrating invalid mailbox names by specifying BROKENCHAR.
Previously it would always try to use \003 control character, which isn't
valid character in mailbox names so the mailbox creation would fail.

7 years agonotify: Ignore flag and keywords update during saving
Aki Tuomi [Mon, 26 Feb 2018 16:20:30 +0000 (18:20 +0200)] 
notify: Ignore flag and keywords update during saving

They are part of the saving event

7 years agolib-storage: Generate snippet while saving new mails
Josef 'Jeff' Sipek [Sun, 18 Feb 2018 23:07:16 +0000 (18:07 -0500)] 
lib-storage: Generate snippet while saving new mails

7 years agolib-storage: Make index_mail_want_cache() global
Timo Sirainen [Mon, 19 Feb 2018 13:43:31 +0000 (15:43 +0200)] 
lib-storage: Make index_mail_want_cache() global

7 years agolib-storage: move snippet generation to mail-save-finish
Josef 'Jeff' Sipek [Sun, 18 Feb 2018 23:06:48 +0000 (18:06 -0500)] 
lib-storage: move snippet generation to mail-save-finish

This is necessary because some storage backends (most notably sdbox) do
not allow getting the mail stream before the mail is fully written out.
(See written_to_disk in sdbox-file.h.)

If we could avoid getting the stream to generate a snippet we could
leave this where it is.

7 years agodoveadm dump: Show body.snippet in human-readable form
Timo Sirainen [Mon, 19 Feb 2018 13:38:13 +0000 (15:38 +0200)] 
doveadm dump: Show body.snippet in human-readable form

7 years agoimap: Don't set storage callbacks before namespaces are created
Timo Sirainen [Thu, 15 Feb 2018 16:16:15 +0000 (18:16 +0200)] 
imap: Don't set storage callbacks before namespaces are created

This fixes sending untagged OK/NO notifications from storage (e.g. lock
waits/override notifications). It was broken by
e031d9aaae59a9f79710dc1138b76b69272615a3

7 years agoimap: Add client_create_finish() to finish namespace creation.
Timo Sirainen [Thu, 15 Feb 2018 16:15:16 +0000 (18:15 +0200)] 
imap: Add client_create_finish() to finish namespace creation.

7 years agoimap: When running standalone, delay initializing namespaces until PREAUTH is sent
Timo Sirainen [Thu, 15 Feb 2018 16:13:20 +0000 (18:13 +0200)] 
imap: When running standalone, delay initializing namespaces until PREAUTH is sent

Most importantly this makes the code paths similar for standalone and
non-standalone clients, which is needed by the following commits.

7 years agolib-storage: Unless LAYOUT=index, don't rebuild list index on missing INBOX
Timo Sirainen [Mon, 19 Feb 2018 12:44:04 +0000 (14:44 +0200)] 
lib-storage: Unless LAYOUT=index, don't rebuild list index on missing INBOX

7 years agolib-storage: mailbox_list_index_handle_corruption() - Lock mailbox list while rebuilding
Timo Sirainen [Mon, 19 Feb 2018 10:54:53 +0000 (12:54 +0200)] 
lib-storage: mailbox_list_index_handle_corruption() - Lock mailbox list while rebuilding

This guards against simultaneous mailbox create/delete/rename.

7 years agolib-storage: mailbox_list_index_handle_corruption() - Move actual handling to its...
Timo Sirainen [Mon, 19 Feb 2018 10:53:46 +0000 (12:53 +0200)] 
lib-storage: mailbox_list_index_handle_corruption() - Move actual handling to its own function

7 years agolib-ssl-iostream,login-common: Use SSL_CTX_set_min_proto_version
Martti Rannanjärvi [Thu, 30 Nov 2017 10:03:36 +0000 (12:03 +0200)] 
lib-ssl-iostream,login-common: Use SSL_CTX_set_min_proto_version

Use SSL_CTX_set_min_proto_version to set the minimum ssl protocol
version where available.

7 years agolib-ssl-iostream: Add ssl_protocols_to_min_protocol()
Martti Rannanjärvi [Sat, 11 Nov 2017 02:28:57 +0000 (04:28 +0200)] 
lib-ssl-iostream: Add ssl_protocols_to_min_protocol()

This detects minimum SSL protocol version from the ssl_protocols
setting.

7 years agoconfigure.ac: Add SSL_CTX_set_min_proto_version detection
Martti Rannanjärvi [Thu, 30 Nov 2017 09:15:50 +0000 (11:15 +0200)] 
configure.ac: Add SSL_CTX_set_min_proto_version detection

7 years agologin-common: Explicitly ignore SSL_CTX_set_ecdh_auto() return value
Martti Rannanjärvi [Mon, 19 Feb 2018 12:51:41 +0000 (14:51 +0200)] 
login-common: Explicitly ignore SSL_CTX_set_ecdh_auto() return value

This is to fix a compiler warning.

7 years agologin-common,lib-ssl-iostream: Use SSL_CTX_set_ecdh_auto
Aki Tuomi [Mon, 19 Feb 2018 07:54:09 +0000 (09:54 +0200)] 
login-common,lib-ssl-iostream: Use SSL_CTX_set_ecdh_auto

This macro is same for 1.0.2 and 1.1.0 and libressl.

7 years agoimap: If snippet is not available return NIL
Aki Tuomi [Sun, 18 Feb 2018 16:11:18 +0000 (18:11 +0200)] 
imap: If snippet is not available return NIL

7 years agoimap: Fix FETCH SNIPPET
Timo Sirainen [Sat, 17 Feb 2018 22:53:12 +0000 (00:53 +0200)] 
imap: Fix FETCH SNIPPET

1) _BUFFERED flag wasn't set, which caused a missing space before the "SNIPPET".
2) It caused \Seen flag to be added to the mail

7 years agoimap: Don't enforce sending SNIPPET reply as literal
Timo Sirainen [Fri, 16 Feb 2018 12:49:59 +0000 (14:49 +0200)] 
imap: Don't enforce sending SNIPPET reply as literal

Also change it to use "cur_str" since the reply is never very long.

7 years agoimap: Add parenthesis to FETCH SNIPPET (FUZZY text) response
Timo Sirainen [Fri, 16 Feb 2018 12:46:36 +0000 (14:46 +0200)] 
imap: Add parenthesis to FETCH SNIPPET (FUZZY text) response

Otherwise it violates the RFC 3501 text about FETCH responses.

7 years agocharset-alias: Fix keyvalues iteration
Martti Rannanjärvi [Fri, 16 Feb 2018 14:59:35 +0000 (16:59 +0200)] 
charset-alias: Fix keyvalues iteration

charset-alias-plugin.c:113:27: error: comparison between pointer and zero
character constant [-Werror=pointer-compare]
  for (i = 0; keyvalues[i] != '\0'; i++) {
                           ^~
charset-alias-plugin.c:113:14: note: did you mean to dereference the pointer?
  for (i = 0; keyvalues[i] != '\0'; i++) {

7 years agocharset-alias: Cleanup whitespace
Martti Rannanjärvi [Fri, 16 Feb 2018 14:53:04 +0000 (16:53 +0200)] 
charset-alias: Cleanup whitespace

Remove \r from end of lines and remove trailing whitespace.

7 years agocharset-alias-plugin
Hideo Yoshizane [Thu, 25 Jan 2018 00:36:22 +0000 (19:36 -0500)] 
charset-alias-plugin

7 years agolib-charset: Allow plugins to replace charset_* functions
Timo Sirainen [Thu, 9 Nov 2017 13:18:29 +0000 (15:18 +0200)] 
lib-charset: Allow plugins to replace charset_* functions

They just need to point charset_utf8_vfuncs to their own implementation.

7 years agolib-charset: Move non-iconv UTF-8 only translation code to its own file
Timo Sirainen [Thu, 9 Nov 2017 13:12:05 +0000 (15:12 +0200)] 
lib-charset: Move non-iconv UTF-8 only translation code to its own file

7 years agolib-http: server: Recreate connection IO after streams change.
Stephan Bosch [Fri, 9 Feb 2018 22:57:29 +0000 (23:57 +0100)] 
lib-http: server: Recreate connection IO after streams change.

7 years agolib-http: client: Recreate connection IO after streams change.
Stephan Bosch [Fri, 9 Feb 2018 22:56:55 +0000 (23:56 +0100)] 
lib-http: client: Recreate connection IO after streams change.

7 years agolib-http: server: Use the new connection_input_halt/resume() functions.
Stephan Bosch [Sat, 10 Feb 2018 09:29:44 +0000 (10:29 +0100)] 
lib-http: server: Use the new connection_input_halt/resume() functions.

7 years agolib-http: client: Use the new connection_input_halt/resume() functions.
Stephan Bosch [Sat, 10 Feb 2018 09:27:19 +0000 (10:27 +0100)] 
lib-http: client: Use the new connection_input_halt/resume() functions.

7 years agolib-ssl-iostream: ostream-openssl: Fix behavior of o_stream_flush() so that 1 is...
Stephan Bosch [Fri, 9 Feb 2018 16:24:28 +0000 (17:24 +0100)] 
lib-ssl-iostream: ostream-openssl: Fix behavior of o_stream_flush() so that 1 is only returned when buffer is empty.

7 years agolib-ssl-iostream: ostream-openssl: Create local variable for sstream->ssl_io->plain_o...
Stephan Bosch [Thu, 15 Feb 2018 14:47:48 +0000 (15:47 +0100)] 
lib-ssl-iostream: ostream-openssl: Create local variable for sstream->ssl_io->plain_output in o_stream_ssl_flush().

7 years agolib: connection: Add connection_input_halt() and connection_input_resume().
Stephan Bosch [Sat, 10 Feb 2018 08:55:43 +0000 (09:55 +0100)] 
lib: connection: Add connection_input_halt() and connection_input_resume().

These are convenience functions that remove and add conn->io respectively.

7 years agoauth: Set correct context type when bypassing reporting in auth_success
Aki Tuomi [Mon, 12 Feb 2018 10:28:37 +0000 (12:28 +0200)] 
auth: Set correct context type when bypassing reporting in auth_success

Broken in 41ff6e6a4a085786d4c15a58c7c50a28e2110c3f

7 years agolib: Add i_stream_get_root_io() and use it to deduplicate code
Timo Sirainen [Thu, 8 Feb 2018 00:22:18 +0000 (02:22 +0200)] 
lib: Add i_stream_get_root_io() and use it to deduplicate code

7 years agolib: Add connection_streams_changed()
Timo Sirainen [Thu, 8 Feb 2018 08:52:57 +0000 (10:52 +0200)] 
lib: Add connection_streams_changed()

Originally by Stephan Bosch

7 years agodoveadm: client: Set IO only after enabling SSL
Timo Sirainen [Thu, 8 Feb 2018 00:38:23 +0000 (02:38 +0200)] 
doveadm: client: Set IO only after enabling SSL

io_add_istream() needs to be used with the SSL istream, otherwise it can
cause hangs.

7 years agolib-imap-client: Fix IO after enabling SSL
Timo Sirainen [Thu, 8 Feb 2018 00:28:54 +0000 (02:28 +0200)] 
lib-imap-client: Fix IO after enabling SSL

io_add_istream() needs to be used with the SSL istream, otherwise it can
cause hangs.

7 years agodoveadm-server: Fix potential hangs with SSL connections
Timo Sirainen [Fri, 22 Dec 2017 09:25:06 +0000 (11:25 +0200)] 
doveadm-server: Fix potential hangs with SSL connections

7 years agoauth: Add policy check configuration options
Aki Tuomi [Tue, 6 Feb 2018 07:48:11 +0000 (09:48 +0200)] 
auth: Add policy check configuration options

Allows disabling before/after auth checks, or reporting.

7 years agoauth: Use correct username is auth policy requests
Aki Tuomi [Mon, 5 Feb 2018 12:26:15 +0000 (14:26 +0200)] 
auth: Use correct username is auth policy requests

When doing master authentication as first, use
the username of the user, not master user, for policy lookup.

7 years agoauth: Use rip instead of real_rip in policy server attributes
Aki Tuomi [Fri, 1 Dec 2017 11:49:31 +0000 (13:49 +0200)] 
auth: Use rip instead of real_rip in policy server attributes

real_rip contains proxy IP, not client IP

7 years agoreplication: Don't send notification for changes done by dsync transactions
Timo Sirainen [Tue, 6 Feb 2018 13:12:26 +0000 (15:12 +0200)] 
replication: Don't send notification for changes done by dsync transactions

7 years agolib-storage: Set mailbox_transaction_context.flags earlier
Timo Sirainen [Tue, 6 Feb 2018 13:10:48 +0000 (15:10 +0200)] 
lib-storage: Set mailbox_transaction_context.flags earlier

Set it in index_transaction_init() so plugins' transaction_begin() methods
see it after calling super.transaction_begin().

7 years agodoveadm-server: http: Fixed lingering connections after the request is sent.
Stephan Bosch [Tue, 17 Oct 2017 01:19:19 +0000 (03:19 +0200)] 
doveadm-server: http: Fixed lingering connections after the request is sent.

Turns out conn->http_client is already NULL while doveadm_http_server_connection_destroy() is called.
This is because http_server_connection_unref() sets it to NULL;
Fixed by removing useless HTTP connection reference.

7 years agodoveadm-server: http: Fixed crash occurring when disconnecting a client at server...
Stephan Bosch [Sun, 18 Jun 2017 17:55:23 +0000 (19:55 +0200)] 
doveadm-server: http: Fixed crash occurring when disconnecting a client at server deinit.

7 years agoold-stats: Set process dumpable during stats gathering
Aki Tuomi [Thu, 8 Feb 2018 11:04:48 +0000 (13:04 +0200)] 
old-stats: Set process dumpable during stats gathering

/proc/self/io is not accessible otherwise

7 years agolib: Add restrict_access_get/set_dumpable
Aki Tuomi [Thu, 8 Feb 2018 11:03:37 +0000 (13:03 +0200)] 
lib: Add restrict_access_get/set_dumpable

7 years agolib: Clarify restrict_access_allow_coredumps
Aki Tuomi [Thu, 8 Feb 2018 11:01:50 +0000 (13:01 +0200)] 
lib: Clarify restrict_access_allow_coredumps

7 years agolib-index: Fix assert-crash with lock_method=dotlock
Timo Sirainen [Wed, 7 Feb 2018 14:17:13 +0000 (16:17 +0200)] 
lib-index: Fix assert-crash with lock_method=dotlock

The dotlock wasn't deleted in all code paths. Fix this by simplifying
the unlocking to be done the same way with and without dotlock.

Fixes:
Panic: file mail-cache.c: line 624 (mail_cache_lock_file): assertion failed: (cache->dotlock == NULL)

7 years agolib-storage: Lock mailbox_list for mailbox create/delete/rename
Timo Sirainen [Tue, 9 Jan 2018 20:37:25 +0000 (15:37 -0500)] 
lib-storage: Lock mailbox_list for mailbox create/delete/rename

This is only required for mailbox creation to fix a race condition with
LAYOUT=index: If INBOX doesn't exist it will rescan the mailboxes to
find out if there are any missing ones. If INBOX creation isn't locked,
it's possible that the first process hasn't finished creating INBOX
before the second process find it and attempts to open it.

The delete and rename locking are probably useful to guard against race
conditions when clients intentionally issues create/delete/rename commands
concurrently.

7 years agolib-storage: Add mailbox_list_[un]lock()
Timo Sirainen [Tue, 9 Jan 2018 20:36:58 +0000 (15:36 -0500)] 
lib-storage: Add mailbox_list_[un]lock()

7 years agolib-storage: mailbox_delete() - Fix cleanup in error handling
Timo Sirainen [Tue, 9 Jan 2018 20:35:13 +0000 (15:35 -0500)] 
lib-storage: mailbox_delete() - Fix cleanup in error handling

If removing index deletion mark failed, box->deleting wasn't set to FALSE
and the mailbox was left opened.

7 years agolib-storage: mailbox_rename() - Use source storage for errors
Timo Sirainen [Tue, 9 Jan 2018 20:33:26 +0000 (15:33 -0500)] 
lib-storage: mailbox_rename() - Use source storage for errors

It was documented to use source storage for errors, but some of the errors
were set to destination storage.

7 years agolib-storage: mail_storage_lock_create() - add support for dotlocks
Timo Sirainen [Tue, 6 Feb 2018 16:01:04 +0000 (18:01 +0200)] 
lib-storage: mail_storage_lock_create() - add support for dotlocks

7 years agolib-storage: Change mail_user_lock_file_create() to use mail_storage_lock_create()
Timo Sirainen [Tue, 6 Feb 2018 15:49:15 +0000 (17:49 +0200)] 
lib-storage: Change mail_user_lock_file_create() to use mail_storage_lock_create()

7 years agolib-storage: Add mail_storage_lock_create()
Timo Sirainen [Tue, 6 Feb 2018 15:47:37 +0000 (17:47 +0200)] 
lib-storage: Add mail_storage_lock_create()

This is split off of mailbox_lock_file_create().

7 years agolib: Add file_lock_from_dotlock()
Timo Sirainen [Tue, 6 Feb 2018 15:35:18 +0000 (17:35 +0200)] 
lib: Add file_lock_from_dotlock()

The dotlock creation requires various settings, so the file-lock.h API can't
easily be used to create it. But once created, it's simpler to keep all lock
types in the same struct file_lock, which can be unlocked/freed once
finished.

7 years agoLAYOUT=index: Fix crash in doveadm force-resync if storage doesn't implement list_ind...
Timo Sirainen [Wed, 13 Dec 2017 13:48:17 +0000 (15:48 +0200)] 
LAYOUT=index: Fix crash in doveadm force-resync if storage doesn't implement list_index_corrupted()

Broken by recent changes.

7 years agoLAYOUT=index: Fix updating STATUS changes in mailbox list index
Timo Sirainen [Tue, 12 Dec 2017 16:10:40 +0000 (18:10 +0200)] 
LAYOUT=index: Fix updating STATUS changes in mailbox list index

Mailbox list index backend code was overriding sync_init and sync_deinit
methods, which STATUS handling had already already overridden. They both
used the same super struct, so STATUS's sync_* were never called.

7 years agofs-posix: Fix iterating directories when readdir() returns DT_UNKNOWN
Timo Sirainen [Tue, 6 Feb 2018 10:37:34 +0000 (12:37 +0200)] 
fs-posix: Fix iterating directories when readdir() returns DT_UNKNOWN

Files were iterated correctly, but directories weren't. This mainly broke
directory iteration with NFS when nordirplus mount option was used.

7 years agofts: Don't reindex FTS mails if .cache file is deleted
Timo Sirainen [Mon, 5 Feb 2018 20:21:13 +0000 (22:21 +0200)] 
fts: Don't reindex FTS mails if .cache file is deleted

This means that if fts is enabled, "doveadm index" no longer adds mails
to dovecot.index.cache if it's deleted. However, it was rarely used for
that purpose. More likely due to a corrupted cache file all the mails were
unnecessarily being opened and reindexed.

7 years agocassandra: Make sure timestamp is always logged (if set) with debug_queries=y
Timo Sirainen [Wed, 7 Feb 2018 13:28:45 +0000 (15:28 +0200)] 
cassandra: Make sure timestamp is always logged (if set) with debug_queries=y

It wasn't logged in some code paths.

7 years agocassandra: Fix setting timestamp for transaction queries with v3 protocol
Timo Sirainen [Wed, 7 Feb 2018 13:27:07 +0000 (15:27 +0200)] 
cassandra: Fix setting timestamp for transaction queries with v3 protocol

It was working for prepared statements, but not for non-prepared statements.

7 years agodoveadm: dsync: Switch ioloop for input/output streams while making TCP connection.
Stephan Bosch [Mon, 29 Jan 2018 18:10:38 +0000 (19:10 +0100)] 
doveadm: dsync: Switch ioloop for input/output streams while making TCP connection.

This task is performed in a sub-ioloop, and when returning from that ioloop, the
output stream would sometimes still have an object on the sub-ioloop that was
just destroyed.

7 years agolib-ssl-iostream: openssl: Make verbose logging robust against i_debug() writing...
Stephan Bosch [Mon, 29 Jan 2018 17:28:25 +0000 (18:28 +0100)] 
lib-ssl-iostream: openssl: Make verbose logging robust against i_debug() writing to stream itself.

In dsync, i_debug() is overridden to write to the SSL stream itself through a
multiplexed data stream. So, during the i_debug() call all kinds of things can
happen to the persisted error string in the stream, which caused problems.

7 years agofts: Fix searching headers with TEXT/BODY
Timo Sirainen [Mon, 5 Feb 2018 21:54:33 +0000 (23:54 +0200)] 
fts: Fix searching headers with TEXT/BODY

TEXT is searching headers and BODY is searching MIME headers. Those headers
were indexed with data language, so search must also include data language
when looking up words. We'll just include the data language for all
searches now, so it should always work correctly.

7 years agofts: Fix searching SEARCH_HEADER_ADDRESS/COMPRESS_LWSP
Timo Sirainen [Mon, 5 Feb 2018 21:51:51 +0000 (23:51 +0200)] 
fts: Fix searching SEARCH_HEADER_ADDRESS/COMPRESS_LWSP

These are "non-language" headers that are being searched, so they need to be
searched using data language.

7 years agolib-http: queue: Update the correct timout while dropping a request from the delay...
Stephan Bosch [Fri, 12 Jan 2018 20:03:41 +0000 (21:03 +0100)] 
lib-http: queue: Update the correct timout while dropping a request from the delay queue.

The absolute request timeout rather than the delay timeout was updated for the
removal of the request from the delay queue.