]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Stephan Bosch [Sat, 10 Nov 2018 12:41:27 +0000 (13:41 +0100)]
lmtp: Make include directory available to external plugins.
Stephan Bosch [Sat, 3 Nov 2018 12:34:20 +0000 (13:34 +0100)]
lmtp: local: Create a client vfunc for local delivery.
This way,for example, the struct mail_deliver_context passed to mail_deliver()
can be adjusted by plugins.
Stephan Bosch [Sat, 3 Nov 2018 10:18:46 +0000 (11:18 +0100)]
lib-smtp: server: Add support for adding (non-standard) extra capabilities.
Stephan Bosch [Sat, 10 Nov 2018 12:27:52 +0000 (13:27 +0100)]
lib-smtp: syntax: Add new smtp_ehlo_params_are_valid().
This new version checks whether the parameters contained in the provided string
array are all valid EHLO parameters.
Stephan Bosch [Sat, 10 Nov 2018 12:22:52 +0000 (13:22 +0100)]
lib-smtp: syntax: Remame smtp_ehlo_params_are_valid() to smtp_ehlo_params_str_is_valid().
Moves it out of the way for a function that is better suited for this name;
i.e., it operates on an array of parameters.
Stephan Bosch [Sat, 3 Nov 2018 10:18:10 +0000 (11:18 +0100)]
lib-smtp: server: Add smtp_server_reply_ehlo_add_params().
Stephan Bosch [Sat, 3 Nov 2018 08:55:41 +0000 (09:55 +0100)]
lib-smtp: server: EHLO command: Move composition of individual reply lines to separate functions.
Stephan Bosch [Sat, 3 Nov 2018 08:27:48 +0000 (09:27 +0100)]
lib-smtp: server: EHLO command: Move composition of default EHLO reply to a separate public function.
Stephan Bosch [Sat, 3 Nov 2018 00:00:13 +0000 (01:00 +0100)]
lmtp: Add support for module contexts to recipient.
Stephan Bosch [Fri, 2 Nov 2018 23:54:50 +0000 (00:54 +0100)]
lmtp: Add support for module contexts to client.
Stephan Bosch [Fri, 2 Nov 2018 23:49:32 +0000 (00:49 +0100)]
lmtp: Implement client vfuncs for transaction start and free.
Stephan Bosch [Fri, 2 Nov 2018 23:33:31 +0000 (00:33 +0100)]
lmtp: Implement client vfuncs for SMTP transaction commands.
Stephan Bosch [Sat, 3 Nov 2018 13:26:24 +0000 (14:26 +0100)]
lmtp: RCPT command: Allocate lmtp_recipient object immediately.
Stephan Bosch [Fri, 2 Nov 2018 23:41:03 +0000 (00:41 +0100)]
lmtp: DATA command: Add data size to client state.
Stephan Bosch [Fri, 2 Nov 2018 23:37:52 +0000 (00:37 +0100)]
lmtp: DATA command: Put the data input stream in the client state rather than the transaction context.
Stephan Bosch [Fri, 2 Nov 2018 22:48:48 +0000 (23:48 +0100)]
lmtp: Implement basic client vfuncs.
Currently, only client_destroy can be overriden.
Stephan Bosch [Sat, 3 Nov 2018 11:56:30 +0000 (12:56 +0100)]
lmtp: Add hook for client_create().
Stephan Bosch [Sat, 3 Nov 2018 11:47:00 +0000 (12:47 +0100)]
lmtp: Remove obsolete declaration from lmtp-common.h.
Stephan Bosch [Sat, 3 Nov 2018 11:45:19 +0000 (12:45 +0100)]
lmtp: Make lmtp-common.h the primary include.
This better matches other services.
Stephan Bosch [Sat, 3 Nov 2018 11:34:02 +0000 (12:34 +0100)]
lmtp: Rename main.h to lmtp-common.h.
This better matches other services.
Stephan Bosch [Sat, 3 Nov 2018 11:26:51 +0000 (12:26 +0100)]
lmtp: Rename lmtp-common to lmtp-recipient.
Martti Rannanjärvi [Thu, 28 Jun 2018 11:36:51 +0000 (14:36 +0300)]
fts-solr: Remove obsolete break-imap-search setting
Stephan Bosch [Mon, 26 Feb 2018 22:12:03 +0000 (23:12 +0100)]
lib-program-client: Add more detailed debug logging.
Stephan Bosch [Mon, 26 Feb 2018 21:27:40 +0000 (22:27 +0100)]
lib-program-client: Use event logging.
This also makes the overall log messages better match similar messages produced
by other parts of Dovecot.
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.
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.
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.
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.
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.
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.
Stephan Bosch [Sun, 25 Feb 2018 23:07:10 +0000 (00:07 +0100)]
lib-program-client: Use iostream-pump for streaming data from program.
Stephan Bosch [Mon, 26 Feb 2018 16:16:41 +0000 (17:16 +0100)]
lib-program-client: Destroy timeout once client is passively disconnected.
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.
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.
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.
Stephan Bosch [Sun, 25 Feb 2018 16:21:47 +0000 (17:21 +0100)]
lib-program-client: Use iostream-pump for streaming data towards program.
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.
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.
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.
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.
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.
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.
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.
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.
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().
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().
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.
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().
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.
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.
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.
Stephan Bosch [Mon, 26 Feb 2018 22:57:44 +0000 (23:57 +0100)]
lib-program-client: remote: Call program client variable "prclient" consistently.
Stephan Bosch [Mon, 26 Feb 2018 22:53:22 +0000 (23:53 +0100)]
lib-program-client: local: Call program client variable "plclient" consistently.
Stephan Bosch [Sun, 25 Feb 2018 09:39:15 +0000 (10:39 +0100)]
lib-program-client: Reformat test-program-client-unix.c.
Stephan Bosch [Sun, 25 Feb 2018 09:34:16 +0000 (10:34 +0100)]
lib-program-client: Reformat test-program-client-net.c.
Stephan Bosch [Sun, 25 Feb 2018 17:54:46 +0000 (18:54 +0100)]
lib-program-client: Reformat program-client-private.h.
Stephan Bosch [Sun, 25 Feb 2018 09:21:57 +0000 (10:21 +0100)]
lib-program-client: Reformat test-program-client-local.c.
Stephan Bosch [Sun, 25 Feb 2018 09:20:20 +0000 (10:20 +0100)]
lib-program-client: Reformat program-client-remote.c.
Stephan Bosch [Sun, 25 Feb 2018 09:10:17 +0000 (10:10 +0100)]
lib-program-client: Reformat program-client-local.c.
Stephan Bosch [Sun, 25 Feb 2018 09:06:36 +0000 (10:06 +0100)]
lib-program-client: Reformat program-client.h.
Stephan Bosch [Sun, 25 Feb 2018 09:05:33 +0000 (10:05 +0100)]
lib-program-client: Reformat program-client.c.
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.
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.
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.
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.
Stephan Bosch [Sun, 25 Feb 2018 20:56:55 +0000 (21:56 +0100)]
lib: Reformat test-iostream-pump.c.
Stephan Bosch [Sun, 25 Feb 2018 18:04:14 +0000 (19:04 +0100)]
lib: Reformat iostream-pump.c.
Stephan Bosch [Sun, 25 Feb 2018 18:03:49 +0000 (19:03 +0100)]
lib: Reformat iostream-pump.h.
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.
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.
Martti Rannanjärvi [Thu, 27 Dec 2018 09:55:31 +0000 (11:55 +0200)]
lib-dns: Remove unused Valgrind disable
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
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.
Timo Sirainen [Mon, 20 May 2019 11:16:08 +0000 (14:16 +0300)]
cassandra: Move cassandra_callback_run() earlier
Simplifies the next commit.
Timo Sirainen [Mon, 20 May 2019 13:33:30 +0000 (16:33 +0300)]
lib: ostream-file - Use TCP_NODELAY when uncorking, not corking
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.
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.
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.
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)
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.
Timo Sirainen [Fri, 27 Apr 2018 10:52:28 +0000 (13:52 +0300)]
lib-storage: Update mail_add_temp_wanted_fields() comment
Timo Sirainen [Fri, 27 Apr 2018 10:49:53 +0000 (13:49 +0300)]
lib-storage: Move code to a new mailbox_header_lookup_merge()
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.
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)
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.
Martti Rannanjärvi [Mon, 13 May 2019 13:16:43 +0000 (16:16 +0300)]
doveadm: Add error_r to server_connection_create()
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.
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
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.
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 .
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)
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.
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.
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.
Aki Tuomi [Mon, 29 Apr 2019 10:09:02 +0000 (13:09 +0300)]
fts: Enable turkish support
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/
Aki Tuomi [Thu, 25 Apr 2019 07:23:12 +0000 (10:23 +0300)]
mail-lua: Handle transaction commit error writing metadata
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
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/"
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.