]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
5 years agoRelease 2.2.36.4 release-2.2.36 2.2.36.4
Aki Tuomi [Wed, 28 Aug 2019 08:04:19 +0000 (11:04 +0300)] 
Release 2.2.36.4

6 years agolib-http: Add http_client_request_add_missing_header()
Timo Sirainen [Mon, 27 May 2019 15:25:38 +0000 (18:25 +0300)] 
lib-http: Add http_client_request_add_missing_header()

6 years agolib-http: Add http_client_request_lookup_header()
Timo Sirainen [Mon, 27 May 2019 14:55:56 +0000 (17:55 +0300)] 
lib-http: Add http_client_request_lookup_header()

6 years agolib-http: http_client_request_remove_header() - Don't crash if no headers are added
Timo Sirainen [Mon, 27 May 2019 14:53:16 +0000 (17:53 +0300)] 
lib-http: http_client_request_remove_header() - Don't crash if no headers are added

Fixes a crash if http_client_request_add_header() hasn't been called
before http_client_request_remove_header()

6 years agolib-http: http_client_request_add_header() - Replace existing header
Timo Sirainen [Mon, 27 May 2019 14:47:16 +0000 (17:47 +0300)] 
lib-http: http_client_request_add_header() - Replace existing header

If header with the same key already exists, just replace the value.
HTTP supports having multiple headers with the same key only when they
can be rewritten into a single comma-separated header. So practically
there's no reason for lib-http to need to support adding multiple
headers. Replacing an existing value is more useful generally.

6 years agolib-http: http_client_request_remove_header() - split off header finding
Timo Sirainen [Mon, 27 May 2019 14:46:37 +0000 (17:46 +0300)] 
lib-http: http_client_request_remove_header() - split off header finding

6 years agolib: str - Add str_replace().
Stephan Bosch [Thu, 14 Mar 2019 23:14:05 +0000 (00:14 +0100)] 
lib: str - Add str_replace().

6 years agolib: buffer - Add buffer_replace().
Stephan Bosch [Thu, 14 Mar 2019 22:55:00 +0000 (23:55 +0100)] 
lib: buffer - Add buffer_replace().

6 years agolib: buffer - Improve header comment for buffer_insert() and buffer_delete().
Stephan Bosch [Sun, 17 Mar 2019 23:52:37 +0000 (00:52 +0100)] 
lib: buffer - Improve header comment for buffer_insert() and buffer_delete().

6 years agolib-imap: Make sure str_unescape() won't be writing past allocated memory
Timo Sirainen [Fri, 17 May 2019 07:33:53 +0000 (10:33 +0300)] 
lib-imap: Make sure str_unescape() won't be writing past allocated memory

The previous commit should already prevent this, but this makes sure it
can't become broken in the future either. It makes the performance a tiny
bit worse, but that's not practically noticeable.

6 years agolib-imap: Don't accept strings with NULs
Timo Sirainen [Fri, 10 May 2019 16:24:51 +0000 (19:24 +0300)] 
lib-imap: Don't accept strings with NULs

IMAP doesn't allow NULs except in binary literals. We'll still allow them
in regular literals as well, but just not in strings.

This fixes a bug with unescaping a string with NULs: str_unescape() could
have been called for memory that points outside the allocated string,
causing heap corruption. This could cause crashes or theoretically even
result in remote code execution exploit.

Found by Nick Roessler and Rafi Rubin

6 years agoReleased v2.2.36.3. 2.2.36.3
Timo Sirainen [Mon, 18 Mar 2019 08:13:08 +0000 (10:13 +0200)] 
Released v2.2.36.3.

6 years agofts: Fix buffer overflow when reading oversized fts header
Timo Sirainen [Tue, 5 Feb 2019 03:25:13 +0000 (19:25 -0800)] 
fts: Fix buffer overflow when reading oversized fts header

