]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
6 years agolib-program-client: Use i_close_fd() rather than close() when error is not supposed...
Stephan Bosch [Thu, 15 Mar 2018 23:08:17 +0000 (00:08 +0100)] 
lib-program-client: Use i_close_fd() rather than close() when error is not supposed to happen.

6 years agolib-program-client: Make debug mode for test suite optional.
Stephan Bosch [Mon, 26 Feb 2018 22:26:50 +0000 (23:26 +0100)] 
lib-program-client: Make debug mode for test suite optional.

It is now disabled by default.

6 years agolib-program-client: local: Cleanup any kill timeout while program client is destroyed.
Stephan Bosch [Mon, 26 Feb 2018 17:58:37 +0000 (18:58 +0100)] 
lib-program-client: local: Cleanup any kill timeout while program client is destroyed.

6 years agolib-program-client: local: Make sure the child is dead once the program client is...
Stephan Bosch [Mon, 26 Feb 2018 17:32:32 +0000 (18:32 +0100)] 
lib-program-client: local: Make sure the child is dead once the program client is destroyed.

6 years agolib-program-client: Simplify disconnect handling.
Stephan Bosch [Mon, 26 Feb 2018 17:01:23 +0000 (18:01 +0100)] 
lib-program-client: Simplify disconnect handling.

Perform all of the cleanups in a separate shared function.
Always close all fds, since there is nothing left to be read or written at
disconnect.

6 years agolib-program-client: remote: Don't try to read remaining input at disconnect.
Stephan Bosch [Mon, 26 Feb 2018 17:21:04 +0000 (18:21 +0100)] 
lib-program-client: remote: Don't try to read remaining input at disconnect.

This code is no longer relevant. At disconnect, there is nothing left to be read
by definition.

6 years agolib-program-client: Use iostream-pump for streaming data from program.
Stephan Bosch [Sun, 25 Feb 2018 23:07:10 +0000 (00:07 +0100)] 
lib-program-client: Use iostream-pump for streaming data from program.

6 years agolib-program-client: Destroy timeout once client is passively disconnected.
Stephan Bosch [Mon, 26 Feb 2018 16:16:41 +0000 (17:16 +0100)] 
lib-program-client: Destroy timeout once client is passively disconnected.

6 years agolib-program-client: remote: Initialize program_client_istream with parent FD.
Stephan Bosch [Mon, 26 Feb 2018 16:15:13 +0000 (17:15 +0100)] 
lib-program-client: remote: Initialize program_client_istream with parent FD.

This way, io_add_istream() works as expected.

6 years agolib-program-client: local: Stop immediately when child program without I/O ends.
Stephan Bosch [Mon, 26 Feb 2018 16:12:29 +0000 (17:12 +0100)] 
lib-program-client: local: Stop immediately when child program without I/O ends.

Particularly, don't perform this by calling the input handler.

6 years agolib-program-client: Change return type of program_client_connected() to void.
Stephan Bosch [Mon, 26 Feb 2018 15:52:18 +0000 (16:52 +0100)] 
lib-program-client: Change return type of program_client_connected() to void.

Returning an int status code is no longer useful.

6 years agolib-program-client: Use iostream-pump for streaming data towards program.
Stephan Bosch [Sun, 25 Feb 2018 16:21:47 +0000 (17:21 +0100)] 
lib-program-client: Use iostream-pump for streaming data towards program.

6 years agolib-program-client: Initialize dot streams right after the connection is established.
Stephan Bosch [Sun, 25 Feb 2018 10:43:04 +0000 (11:43 +0100)] 
lib-program-client: Initialize dot streams right after the connection is established.

This avoids creating the dot streams in the input/output handlers, which makes
the code cleaner and easier to port to using iostream-pump.

6 years agolib-program-client: Use iostream-temp rather than istream-seekable for seekable output.
Stephan Bosch [Sun, 25 Feb 2018 08:55:00 +0000 (09:55 +0100)] 
lib-program-client: Use iostream-temp rather than istream-seekable for seekable output.

