]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Wed, 31 Oct 2018 12:19:49 +0000 (14:19 +0200)]
lib-storage: Copy all relevant TLS settings
Not just ca path and dir
Aki Tuomi [Wed, 31 Oct 2018 12:09:30 +0000 (14:09 +0200)]
lib-storage: Add all client ssl settings to mail storage settings
Aki Tuomi [Wed, 31 Oct 2018 12:20:36 +0000 (14:20 +0200)]
lib-master: Add new setting `ssl_client_require_valid_cert`
This controls whether TLS certificates are verified
for TLS CLIENT connections.
Stephan Bosch [Thu, 1 Nov 2018 00:14:50 +0000 (01:14 +0100)]
lib-smtp: server: recipient: Hold a reference to the recipient while calling a non-destroy hook.
Prevents memory problems when the hook inadvertently gets the recipient
destroyed. Unlike the server command, this is not strictly necessary for the
recipient object, but we add this anyway to prevent future problems when the
recipient implementation becomes more complex (e.g. with additional hooks).
Stephan Bosch [Wed, 31 Oct 2018 23:58:47 +0000 (00:58 +0100)]
lib-smtp: server: recipient: Prevent reference counting from within destroy hook.
Stephan Bosch [Thu, 1 Nov 2018 00:25:10 +0000 (01:25 +0100)]
lib-smtp: server: recipient: Add reference counting.
Unlike the server command, this is not strictly necessary for the recipient
object, but we add this anyway to prevent future problems when the recipient
implementation becomes more complex.
Stephan Bosch [Wed, 31 Oct 2018 23:12:03 +0000 (00:12 +0100)]
lib-smtp: server: Make sure command object is not used after it is destroyed in hook.
Stephan Bosch [Thu, 1 Nov 2018 00:40:10 +0000 (01:40 +0100)]
lib-smtp: server: command: Hold connection reference while calling replied hook.
Stephan Bosch [Wed, 31 Oct 2018 23:44:10 +0000 (00:44 +0100)]
lib-smtp: server: command: Move core of smtp_server_command_submit_reply() into a separate function.
Makes the next changes easier.
Stephan Bosch [Wed, 31 Oct 2018 23:39:21 +0000 (00:39 +0100)]
lib-smtp: server: command: Hold a reference to the command while calling a non-destroy hook.
Prevents memory problems when the hook inadvertently gets the command destroyed.
Stephan Bosch [Wed, 31 Oct 2018 23:27:50 +0000 (00:27 +0100)]
lib-smtp: server: command: Prevent reference counting from within destroy hook.
Stephan Bosch [Thu, 1 Nov 2018 21:22:34 +0000 (22:22 +0100)]
lib-smtp: Consistently use signed integer for reference counters.
Stephan Bosch [Tue, 30 Oct 2018 08:53:07 +0000 (09:53 +0100)]
submission: relay backend: Add assertion in backend_relay_handle_relay_reply() to address compiler warning.
Assert that the error message is assinged when the result is FALSE.
Stephan Bosch [Tue, 30 Oct 2018 08:57:31 +0000 (09:57 +0100)]
submission: relay backend: In backend_relay_handle_relay_reply(): Only determine error detail when it is used.
Stephan Bosch [Mon, 29 Oct 2018 00:36:43 +0000 (01:36 +0100)]
submission: Make include directory available to external plugins.
Stephan Bosch [Thu, 25 Oct 2018 21:50:55 +0000 (23:50 +0200)]
submission: relay backend: Allow creating the client transaction with specific flags.
Stephan Bosch [Thu, 18 Oct 2018 00:15:07 +0000 (02:15 +0200)]
lib-smtp: client: Allow enabling the LMTP per-RCPT DATA reply behavior for ESMTP transactions.
This is non-standard.
Stephan Bosch [Sat, 27 Oct 2018 10:20:01 +0000 (12:20 +0200)]
submission: Add support for module contexts to backend.
Stephan Bosch [Sat, 27 Oct 2018 09:56:59 +0000 (11:56 +0200)]
submission: Allocate each backend on its own pool.
This allows allocating per-backend module data.
Stephan Bosch [Fri, 26 Oct 2018 19:00:00 +0000 (21:00 +0200)]
submission: Add support for modifying the transaction path and parameters in the trans_start backend vfunc.
To keep the changes limited to a particular backend, the server transaction
cannot be modified. Also, creating a mock server transaction and passing it on
is not a good idea, since it is not a simple container struct.
Stephan Bosch [Fri, 26 Oct 2018 15:00:32 +0000 (17:00 +0200)]
submission: Add backend flag indicating whether the backend is ready.
This flag is set just before the ready() vfunc is called.
Stephan Bosch [Thu, 18 Oct 2018 21:35:05 +0000 (23:35 +0200)]
submission: Add backend vfunc called when the backend is ready.
For a relay backend, this means that the connection is fully connected and
handshaked. For any backend it means the capabilities are known (and passed as a
parameter to the ready function).
Stephan Bosch [Thu, 25 Oct 2018 21:50:22 +0000 (23:50 +0200)]
lib-smtp: params: Explicitly allow smtp_params_*_add_extra() value parameter to be NULL.
Stephan Bosch [Tue, 16 Oct 2018 23:34:54 +0000 (01:34 +0200)]
submission: relay backend: Allow recording extra (non-standard) capabilities.
Stephan Bosch [Tue, 16 Oct 2018 21:58:23 +0000 (23:58 +0200)]
submission: relay backend: Provide access to the client connection and transaction for plugins.
Stephan Bosch [Tue, 16 Oct 2018 22:59:02 +0000 (00:59 +0200)]
lib-smtp: client: Add support for recording extra (non-standard) capabilities from server.
Stephan Bosch [Tue, 16 Oct 2018 23:05:07 +0000 (01:05 +0200)]
lib-smtp: client: connection: Consolidate capability data into a struct.
Allows clearing it reliably.
Stephan Bosch [Fri, 26 Oct 2018 20:26:53 +0000 (22:26 +0200)]
submission: Clarify the behavior of command handlers and the requirements for overriding them.
Stephan Bosch [Thu, 25 Oct 2018 19:02:46 +0000 (21:02 +0200)]
submission: Use the new smtp_server_cmd_noop_reply_success() function.
Stephan Bosch [Mon, 12 Mar 2018 01:59:28 +0000 (02:59 +0100)]
lmtp: local: Use the new smtp_server_cmd_rcpt_reply_success() function.
Stephan Bosch [Thu, 25 Oct 2018 18:29:30 +0000 (20:29 +0200)]
lib-smtp: server: NOOP command: Implement smtp_server_cmd_noop_reply_success() for sending default success reply.
Stephan Bosch [Thu, 25 Oct 2018 18:38:26 +0000 (20:38 +0200)]
lib-smtp: server: RSET command: Implement smtp_server_cmd_rset_reply_success() for sending default success reply.
Stephan Bosch [Mon, 12 Mar 2018 00:03:24 +0000 (01:03 +0100)]
lib-smtp: server: RCPT command: Implement smtp_server_cmd_rcpt_reply_success() for sending default success reply.
Stephan Bosch [Mon, 12 Mar 2018 00:01:46 +0000 (01:01 +0100)]
lib-smtp: server: MAIL command: Implement smtp_server_cmd_mail_reply_success() for sending default success reply.
Stephan Bosch [Sun, 28 Oct 2018 11:08:50 +0000 (12:08 +0100)]
submission: relay backend: Always reset the trans_started flag upon trans_free().
Stephan Bosch [Sun, 28 Oct 2018 11:08:13 +0000 (12:08 +0100)]
submission: backend: Properly reset the trans_started flag upon trans_free().
Stephan Bosch [Fri, 19 Oct 2018 15:39:36 +0000 (17:39 +0200)]
doc: example-config: Document the new submission_backend_capabilities setting.
Stephan Bosch [Mon, 29 Oct 2018 16:27:17 +0000 (17:27 +0100)]
submission,submission-login: Implicitly enable CHUNKING when submission_backend_capabilities setting includes BINARYMIME.
BINARYMIME requires CHUNKING support and we should not expect administrators to
always be aware of that fact.
Stephan Bosch [Fri, 19 Oct 2018 15:12:10 +0000 (17:12 +0200)]
submission: relay backend: VRFY command: Avoid forwarding 500 and 502 replies back to client.
These are in fact non-standard for VRFY and indicate that VRFY support is
disabled, which is not allowed by the specification. Instead, we now substitute
the default 252 response.
Stephan Bosch [Fri, 19 Oct 2018 15:02:08 +0000 (17:02 +0200)]
lib-smtp: server: VRFY command: Implement smtp_server_cmd_reply_default() for sending default reply.
Stephan Bosch [Fri, 19 Oct 2018 14:42:41 +0000 (16:42 +0200)]
submission,submission-login: Omit listing VRFY capability if the backend provides no explicit support.
Stephan Bosch [Fri, 19 Oct 2018 09:15:50 +0000 (11:15 +0200)]
submission-login: Use the submission_backend_capabilities setting to compose the EHLO reply when configured.
This way, the EHLO response prior to AUTH will better match the EHLO response after AUTH.
Stephan Bosch [Fri, 19 Oct 2018 09:24:35 +0000 (11:24 +0200)]
submission-login: Add the VRFY capability to the EHLO reply.
The post-login service does it too.
Stephan Bosch [Thu, 18 Oct 2018 22:35:53 +0000 (00:35 +0200)]
submission: relay backend: Fix non-transaction commands to work when submission_backend_capabilities is configured.
When submission_backend_capabilities is configured, the backend is not started
until the first transaction is started. But for commands that should work
outside the transaction, the backend should also be started, which was not the
case before this fix.
Stephan Bosch [Thu, 18 Oct 2018 22:01:40 +0000 (00:01 +0200)]
submission: backends: Set the started flag before calling the backend start vfunc.
This prevents recursive mishaps.
Aki Tuomi [Mon, 29 Oct 2018 08:43:10 +0000 (10:43 +0200)]
auth: test-lua - Add test to ensure that values are not converted to number by mistake
Aki Tuomi [Mon, 29 Oct 2018 08:42:36 +0000 (10:42 +0200)]
auth: test-lua - Fix unit test to handle errors
Aki Tuomi [Mon, 29 Oct 2018 12:43:11 +0000 (14:43 +0200)]
auth: test-lua - Fix inconsistent whitespace
Aki Tuomi [Mon, 29 Oct 2018 07:52:37 +0000 (09:52 +0200)]
auth: db-lua - Use lua_type to detect type
Using lua_isnumber to detect numbers also considers
convertible strings as numbers.
Aki Tuomi [Mon, 29 Oct 2018 07:50:33 +0000 (09:50 +0200)]
auth: Store password with auth_set_field in Lua passdb
Makes caching work for passwords
Aki Tuomi [Mon, 29 Oct 2018 07:49:48 +0000 (09:49 +0200)]
auth: Use default scheme in Lua passdb lookup
Fixes a null pointer crash.
Stephan Bosch [Thu, 25 Oct 2018 11:35:52 +0000 (13:35 +0200)]
lib: uri-util: Add tests for URI character escape functions.
Stephan Bosch [Thu, 25 Oct 2018 11:34:52 +0000 (13:34 +0200)]
lib: uri-util: Add functions for escaping (almost) all reserved URI characters.
Aki Tuomi [Thu, 25 Oct 2018 10:50:36 +0000 (13:50 +0300)]
lib-lua: Use source instead of short_src
short_src is a limited value, and also an byte array
instead of a pointer so it should not be returned.
Found by coverity.
Aki Tuomi [Fri, 19 Oct 2018 10:54:50 +0000 (13:54 +0300)]
lib-lua: Make sure events get right file:line information
Aki Tuomi [Fri, 19 Oct 2018 10:54:34 +0000 (13:54 +0300)]
mail-lua: Fix argument number checking for mailbox#sync
Aki Tuomi [Fri, 19 Oct 2018 06:39:39 +0000 (09:39 +0300)]
push-notification-driver-lua: Perform garbage collection after transaction
Ensure Lua releases resources here.
Aki Tuomi [Mon, 15 Oct 2018 11:46:30 +0000 (14:46 +0300)]
push-notification-driver-ox: Convert to event based logging
Also fixes the logging to be standard
Aki Tuomi [Mon, 15 Oct 2018 09:20:20 +0000 (12:20 +0300)]
push-notification-driver-lua: Add events
Aki Tuomi [Mon, 15 Oct 2018 09:04:19 +0000 (12:04 +0300)]
push-notification: Emit event on transaction end
Aki Tuomi [Mon, 15 Oct 2018 09:03:58 +0000 (12:03 +0300)]
push-notification: Add event to push notification transaction
Aki Tuomi [Mon, 15 Oct 2018 08:55:41 +0000 (11:55 +0300)]
push-notification: Add event category
Aki Tuomi [Fri, 19 Oct 2018 08:36:09 +0000 (11:36 +0300)]
lib-lua: Move __gc metamethod for event to userdata
Compability for lua 5.1
Timo Sirainen [Thu, 18 Oct 2018 10:55:53 +0000 (13:55 +0300)]
lib-fts: test-fts-tokenizer: Verify fts_tokenizer_create() return value
Stephan Bosch [Thu, 18 Oct 2018 13:25:53 +0000 (15:25 +0200)]
lib-master: test-event-stats: Properly ensure cleanup of all files generated by tests.
Stephan Bosch [Thu, 18 Oct 2018 13:09:51 +0000 (15:09 +0200)]
lib-master: test-event-stats: Move launch_test_stats() to a more logical place.
Stephan Bosch [Thu, 18 Oct 2018 13:11:55 +0000 (15:11 +0200)]
lib-master: Create local .gitignore file for potential test output junk.
Aki Tuomi [Thu, 18 Oct 2018 09:31:27 +0000 (12:31 +0300)]
lib-lua: Check number of arguments
Aki Tuomi [Mon, 30 Jul 2018 10:12:47 +0000 (13:12 +0300)]
lib-lua: Add flag manipulation functions
Aki Tuomi [Thu, 11 Oct 2018 16:50:06 +0000 (19:50 +0300)]
lib-lua: Add test for event framework
Aki Tuomi [Thu, 11 Oct 2018 16:10:17 +0000 (19:10 +0300)]
lib-lua: Add event interface
Aki Tuomi [Thu, 11 Oct 2018 14:06:00 +0000 (17:06 +0300)]
lib-lua: Add events to scripts
Timo Sirainen [Thu, 18 Oct 2018 09:35:22 +0000 (12:35 +0300)]
fts: Fix search query generation when one language ignores a token
The search query was changed to "NOT ALL", even though other languages
used the token.
Stephan Bosch [Fri, 12 Oct 2018 07:45:42 +0000 (09:45 +0200)]
submission: relay backend: Handle the LMTP per-RCPT DATA reply behavior when enabled.
Without this change, enabling the per-RCPT DATA reply behavior on the server
side will not have the desired effect.
Stephan Bosch [Wed, 17 Oct 2018 23:39:05 +0000 (01:39 +0200)]
submission: relay backend: Log an error when relayed commands fail with connection-related errors.
Errors sent by the remote server are handled by the command reply handler and
are logged using i_info() where relevant.
Stephan Bosch [Fri, 12 Oct 2018 08:34:21 +0000 (10:34 +0200)]
submission: relay backend: Fix comment in RCPT command code.
Stephan Bosch [Fri, 12 Oct 2018 07:42:29 +0000 (09:42 +0200)]
submission: recipient: Add field for associating backend context.
Stephan Bosch [Fri, 12 Oct 2018 07:34:56 +0000 (09:34 +0200)]
lmtp: DATA command: Assert that the server transaction flags are correct for LMTP.
Stephan Bosch [Sat, 6 Oct 2018 09:21:35 +0000 (11:21 +0200)]
lib-smtp: server: Allow enabling the LMTP per-RCPT DATA reply behavior for ESMTP transactions.
This is non-standard.
Aki Tuomi [Thu, 18 Oct 2018 08:37:00 +0000 (11:37 +0300)]
mail-lua: Check number of arguments
Aki Tuomi [Thu, 18 Oct 2018 09:04:41 +0000 (12:04 +0300)]
lib-lua: Add DLUA_REQUIRE_ARGS(s,x) and DLUA_REQUIRE_ARGS_IN(s,x,y)
First form requires that x arguments are provided for dlua script s.
Second form requires that at least x and at most y arguments are provided
for dlua script s
Automatically returns luaL_error.
Aki Tuomi [Tue, 16 Oct 2018 08:35:45 +0000 (11:35 +0300)]
mail-lua: Make flags optional for mailbox#sync
Aki Tuomi [Tue, 16 Oct 2018 08:34:23 +0000 (11:34 +0300)]
mail-lua: Make flags optional for user#mailbox
Aki Tuomi [Tue, 16 Oct 2018 07:13:27 +0000 (10:13 +0300)]
mail-lua: Change mailbox#status API to varargs
It's much easier to use this way
Aki Tuomi [Wed, 17 Oct 2018 16:44:31 +0000 (19:44 +0300)]
lib-master: Fix test-event-stats
New stats uses gettimeofday that generated unpredictable values
for this test.
Aki Tuomi [Wed, 17 Oct 2018 09:47:37 +0000 (12:47 +0300)]
lib: event - Stop exporting ioloop time
It is not needed by stats process.
Aki Tuomi [Tue, 16 Oct 2018 06:03:05 +0000 (09:03 +0300)]
stats: Use duration field from events
Aki Tuomi [Tue, 16 Oct 2018 05:52:49 +0000 (08:52 +0300)]
lib: event - Record real duration
The old code only measured difference between successive
ioloop_time updates. The new code uses gettimeofday to
get current real time, making measurements accurate.
Aki Tuomi [Tue, 16 Oct 2018 05:17:27 +0000 (08:17 +0300)]
lib: event - Duplicate source_filename
Prevents crash on event leak when plugin that caused the leak
is unloaded.
Aki Tuomi [Tue, 16 Oct 2018 13:11:23 +0000 (16:11 +0300)]
lib: event - Rename tv_created as tv_created_ioloop
Stephan Bosch [Fri, 12 Oct 2018 07:23:27 +0000 (09:23 +0200)]
submission: relay backend: Do not close the client connection for failure in a non-default backend.
Adjusts the backend API to remember the failure until the present transaction is
reset. In the mean time, any commands issued to the backend are failed
immediately. In contrast, failure on the default backend will cause the client
connection to be closed, like before.
Stephan Bosch [Fri, 12 Oct 2018 08:01:12 +0000 (10:01 +0200)]
submission: relay backend: Use (potentially) modified reply after backend_relay_handle_relay_reply().
Before, it sometimes still referred to the original reply struct from the client
callback.
Stephan Bosch [Fri, 12 Oct 2018 08:07:14 +0000 (10:07 +0200)]
submission: relay backend: Use smtp_reply_is_success() to evaluate reply form relay.
Before, it evaluated the reply status directly.
Stephan Bosch [Sun, 14 Oct 2018 12:23:32 +0000 (14:23 +0200)]
lib-smtp: server: Add smtp_server_command_get_reply_count().
Returns the number of replies expected to the command.
Stephan Bosch [Sun, 14 Oct 2018 11:45:56 +0000 (13:45 +0200)]
lib-smtp: client: Make smtp_client_transaction_unref(NULL) a no-op.
Stephan Bosch [Sun, 14 Oct 2018 11:43:42 +0000 (13:43 +0200)]
lib-smtp: client: Make smtp_client_transaction_destroy(NULL) a no-op.
Stephan Bosch [Wed, 10 Oct 2018 22:50:26 +0000 (00:50 +0200)]
submission: Allocate recipients for the client transaction on the server recipient pool.
Stephan Bosch [Wed, 10 Oct 2018 22:49:44 +0000 (00:49 +0200)]
lmtp: proxy: Allocate recipients for the client transaction on the server recipient pool.
Stephan Bosch [Wed, 10 Oct 2018 22:49:33 +0000 (00:49 +0200)]
lib-smtp: client: transaction: Add alternative function for adding a recipient on an application-provided pool.
This allows modifying the recipient object beyond approval. Before, it was
always moved to the transaction pool, thereby invalidating the original returned
pointer. This way, the data_calback and context can be set at a later time,
e.g. when the DATA command is being processed. This makes a choice between
LMTP-style and SMTP-style replies to the DATA command a bit easier to handle.
Also, the recipient is entirely allocated on a single pool between the client
and server side, which should improve memory consumption a little. As a bonus,
this removes the need to have dummy DATA callbacks.
Stephan Bosch [Fri, 12 Oct 2018 08:42:55 +0000 (10:42 +0200)]
lib-smtp: client: transaction: Fix and amend a few comments in the header.