6 years agolib-storage: Fix buffer overflow when reading oversized hdr-pop3-uidl header
Timo Sirainen [Tue, 5 Feb 2019 03:23:02 +0000 (19:23 -0800)] 
lib-storage: Fix buffer overflow when reading oversized hdr-pop3-uidl header

6 years agoReleased v2.2.36.1. 2.2.36.1
Timo Sirainen [Mon, 4 Feb 2019 16:59:04 +0000 (08:59 -0800)] 
Released v2.2.36.1.

6 years agolib-master: ipc-client - Fix crash on connect failure
Timo Sirainen [Thu, 31 Jan 2019 12:07:19 +0000 (14:07 +0200)] 
lib-master: ipc-client - Fix crash on connect failure

Broken by b7ecba9d6d358569d367620f95e3817da99e0036, which relied on v2.3
behavior for timeout_remove().

6 years agoauth: Do not import empty certificate username
Aki Tuomi [Wed, 16 Jan 2019 16:28:57 +0000 (18:28 +0200)] 
auth: Do not import empty certificate username

6 years agoauth: Fail authentication if certificate username was unexpectedly missing
Aki Tuomi [Mon, 21 Jan 2019 08:54:06 +0000 (10:54 +0200)] 
auth: Fail authentication if certificate username was unexpectedly missing

6 years agologin-common: Ensure we get username from certificate
Aki Tuomi [Mon, 21 Jan 2019 09:36:30 +0000 (11:36 +0200)] 
login-common: Ensure we get username from certificate

6 years agoLAYOUT=index: Fix rebuilding mailbox list index on force-resync
Timo Sirainen [Tue, 15 Jan 2019 23:00:22 +0000 (01:00 +0200)] 
LAYOUT=index: Fix rebuilding mailbox list index on force-resync

The if-check was a bit confusing because have_backend==TRUE means that there
the mailbox list index is only an index, while have_backend==FALSE means
that the mailbox list index is the only source for the list of mailboxes
(= list index is the backend).

6 years agolib-master: ipc-client: Don't free command too early
Timo Sirainen [Tue, 2 Oct 2018 07:22:11 +0000 (10:22 +0300)] 
lib-master: ipc-client: Don't free command too early

When multiple replies were received by IPC only the final reply should free
the command. This may have caused e.g. "doveadm proxy list" to crash.
Broken by 435f0545b200767c25a5daee17cd6b4998d03710

6 years agodirector: Allow fully freeing user while waiting for IPC kick to finish
Timo Sirainen [Thu, 5 Jul 2018 11:55:38 +0000 (14:55 +0300)] 
director: Allow fully freeing user while waiting for IPC kick to finish

director_user_move_free() will now just free the IPC command, so this isn't
a problem anymore.

6 years agodirector: Fix crash when user kill times out before IPC finishes
Timo Sirainen [Thu, 5 Jul 2018 11:53:02 +0000 (14:53 +0300)] 
director: Fix crash when user kill times out before IPC finishes

Abort the IPC kick command when freeing kill context so the IPC callback
won't be called.

6 years agolib-master: ipc-client: Support aborting commands
Timo Sirainen [Thu, 5 Jul 2018 11:42:30 +0000 (14:42 +0300)] 
lib-master: ipc-client: Support aborting commands

6 years agolib-master: ipc-client: Cleanup - avoid extra return in the function
Timo Sirainen [Thu, 5 Jul 2018 11:41:38 +0000 (14:41 +0300)] 
lib-master: ipc-client: Cleanup - avoid extra return in the function

Simplifies the following commit.

6 years agolib-master: ipc-client: Never call callback directly from ipc_client_cmd()
Timo Sirainen [Thu, 5 Jul 2018 11:38:51 +0000 (14:38 +0300)] 
lib-master: ipc-client: Never call callback directly from ipc_client_cmd()

This may simplify the calling code, especially after the following commit
that returns the command pointer.