This considerably simplifies the code.

6 years agolib-program-client: test-program-client-net: Read the client input stream to EOF...
Stephan Bosch [Sun, 25 Feb 2018 16:31:51 +0000 (17:31 +0100)] 
lib-program-client: test-program-client-net: Read the client input stream to EOF after the dot stream is closed.

The low-level file stream is not necessarily read to EOF when the body dot
stream sees EOF.

6 years agolib-program-client: test-program-client-unix: Properly recognize the noreply script...
Stephan Bosch [Sun, 25 Feb 2018 17:38:23 +0000 (18:38 +0100)] 
lib-program-client: test-program-client-unix: Properly recognize the noreply script protocol option.

Somehow the equivalent test-program-client-net code does not have this problem.
And somehow this test did not fail before.

6 years agolib-program-client: test-program-client-net: Destroy test client upon error.
Stephan Bosch [Sun, 25 Feb 2018 17:31:14 +0000 (18:31 +0100)] 
lib-program-client: test-program-client-net: Destroy test client upon error.

This prevents infinite input event loop when something goes wrong.

6 years agolib-program-client: test-program-client-unix: Destroy test client upon error.
Stephan Bosch [Sun, 25 Feb 2018 17:30:12 +0000 (18:30 +0100)] 
lib-program-client: test-program-client-unix: Destroy test client upon error.

This prevents infinite input event loop when something goes wrong.

6 years agolib-program-client: test-program-client-net: Handle test client connections non-blocking.
Stephan Bosch [Sun, 25 Feb 2018 17:03:04 +0000 (18:03 +0100)] 
lib-program-client: test-program-client-net: Handle test client connections non-blocking.

6 years agolib-program-client: test-program-client-unix: Handle test client connections non...
Stephan Bosch [Sun, 25 Feb 2018 17:03:51 +0000 (18:03 +0100)] 
lib-program-client: test-program-client-unix: Handle test client connections non-blocking.

6 years agolib-program-client: test-program-client-net: Create body streams only once in test_pr...
Stephan Bosch [Sun, 25 Feb 2018 16:57:59 +0000 (17:57 +0100)] 
lib-program-client: test-program-client-net: Create body streams only once in test_program_input_handle().

6 years agolib-program-client: test-program-client-unix: Create body stream only once in test_pr...
Stephan Bosch [Sun, 25 Feb 2018 16:56:15 +0000 (17:56 +0100)] 
lib-program-client: test-program-client-unix: Create body stream only once in test_program_input_handle().

6 years agolib-program-client: test-program-client-net: Match client input handling code with...
Stephan Bosch [Sun, 25 Feb 2018 17:15:59 +0000 (18:15 +0100)] 
lib-program-client: test-program-client-net: Match client input handling code with test-program-client-unix.

6 years agolib-program-client: test-program-client-unix: Further fix error handling in test_prog...
Stephan Bosch [Sun, 18 Mar 2018 02:32:19 +0000 (03:32 +0100)] 
lib-program-client: test-program-client-unix: Further fix error handling in test_program_input().

6 years agolib-program-client: remote: Always shut down the output when all is written.
Stephan Bosch [Sun, 25 Feb 2018 16:46:55 +0000 (17:46 +0100)] 
lib-program-client: remote: Always shut down the output when all is written.

Before, this step was omitted when dot streams were used. However, shutting down
the output is necessary no matter what. Otherwise, the receiving end will not
see that no more input will follow, causing deadlock.

6 years agolib-program-client: Make sure program client callback is called only once.
Stephan Bosch [Sun, 25 Feb 2018 19:21:11 +0000 (20:21 +0100)] 
lib-program-client: Make sure program client callback is called only once.

6 years agolib-program-client: remote: Use struct program_client_remote as parameter where possible.
Stephan Bosch [Mon, 26 Feb 2018 23:13:20 +0000 (00:13 +0100)] 
lib-program-client: remote: Use struct program_client_remote as parameter where possible.

Avoids the need to cast it everywhere.

6 years agolib-program-client: remote: Call program client variable "prclient" consistently.
Stephan Bosch [Mon, 26 Feb 2018 22:57:44 +0000 (23:57 +0100)] 
lib-program-client: remote: Call program client variable "prclient" consistently.

6 years agolib-program-client: local: Call program client variable "plclient" consistently.
Stephan Bosch [Mon, 26 Feb 2018 22:53:22 +0000 (23:53 +0100)] 
lib-program-client: local: Call program client variable "plclient" consistently.

6 years agolib-program-client: Reformat test-program-client-unix.c.
Stephan Bosch [Sun, 25 Feb 2018 09:39:15 +0000 (10:39 +0100)] 
lib-program-client: Reformat test-program-client-unix.c.

6 years agolib-program-client: Reformat test-program-client-net.c.
Stephan Bosch [Sun, 25 Feb 2018 09:34:16 +0000 (10:34 +0100)] 
lib-program-client: Reformat test-program-client-net.c.

6 years agolib-program-client: Reformat program-client-private.h.
Stephan Bosch [Sun, 25 Feb 2018 17:54:46 +0000 (18:54 +0100)] 
lib-program-client: Reformat program-client-private.h.

6 years agolib-program-client: Reformat test-program-client-local.c.
Stephan Bosch [Sun, 25 Feb 2018 09:21:57 +0000 (10:21 +0100)] 
lib-program-client: Reformat test-program-client-local.c.

6 years agolib-program-client: Reformat program-client-remote.c.
Stephan Bosch [Sun, 25 Feb 2018 09:20:20 +0000 (10:20 +0100)] 
lib-program-client: Reformat program-client-remote.c.

6 years agolib-program-client: Reformat program-client-local.c.
Stephan Bosch [Sun, 25 Feb 2018 09:10:17 +0000 (10:10 +0100)] 
lib-program-client: Reformat program-client-local.c.

6 years agolib-program-client: Reformat program-client.h.
Stephan Bosch [Sun, 25 Feb 2018 09:06:36 +0000 (10:06 +0100)] 
lib-program-client: Reformat program-client.h.

6 years agolib-program-client: Reformat program-client.c.
Stephan Bosch [Sun, 25 Feb 2018 09:05:33 +0000 (10:05 +0100)] 
lib-program-client: Reformat program-client.c.

6 years agolib: iostream-pump: Properly implement running a pump with one of the streams blocking.
Stephan Bosch [Sun, 25 Feb 2018 20:45:17 +0000 (21:45 +0100)] 
lib: iostream-pump: Properly implement running a pump with one of the streams blocking.

Having both streams blocking is not useful and that is now explicitly forbidden.

6 years agolib: iostream-pump: Add iostream_pump_destroy().
Stephan Bosch [Sun, 25 Feb 2018 18:24:58 +0000 (19:24 +0100)] 
lib: iostream-pump: Add iostream_pump_destroy().

This functions always stops the pump and dereferences the streams before
dereferencing the pump itself.

6 years agolib: iostream-pump: Make iostream_pump_unref() implementation match other similar...
Stephan Bosch [Sun, 25 Feb 2018 18:13:18 +0000 (19:13 +0100)] 
lib: iostream-pump: Make iostream_pump_unref() implementation match other similar code.

This also means that iostream_pump_unref(NULL) is now a no-op.

6 years agolib: iostream-pump: Use refcount as name and int as type for reference count field.
Stephan Bosch [Sun, 25 Feb 2018 18:18:47 +0000 (19:18 +0100)] 
lib: iostream-pump: Use refcount as name and int as type for reference count field.

This is what the rest of Dovecot uses.