6 years agolib-master: ipc-client: Split code to ipc_client_abort_commands()
Timo Sirainen [Thu, 5 Jul 2018 11:35:51 +0000 (14:35 +0300)] 
lib-master: ipc-client: Split code to ipc_client_abort_commands()

6 years agolib-master: ipc-client: Use linked list of commads instead of array
Timo Sirainen [Thu, 5 Jul 2018 11:25:46 +0000 (14:25 +0300)] 
lib-master: ipc-client: Use linked list of commads instead of array

Needed for the following commit that returns the command pointer.

6 years agolib-master: ipc-client: Don't call callback twice if IPC proxy sends invalid input
Timo Sirainen [Thu, 5 Jul 2018 10:40:43 +0000 (13:40 +0300)] 
lib-master: ipc-client: Don't call callback twice if IPC proxy sends invalid input

ipc_client_disconnect() called it once, and the second time was done with
the cmds[0] that was already removed from the array.

6 years agopop3: Do not expunge \Deleted mails without QUIT
Aki Tuomi [Wed, 5 Sep 2018 16:34:20 +0000 (19:34 +0300)] 
pop3: Do not expunge \Deleted mails without QUIT

Prevents loss of email if connection
is unexpectedly terminated.

6 years agolib-storage: Fix bodystructure parsing crash if header is parsed twice
Timo Sirainen [Wed, 25 Jul 2018 10:17:45 +0000 (13:17 +0300)] 
lib-storage: Fix bodystructure parsing crash if header is parsed twice

The second parsing will recreate the parser_ctx, discarding the old parsed
message_part.data for the header. On the second parsing
save_bodystructure_header=FALSE so the message_part.data isn't filled for
the header. Later on the bodystructure parsing assumes the data is set,
and crashes.

This only happened with mail_attachment_detection_options=add-flags-on-save
and Sieve script that first accessed a non-cached header and then used the
"body" extension.

Fixes segfault and also:
Panic: file imap-bodystructure.c: line 116 (part_write_body_multipart): assertion failed: (part->data != NULL)

6 years agolib-mail: Add asserts to message_part_*() to make sure part->data isn't NULL
Timo Sirainen [Wed, 25 Jul 2018 10:17:05 +0000 (13:17 +0300)] 
lib-mail: Add asserts to message_part_*() to make sure part->data isn't NULL

This makes it easier to debug the crashes than just having a segfault.

6 years agolib: istream-try - Don't assert-crash with empty parent istream
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)

6 years agolib-imap: Remove content_subtype==NULL checks
Timo Sirainen [Tue, 24 Jul 2018 12:00:19 +0000 (15:00 +0300)] 
lib-imap: Remove content_subtype==NULL checks

This can never happen after the previous commit. This also changes the
BODYSTRUCTURE output for invalid Content-Types, but since they're invalid
anyway it doesn't really matter what the output is.

6 years agolib-mail: If message_part_data.content_type is set, make sure content_subtype isn...
Timo Sirainen [Tue, 24 Jul 2018 11:55:25 +0000 (14:55 +0300)] 
lib-mail: If message_part_data.content_type is set, make sure content_subtype isn't NULL

This fixes a crash in index_mail_find_first_text_mime_part() where snippet
generation assumed that content_subtype isn't NULL.

7 years agolib: io_loop_context_new() - deactivate old context
Timo Sirainen [Mon, 11 Dec 2017 23:02:27 +0000 (01:02 +0200)] 
lib: io_loop_context_new() - deactivate old context

Since it changes the current context, it needs to deactivate the old one.

7 years agolib-dcrypt: istream-decrypt - Add support for getting stream size
Timo Sirainen [Tue, 5 Jun 2018 12:31:20 +0000 (15:31 +0300)] 
lib-dcrypt: istream-decrypt - Add support for getting stream size

7 years agolib-dcrypt: istream-decrypt - Add support for seeking
Timo Sirainen [Tue, 5 Jun 2018 10:34:02 +0000 (13:34 +0300)] 
lib-dcrypt: istream-decrypt - Add support for seeking

7 years agolib: Add i_stream_nonseekable_try_seek()
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.

7 years agopop3c: Ensure pop3c index directory is autocreated
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

7 years agocassandra: Fix empty binary parameters with prepared statements
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

7 years agofs-posix: Support FS_METADATA_WRITE_FNAME for fs_copy()
Timo Sirainen [Tue, 22 May 2018 13:06:15 +0000 (16:06 +0300)] 
fs-posix: Support FS_METADATA_WRITE_FNAME for fs_copy()

7 years agoReleased v2.2.36. 2.2.36
Timo Sirainen [Wed, 23 May 2018 12:35:50 +0000 (15:35 +0300)] 
Released v2.2.36.

7 years agoman: doveadm-mailbox.1.in - Fix doveadm-search-query(7) section
Timo Sirainen [Tue, 22 May 2018 07:59:11 +0000 (10:59 +0300)] 
man: doveadm-mailbox.1.in - Fix doveadm-search-query(7) section

7 years agolib-imap: imap_envelope_parse() - remove unnecessary data stack frame
Timo Sirainen [Wed, 15 Nov 2017 13:53:03 +0000 (15:53 +0200)] 
lib-imap: imap_envelope_parse() - remove unnecessary data stack frame

imap_envelope_parse_args() isn't using data stack at all, so this
unnecessarily complicates the code. It also prevents using datastack-pool
as the pool parameter.

7 years agofs-posix: Fix fs_iter_next() to return any kinds of files.
Timo Sirainen [Mon, 14 May 2018 12:46:01 +0000 (15:46 +0300)] 
fs-posix: Fix fs_iter_next() to return any kinds of files.

Only regular files and symlinks were returned. It should return everything
else as well (fifos, sockets, devices).

7 years agolib-master: postlogin: Don't unreference already closed login-connection
Timo Sirainen [Thu, 17 May 2018 15:35:04 +0000 (18:35 +0300)] 
lib-master: postlogin: Don't unreference already closed login-connection

If the login-connection was already closed, this caused too many
unreferences.

Fixes:
Panic: file master-login.c: line 544 (master_login_conn_unref): assertion failed: (conn->clients == NULL)

7 years agoauth: Improve auth-master connections' error logging
Timo Sirainen [Fri, 4 May 2018 12:27:14 +0000 (15:27 +0300)] 
auth: Improve auth-master connections' error logging

Include connect and handshake times in the error message.

7 years agolib-master: Add auth connect & handshake times to master_login_auth_request errors
Timo Sirainen [Fri, 4 May 2018 11:14:35 +0000 (14:14 +0300)] 
lib-master: Add auth connect & handshake times to master_login_auth_request errors

7 years agolib-master: Add request time also for internal failure error messages
Timo Sirainen [Fri, 4 May 2018 11:10:49 +0000 (14:10 +0300)] 
lib-master: Add request time also for internal failure error messages

7 years agolib-master: Use more exact timestamp in master_login_auth_request failures
Timo Sirainen [Fri, 4 May 2018 11:03:46 +0000 (14:03 +0300)] 
lib-master: Use more exact timestamp in master_login_auth_request failures

7 years agolib-master: Improve error logging for master_auth_connection failures
Timo Sirainen [Fri, 4 May 2018 10:56:45 +0000 (13:56 +0300)] 
lib-master: Improve error logging for master_auth_connection failures

7 years agolib-master: Improve error logging for post-login script failures
Timo Sirainen [Fri, 4 May 2018 10:42:23 +0000 (13:42 +0300)] 
lib-master: Improve error logging for post-login script failures