6 years agolib: Reformat test-iostream-pump.c.
Stephan Bosch [Sun, 25 Feb 2018 20:56:55 +0000 (21:56 +0100)] 
lib: Reformat test-iostream-pump.c.

6 years agolib: Reformat iostream-pump.c.
Stephan Bosch [Sun, 25 Feb 2018 18:04:14 +0000 (19:04 +0100)] 
lib: Reformat iostream-pump.c.

6 years agolib: Reformat iostream-pump.h.
Stephan Bosch [Sun, 25 Feb 2018 18:03:49 +0000 (19:03 +0100)] 
lib: Reformat iostream-pump.h.

6 years agolib-index: Make sure tail_offset is updated after calling expunge handlers
Timo Sirainen [Tue, 5 Feb 2019 22:17:52 +0000 (14:17 -0800)] 
lib-index: Make sure tail_offset is updated after calling expunge handlers

Since it's a bit troublesome to track whether expunge handlers were actually
called, we can just assume that as long as syncing sees expunges, they were
called (and thet most likely were).

This fixes a bug where dovecot.index.cache header's record_count kept
shrinking and deleted_record_count kept increasing after each sync.
These values were only used to determine when to compress the cache, so
its only effect was that the cache could have been compressed earlier
than necessary.

6 years agolib-dict: dict-sql - Add username as parameter
Aki Tuomi [Fri, 19 Apr 2019 17:39:32 +0000 (20:39 +0300)] 
lib-dict: dict-sql - Add username as parameter

SQL statement caching works better when the username is provided
as parameter instead of part of the query, since the caching
can now cache same statements despite username changes.

6 years agolib-dns: Remove unused Valgrind disable
Martti Rannanjärvi [Thu, 27 Dec 2018 09:55:31 +0000 (11:55 +0200)] 
lib-dns: Remove unused Valgrind disable

6 years agolib: Add test-fd-util.c to test i_close() panic message
Martti Rannanjärvi [Thu, 23 May 2019 15:49:18 +0000 (18:49 +0300)] 
lib: Add test-fd-util.c to test i_close() panic message

6 years agocassandra: Handle cass_future_set_callback() calling callback immediately
Timo Sirainen [Mon, 20 May 2019 11:16:52 +0000 (14:16 +0300)] 
cassandra: Handle cass_future_set_callback() calling callback immediately

The previous code always assumed it would be called from another thread, but
due to race conditions this wasn't true always. The lookup could have
already finished by the time cass_future_set_callback() was called, in which
case it called the callback immediately.

If the callback was called from the main thread, it still wrote to the
fd_pipe. Because this was a blocking write, it was possible that the pipe
ended becoming full, which caused the whole dict process to hang.

6 years agocassandra: Move cassandra_callback_run() earlier
Timo Sirainen [Mon, 20 May 2019 11:16:08 +0000 (14:16 +0300)] 
cassandra: Move cassandra_callback_run() earlier

Simplifies the next commit.

6 years agolib: ostream-file - Use TCP_NODELAY when uncorking, not corking
Timo Sirainen [Mon, 20 May 2019 13:33:30 +0000 (16:33 +0300)] 
lib: ostream-file - Use TCP_NODELAY when uncorking, not corking

6 years agolib: ostream-file - Don't try to set TCP options after stream is closed
Timo Sirainen [Mon, 20 May 2019 20:46:43 +0000 (23:46 +0300)] 
lib: ostream-file - Don't try to set TCP options after stream is closed

Flushing the buffer could close the stream and the fd.

6 years agolib: ostream-file - Ignore ENOPROTOOPT error also when setting TCP_NODELAY
Timo Sirainen [Fri, 17 May 2019 13:13:17 +0000 (16:13 +0300)] 
lib: ostream-file - Ignore ENOPROTOOPT error also when setting TCP_NODELAY

This happens in some OSes.

6 years agolib: ostream-file - Don't use TCP_CORK or TCP_NODELAY for UNIX sockets
Timo Sirainen [Fri, 17 May 2019 13:12:24 +0000 (16:12 +0300)] 
lib: ostream-file - Don't use TCP_CORK or TCP_NODELAY for UNIX sockets

Either they fail or just don't do anything.

6 years agovirtual: Fix calling mail_add_temp_wanted_fields() before mail is set
Timo Sirainen [Fri, 27 Apr 2018 11:26:46 +0000 (14:26 +0300)] 
virtual: Fix calling mail_add_temp_wanted_fields() before mail is set

Fixes:
Panic: file virtual-mail.c: line 123 (backend_mail_get): assertion failed: (bbox != NULL)

6 years agovirtual: Fix mail.add_temp_wanted_fields() to handle headers correctly
Timo Sirainen [Fri, 27 Apr 2018 10:56:13 +0000 (13:56 +0300)] 
virtual: Fix mail.add_temp_wanted_fields() to handle headers correctly

The header that was passed to backend contained wrong index numbers, causing
wrong headers to be used.

6 years agolib-storage: Update mail_add_temp_wanted_fields() comment
Timo Sirainen [Fri, 27 Apr 2018 10:52:28 +0000 (13:52 +0300)] 
lib-storage: Update mail_add_temp_wanted_fields() comment

6 years agolib-storage: Move code to a new mailbox_header_lookup_merge()
Timo Sirainen [Fri, 27 Apr 2018 10:49:53 +0000 (13:49 +0300)] 
lib-storage: Move code to a new mailbox_header_lookup_merge()

6 years agolib: ostream-file - Don't try to set TCP_NODELAY for non-socket fds
Timo Sirainen [Wed, 15 May 2019 07:25:47 +0000 (10:25 +0300)] 
lib: ostream-file - Don't try to set TCP_NODELAY for non-socket fds

Also log if there are any unexpected errors.

6 years agolib-storage: Don't try to set attachment keywords if bodystructure wasn't parsed
Aki Tuomi [Wed, 15 May 2019 07:49:09 +0000 (10:49 +0300)] 
lib-storage: Don't try to set attachment keywords if bodystructure wasn't parsed

This was broken in 057028e3f5567e21c964005ffccda1055fa86508 as there are
code paths leading here that omit bodystructure processing.

Fixes Panic: file index-mail.c: line 1150 (index_mail_parse_body_finish): assertion failed: (mail->data.parsed_bodystructure)

6 years agolib: Make sure uncorking ostream-file flushes network output immediately
Timo Sirainen [Fri, 10 May 2019 15:06:46 +0000 (18:06 +0300)] 
lib: Make sure uncorking ostream-file flushes network output immediately

TCP_CORK and TCP_NODELAY are separate things, but we'll treat them similarly
for our ostream corking API. It was always intended that all data written
inside corking would be delayed until uncork, and immediately sent
afterwards.

This change removes unnecessary extra 40ms delays, which may happen when
proxying.

6 years agodoveadm: Add error_r to server_connection_create()
Martti Rannanjärvi [Mon, 13 May 2019 13:16:43 +0000 (16:16 +0300)] 
doveadm: Add error_r to server_connection_create()

6 years agodoveadm-dsync: Always cleanup after connection
Aki Tuomi [Fri, 10 May 2019 12:55:22 +0000 (15:55 +0300)] 
doveadm-dsync: Always cleanup after connection

Go through the same error handling path every time. Fixes
Panic: file ioloop.c: line 826 (io_loop_destroy): assertion failed: (ioloop == current_ioloop)

This happened because the ioloop wasn't destroyed
on error.

6 years agodoveadm-dsync: Move actual command execution to dsync_server_run_command
Aki Tuomi [Fri, 10 May 2019 12:54:37 +0000 (15:54 +0300)] 
doveadm-dsync: Move actual command execution to dsync_server_run_command

Simplifies next commit