7 years agolib-master: Improve error logging when master_login_connection gets disconnected
Timo Sirainen [Fri, 4 May 2018 10:23:07 +0000 (13:23 +0300)] 
lib-master: Improve error logging when master_login_connection gets disconnected

7 years agolib-master: Keep linked list of master_login_clients per connection
Timo Sirainen [Fri, 4 May 2018 10:07:50 +0000 (13:07 +0300)] 
lib-master: Keep linked list of master_login_clients per connection

This allows improving logging on connection errors.

7 years agolib-master: If connect() to backend UNIX socket is retried, log a warning
Timo Sirainen [Fri, 13 Apr 2018 13:14:18 +0000 (16:14 +0300)] 
lib-master: If connect() to backend UNIX socket is retried, log a warning

For example if imap-login process needs to retry before it successfully
connects to imap process's socket, a warning is logged. This warning is
important because it means that the imap-login process may have been
sleeping up to 0.5 seconds and causing all the other connections to hang
during it.

It would be better to make this retrying asynchronous, but before spending
time on doing that, lets see if this warning is ever even being logged.

7 years agolib-master: Add how long request took for "Internal auth failure" errors
Timo Sirainen [Fri, 13 Apr 2018 13:12:27 +0000 (16:12 +0300)] 
lib-master: Add how long request took for "Internal auth failure" errors

7 years agolib/compat.h: Undefine WORDS_BIGENDIAN when it's defined as 0
Martti Rannanjärvi [Fri, 27 Oct 2017 08:08:36 +0000 (11:08 +0300)] 
lib/compat.h: Undefine WORDS_BIGENDIAN when it's defined as 0

7 years agocassandra: Fix consistency=quorum to work
Timo Sirainen [Thu, 17 May 2018 13:29:28 +0000 (16:29 +0300)] 
cassandra: Fix consistency=quorum to work

Previously it could have been used by setting "consistency=", but this was
an accident.

7 years agocassandra: Use fallback_consistency on more types of errors
Timo Sirainen [Thu, 3 May 2018 14:06:04 +0000 (17:06 +0300)] 
cassandra: Use fallback_consistency on more types of errors

This could allow for example read_consistency=local-quorum with
read_fallback_consistency=quorum, so most of the time the reads are
from local datacenter, but in case it has problems you can switch to
other datacenters.

7 years agocassandra: Cleanup - Move code to query_error_want_fallback()
Timo Sirainen [Thu, 3 May 2018 13:58:21 +0000 (16:58 +0300)] 
cassandra: Cleanup - Move code to query_error_want_fallback()

This allows extending it more easily.

7 years agodict-sql: dict doesn't support NULL values, so convert SQL NULLs to ""
Timo Sirainen [Fri, 6 Oct 2017 12:54:47 +0000 (15:54 +0300)] 
dict-sql: dict doesn't support NULL values, so convert SQL NULLs to ""

7 years agolib-sql: Add comments about NULL values.
Timo Sirainen [Fri, 6 Oct 2017 12:52:36 +0000 (15:52 +0300)] 
lib-sql: Add comments about NULL values.

7 years agofs-posix: Strip trailing "/" from filenames
Timo Sirainen [Tue, 15 May 2018 14:50:27 +0000 (17:50 +0300)] 
fs-posix: Strip trailing "/" from filenames

This is mainly because "doveadm fs delete -R" adds it to indicate to the
fs-driver that the whole directory is wanted to be deleted. This change
fixes fs-posix to work with NFS, where otherwise unlink("symlink-to-dir/")
fails with ENOTDIR. Without NFS the same call succeeds.

7 years agofts: When indexing virtual mailbox, index each real mailbox entirely
Timo Sirainen [Thu, 3 May 2018 15:33:25 +0000 (18:33 +0300)] 
fts: When indexing virtual mailbox, index each real mailbox entirely

Index all the unindexed messages in them at once, instead of jumping between
real mailboxes and indexing them in small pieces.