6 years agolib-storage: Attachment flag detection shouldn't cause mail body to be opened
Timo Sirainen [Fri, 10 May 2019 16:16:07 +0000 (19:16 +0300)] 
lib-storage: Attachment flag detection shouldn't cause mail body to be opened

Fetching cached mail headers with
mail_attachment_detection_options=add-flags-on-save caued IMAP BODYSTRUCTURE
to be fetched as well. If it wasn't already cached, this caused opening the
mail body to generate it. Also the result wasn't added to cache, so the
inefficient behavior continued.

6 years agodict: Make sure connection IO is stopped when client is disconnected
Timo Sirainen [Fri, 10 May 2019 14:45:14 +0000 (17:45 +0300)] 
dict: Make sure connection IO is stopped when client is disconnected

I'm not sure if this fixes anything, but it makes the behavior closer to
what it was before 2ff2da52146609f4459bd0f7fd603e13400cb85e.

6 years agodict: Fix client connection reference counting
Timo Sirainen [Fri, 10 May 2019 14:44:04 +0000 (17:44 +0300)] 
dict: Fix client connection reference counting

If the client disconnected while commands were still running, the destroy
callback could have been called multiple times.

Broken by 2ff2da52146609f4459bd0f7fd603e13400cb85e

Fixes:
Panic: file dict-connection.c: line 149 (dict_connection_unref): assertion failed: (array_count(&conn->cmds) == 0)

6 years agolib-storage: maildir: maildir-copy - Fix omission of keywords while copying message...
Stephan Bosch [Fri, 11 Jan 2019 13:33:59 +0000 (14:33 +0100)] 
lib-storage: maildir: maildir-copy - Fix omission of keywords while copying message with hardlinking.

6 years agolib-storage: maildir: maildir-save - Move final copying of keywords to a separate...
Stephan Bosch [Fri, 11 Jan 2019 13:16:39 +0000 (14:16 +0100)] 
lib-storage: maildir: maildir-save - Move final copying of keywords to a separate function.

6 years agolib-http: client: Fix segfault occurring when an idle host times out.
Stephan Bosch [Tue, 29 Jan 2019 21:16:26 +0000 (22:16 +0100)] 
lib-http: client: Fix segfault occurring when an idle host times out.

This is most visible when the host is associated with an invalid host name: in
that case the idle timeout is only 100ms. For valid hosts, this problem can only
appear after 30 minutes idle time (default).

Problem is caused by the session host object starting a new idle timeout in the
shared host, while the shared and session host objects are both being destroyed.

6 years agofts: Enable turkish support
Aki Tuomi [Mon, 29 Apr 2019 10:09:02 +0000 (13:09 +0300)] 
fts: Enable turkish support

6 years agofts: Include turkish stopwords
Aki Tuomi [Mon, 29 Apr 2019 10:08:34 +0000 (13:08 +0300)] 
fts: Include turkish stopwords

Source https://github.com/stopwords-iso/stopwords-tr/

6 years agomail-lua: Handle transaction commit error writing metadata
Aki Tuomi [Thu, 25 Apr 2019 07:23:12 +0000 (10:23 +0300)] 
mail-lua: Handle transaction commit error writing metadata

6 years agolib-lua: Fix bracing in table helper macros
Aki Tuomi [Wed, 24 Apr 2019 13:33:45 +0000 (16:33 +0300)] 
lib-lua: Fix bracing in table helper macros

Was left broken in c304bc76

6 years agomail-lua: Implement mailbox metadata API
Aki Tuomi [Tue, 16 Apr 2019 08:42:56 +0000 (11:42 +0300)] 
mail-lua: Implement mailbox metadata API

Adds methods for accessing and manipulating mailbox metadata

 * user:metadata_get("key", "key", ..) - returns value for keys
 * user:metadata_set("key", "value") - sets value for key
 * user:metadata_unset("key", "value") - unsets key
 * user:metadata_list("prefix", "prefix", ...) - lists keys in dict for prefixes

 * mailbox:metadata_get("key", "key", ..) - returns value for keys
 * mailbox:metadata_set("key", "value") - sets value for key
 * mailbox:metadata_unset("key", "value") - unsets key
 * mailbox:metadata_list("prefix", "prefix", ...) - lists keys in dict for prefixes