7 years agofts: Indexing virtual mailbox didn't always index the last mails
Timo Sirainen [Thu, 3 May 2018 15:33:00 +0000 (18:33 +0300)] 
fts: Indexing virtual mailbox didn't always index the last mails

7 years agofts: Make sure indexing virtual mailbox doesn't recurse and index mail multiple times
Timo Sirainen [Thu, 3 May 2018 15:30:51 +0000 (18:30 +0300)] 
fts: Make sure indexing virtual mailbox doesn't recurse and index mail multiple times

7 years agofs-posix: mkdir missing directory if it's changed by FS_METADATA_WRITE_FNAME
Timo Sirainen [Thu, 3 May 2018 12:22:09 +0000 (15:22 +0300)] 
fs-posix: mkdir missing directory if it's changed by FS_METADATA_WRITE_FNAME

The temp file is created to the initial directory. If the directory is
changed by FS_METADATA_WRITE_FNAME, the new destination directory didn't
necessarily exist. If the link() or rename() fails with ENOENT, try to
mkdir the missing directories.

7 years agolib-storage: Replace DBOX_GUID_BIN_LEN with GUID_128_SIZE
Martti Rannanjärvi [Tue, 24 Oct 2017 07:27:23 +0000 (10:27 +0300)] 
lib-storage: Replace DBOX_GUID_BIN_LEN with GUID_128_SIZE

DBOX_GUID_BIN_LEN define was removed in 0c909e, replace the use with
GUID_128_SIZE.

7 years agolib: Don't use NEEDS_LOCAL_CREDS undefined
Martti Rannanjärvi [Mon, 30 Oct 2017 17:29:02 +0000 (19:29 +0200)] 
lib: Don't use NEEDS_LOCAL_CREDS undefined

7 years agolib,lib-index: Use #ifdef with WORDS_BIGENDIAN
Martti Rannanjärvi [Mon, 30 Oct 2017 14:39:21 +0000 (16:39 +0200)] 
lib,lib-index: Use #ifdef with WORDS_BIGENDIAN

Some were missing from the last change.

7 years agoglobal: Use #ifdef instead of #if with WORDS_BIGENDIAN
Martti Rannanjärvi [Fri, 27 Oct 2017 08:03:07 +0000 (11:03 +0300)] 
global: Use #ifdef instead of #if with WORDS_BIGENDIAN

This is to not rely on undefined WORDS_BIGENDIAN being evaluated as 0.

7 years agomdbox: Assume that empty uid maps found during sync are harmless
Josef 'Jeff' Sipek [Mon, 23 Apr 2018 22:15:51 +0000 (18:15 -0400)] 
mdbox: Assume that empty uid maps found during sync are harmless

Instead of failing the sync and causing index rebuild, just skip over
the empty uid maps.  Chances are that they these records came from
various plugins that create fake mails.

7 years agolib-storage: Make sure index root is created when it's the same as root directory
Timo Sirainen [Tue, 12 Dec 2017 19:36:07 +0000 (21:36 +0200)] 
lib-storage: Make sure index root is created when it's the same as root directory

Fixes errors about failing to create mailboxes.lock when the index root
directory doesn't exist yet.

7 years agoconfigure: Released v2.2.36.rc1 2.2.36.rc1
Timo Sirainen [Mon, 30 Apr 2018 13:51:33 +0000 (16:51 +0300)] 
configure: Released v2.2.36.rc1

7 years agoNEWS: Update to v2.2.36.rc1
Timo Sirainen [Mon, 30 Apr 2018 13:50:35 +0000 (16:50 +0300)] 
NEWS: Update to v2.2.36.rc1

7 years agoplugins/old-stats: Remove restrict_access_set_dumpable calls from process_io_open().
Sergey Kitov [Thu, 26 Apr 2018 06:48:39 +0000 (09:48 +0300)] 
plugins/old-stats: Remove restrict_access_set_dumpable calls from process_io_open().