User metadata is stored under /(private|shared)/vendor/vendor.dovecot/pvt/server to
mailbox INBOX, and is accessible with mailbox metadata methods with INBOX.

Also mail lua exports constants to simplify usage

dovecot.storage.MAILBOX_ATTRIBUTE_PREFIX_DOVECOT
"vendor/vendor.dovecot/"
dovecot.storage.MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT
"vendor/vendor.dovecot/pvt/"
dovecot.storage.MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER
"vendor/vendor.dovecot/pvt/server/"

6 years agomail-lua: Properly refcount user object
Aki Tuomi [Wed, 17 Apr 2019 10:20:58 +0000 (13:20 +0300)] 
mail-lua: Properly refcount user object

Prevents user object from going away unexpectedly, and makes
sure it gets released correctly.

6 years agomail-lua: Use userdata for mailbox pointer
Aki Tuomi [Wed, 17 Apr 2019 10:12:05 +0000 (13:12 +0300)] 
mail-lua: Use userdata for mailbox pointer

Makes it possible to unref mailbox on exit

6 years agolib-lua: Fix assigment helper macros
Aki Tuomi [Mon, 15 Apr 2019 10:02:11 +0000 (13:02 +0300)] 
lib-lua: Fix assigment helper macros

The macro names were conflicting with the table values.

6 years agolib-storage: Fix NO-FS-VALIDATION in mail_location
Timo Sirainen [Mon, 18 Mar 2019 22:02:06 +0000 (00:02 +0200)] 
lib-storage: Fix NO-FS-VALIDATION in mail_location

The setting wasn't being preserved properly, so it was just ignored.

6 years agolib: event_filter_unref(NULL) is already a no-op
Josef 'Jeff' Sipek [Thu, 14 Mar 2019 19:24:37 +0000 (15:24 -0400)] 
lib: event_filter_unref(NULL) is already a no-op

6 years agolib-http: Fix comment typo
Josef 'Jeff' Sipek [Wed, 27 Mar 2019 14:09:33 +0000 (16:09 +0200)] 
lib-http: Fix comment typo

6 years agodoveadm: Add body.preview as a fetch field
Michael Slusarz [Mon, 25 Mar 2019 17:58:00 +0000 (11:58 -0600)] 
doveadm: Add body.preview as a fetch field

Keep body.snippet as a fetch field for backward compatitibility reasons

6 years agoRFC has changed SHOULD length of preview from 100 to 200
Michael M Slusarz [Wed, 31 Oct 2018 00:28:49 +0000 (18:28 -0600)] 
RFC has changed SHOULD length of preview from 100 to 200

6 years agoRFC draft has changed from SNIPPET to PREVIEW
Michael M Slusarz [Wed, 31 Oct 2018 00:28:04 +0000 (18:28 -0600)] 
RFC draft has changed from SNIPPET to PREVIEW

The older SNIPPET command will remain for now - it is mostly the same
as the new PREVIEW code, so it's essentially an alias (the only
difference between the two versions is the SNIPPET/PREVIEW identifier
text).

6 years agodict: Remove unnecessary o_stream_flush()
Timo Sirainen [Tue, 2 Apr 2019 10:55:14 +0000 (13:55 +0300)] 
dict: Remove unnecessary o_stream_flush()

Added recently by 89e4b2e7fbd17548f3c99fa66368c9b0bc8eb775

6 years agodoveadm-dict: Add missing dict_deinit
Aki Tuomi [Sun, 31 Mar 2019 18:24:40 +0000 (21:24 +0300)] 
doveadm-dict: Add missing dict_deinit

Fixes event leak when set is missing parameter.