proc_io_fd is opened in preinit(), while process have root access, so
restrict_access_set_dumpable() calls are not needed.

7 years agolib: Call module's preinit function, when loading
Sergey Kitov [Wed, 18 Apr 2018 10:30:50 +0000 (13:30 +0300)] 
lib: Call module's preinit function, when loading

7 years agoplugins/old-stats: Add old-stats preinit() which opens mail stats io.
Sergey Kitov [Fri, 9 Mar 2018 13:17:29 +0000 (15:17 +0200)] 
plugins/old-stats: Add old-stats preinit() which opens mail stats io.

7 years agofs-posix: Fix iterating nonexistent symlinks when readdir() returns DT_UNKNOWN
Timo Sirainen [Thu, 29 Mar 2018 18:24:11 +0000 (14:24 -0400)] 
fs-posix: Fix iterating nonexistent symlinks when readdir() returns DT_UNKNOWN

This especially broke "doveadm fs delete -R" when the symlink destination
was deleted before the symlink.

7 years agolib-fs: fs-posix - Add accurate-mtime parameter
Timo Sirainen [Thu, 26 Apr 2018 16:38:55 +0000 (19:38 +0300)] 
lib-fs: fs-posix - Add accurate-mtime parameter

This is mainly useful for testing to find out whether one file was created
after another.

7 years agolib-fs: Update FS_METADATA_WRITE_FNAME comment
Timo Sirainen [Thu, 26 Apr 2018 15:23:54 +0000 (18:23 +0300)] 
lib-fs: Update FS_METADATA_WRITE_FNAME comment

7 years agolib-fs: fs-posix - FS_METADATA_WRITE_FNAME replaces the full path
Timo Sirainen [Thu, 26 Apr 2018 15:14:27 +0000 (18:14 +0300)] 
lib-fs: fs-posix - FS_METADATA_WRITE_FNAME replaces the full path

This is how all the other fs drivers work, although the macro name is a bit
confusing.

7 years agolib-fs: fs-metawrap - Pass FS_METADATA_WRITE_FNAME through to parent fs
Timo Sirainen [Thu, 26 Apr 2018 15:14:46 +0000 (18:14 +0300)] 
lib-fs: fs-metawrap - Pass FS_METADATA_WRITE_FNAME through to parent fs

fs-metawrap in the middle pervented the renaming from working.

7 years agolib-storage: Remove mail_attachment_detection_options=add-flags-on-fetch parsing
Timo Sirainen [Thu, 26 Apr 2018 13:42:40 +0000 (16:42 +0300)] 
lib-storage: Remove mail_attachment_detection_options=add-flags-on-fetch parsing

It wasn't actually used yet.

7 years agolib-storage: Fail if mail_attachment_detection_options has invalid options
Timo Sirainen [Thu, 26 Apr 2018 13:41:55 +0000 (16:41 +0300)] 
lib-storage: Fail if mail_attachment_detection_options has invalid options

7 years agolib-storage: Set $Has[No]Attachment earlier among other cached data
Timo Sirainen [Thu, 19 Apr 2018 13:38:22 +0000 (16:38 +0300)] 
lib-storage: Set $Has[No]Attachment earlier among other cached data

7 years agodoveadm: mailbox cache decisions - Fatally fail if fields are missing
Aki Tuomi [Wed, 25 Apr 2018 08:04:08 +0000 (11:04 +0300)] 
doveadm: mailbox cache decisions - Fatally fail if fields are missing

7 years agoman: Document doveadm mailbox cache commands
Aki Tuomi [Wed, 25 Apr 2018 07:56:04 +0000 (10:56 +0300)] 
man: Document doveadm mailbox cache commands

7 years agodoveadm: Add mailbox cache manipulation commands
Aki Tuomi [Fri, 13 Apr 2018 10:28:47 +0000 (13:28 +0300)] 
doveadm: Add mailbox cache manipulation commands

This allows changing cache decisions and dropping cache pointer
for wanted mails.

7 years agodoveadm-mail: Handle field conversion to short opt better
Aki Tuomi [Sat, 14 Apr 2018 11:31:44 +0000 (14:31 +0300)] 
doveadm-mail: Handle field conversion to short opt better

Convert non-string types as well

7 years agolib: introduce container_of
Josef 'Jeff' Sipek [Tue, 13 Sep 2016 19:01:56 +0000 (15:01 -0400)] 
lib: introduce container_of

This is a simple but type safe implementation.

7 years agolib-index: mail_index_sync_map() - Don't try to-resync extension updates
Timo Sirainen [Sun, 29 Apr 2018 09:31:23 +0000 (12:31 +0300)] 
lib-index: mail_index_sync_map() - Don't try to-resync extension updates

This was done to call extension record sync handlers, but the previous
commit removes them. Fixes a problem where obsolete cache offsets were
used in some situations:

 - Some cache updates are from external transactions and some are from
non-external transactions. This is because cache offset updates are being
added by whatever the parent index transaction is.

 - When mail_index_sync_map() is mapping MAIL_INDEX_SYNC_HANDLER_FILE, it
has already synced the map. But it's calling mail_index_sync_record()
for non-external transactions to call expunge handlers and extension
update handlers. It's calling the regular mail_index_sync_record() to do
this work.

 - But mail_index_sync_record() is actually still updating the map. So now
mail_index_sync_record() is called for all non-external cache updates,
but not for external cache updates! And since these are somewhat
randomly either external or non-external, the end result is that the
cache offset may be obsolete.

7 years agolib-index: Remove extension record sync handlers
Timo Sirainen [Sun, 29 Apr 2018 09:23:49 +0000 (12:23 +0300)] 
lib-index: Remove extension record sync handlers

This is no longer used by anything, and it makes the fix in the following
commit much easier.

This was originally added in 6a19e109ee8c5a6f688da83a86a7f6abeb71abdd to
allow dovecot.index.cache updating to hook into updating cache offsets to
link cache records together. This was reimplemented in a different way in
131b073bdc3650083b00616dc778dd3017c2bbb5

7 years ago.gitignore: Ignore doc/man/doveadm-rebuild.1
Martti Rannanjärvi [Thu, 26 Apr 2018 10:18:01 +0000 (13:18 +0300)] 
.gitignore: Ignore doc/man/doveadm-rebuild.1

7 years agodoveadm: Add rebuild attachments command
Aki Tuomi [Thu, 12 Apr 2018 11:09:10 +0000 (14:09 +0300)] 
doveadm: Add rebuild attachments command

Goes thru given mails and resets the attachment indicator.

7 years agolib-storage: Parse mail parts in mail_set_attachment_keywords if not present
Aki Tuomi [Thu, 12 Apr 2018 11:07:54 +0000 (14:07 +0300)] 
lib-storage: Parse mail parts in mail_set_attachment_keywords if not present

7 years agolib-storage: Add error reporting to mail_set_attachment_keywords
Aki Tuomi [Thu, 19 Apr 2018 07:19:15 +0000 (10:19 +0300)] 
lib-storage: Add error reporting to mail_set_attachment_keywords

7 years agolib-fts: Minor fix to randomness test in test-fts-tokenizer
Timo Sirainen [Wed, 25 Apr 2018 12:20:58 +0000 (15:20 +0300)] 
lib-fts: Minor fix to randomness test in test-fts-tokenizer

If the random input was entirely valid UTF-8, the input was truncated to
empty.

7 years agofts: Fix indexing input that contains NULs
Timo Sirainen [Wed, 25 Apr 2018 12:17:53 +0000 (15:17 +0300)] 
fts: Fix indexing input that contains NULs

Any message_block that contained NULs, but otherwise was valid UTF-8, was
simply dropped.