6 years agodict: Parse handshake using handshake_args
Aki Tuomi [Sun, 31 Mar 2019 14:01:36 +0000 (17:01 +0300)] 
dict: Parse handshake using handshake_args

This ensures the input is properly tab unescaped, also
simplifies the handshake function.

6 years agodict: Remove obsolete check as getenv() is no longer used for getting dicts
Aki Tuomi [Mon, 8 Oct 2018 08:51:41 +0000 (11:51 +0300)] 
dict: Remove obsolete check as getenv() is no longer used for getting dicts

6 years agodict: Use connection API
Aki Tuomi [Sun, 31 Mar 2019 13:54:28 +0000 (16:54 +0300)] 
dict: Use connection API

6 years agodict: Use connection struct
Aki Tuomi [Mon, 1 Apr 2019 09:10:10 +0000 (12:10 +0300)] 
dict: Use connection struct

Prepares for moving into connection API

6 years agodict: Create connection with struct master_connection instead of fd
Aki Tuomi [Mon, 1 Apr 2019 09:09:33 +0000 (12:09 +0300)] 
dict: Create connection with struct master_connection instead of fd

Prepares for moving into connection.c struct

6 years agofts: Add fts_enforced=body
Timo Sirainen [Sun, 20 May 2018 09:27:22 +0000 (12:27 +0300)] 
fts: Add fts_enforced=body

Similar to "no", this doesn't enforce FTS indexing for header searches.
Similar to "yes", on FTS lookup failure it won't fallback to reading all
mails.

6 years agosdbox: Add "sdbox" event category
Timo Sirainen [Wed, 27 Mar 2019 14:44:21 +0000 (16:44 +0200)] 
sdbox: Add "sdbox" event category

2cd16e24fb442a066c6c3051c1042c1091b927bb only added it to the "dbox" alias.

6 years agoauth-request: Call auth_request_passdb_lookup_end() for all return paths of auth_requ...
Sergey Kitov [Fri, 22 Mar 2019 13:59:53 +0000 (15:59 +0200)] 
auth-request: Call auth_request_passdb_lookup_end() for all return paths of auth_request_handle_passdb_callback()

Fixes: Panic: file auth-request.c: line 367 (auth_request_unref):
assertion failed: (array_count(&request->authdb_event) == 0)
The panic happens when auth request results in PASSDB_RESULT_USER_DISABLED.

6 years agococcinelle: Add all semantic patches used in the past to a new dir
Josef 'Jeff' Sipek [Wed, 16 Jan 2019 13:58:15 +0000 (08:58 -0500)] 
coccinelle: Add all semantic patches used in the past to a new dir

This commit merely imports the semantic patches without providing any
additional tooling to apply them.  It also includes macros.h header used by
coccinelle to properly handle some of the more complex macros we have.

6 years agoauth: Make db_oauth2_callback debug print human readable
Martti Rannanjärvi [Fri, 22 Mar 2019 07:20:11 +0000 (09:20 +0200)] 
auth: Make db_oauth2_callback debug print human readable

6 years agoipc-server: Reconnect on socket input error.
Sergey Kitov [Thu, 21 Mar 2019 06:39:28 +0000 (08:39 +0200)] 
ipc-server: Reconnect on socket input error.

6 years agoipc-server: Change reconnect timeout to 10 seconds.
Sergey Kitov [Thu, 21 Mar 2019 13:29:20 +0000 (15:29 +0200)] 
ipc-server: Change reconnect timeout to 10 seconds.

6 years agoipc: Terminate IPC process with master.
Sergey Kitov [Thu, 21 Mar 2019 06:38:52 +0000 (08:38 +0200)] 
ipc: Terminate IPC process with master.

6 years agoipc: Introduce ipc_groups_disconnect_all()
Sergey Kitov [Thu, 21 Mar 2019 13:23:51 +0000 (15:23 +0200)] 
ipc: Introduce ipc_groups_disconnect_all()