]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
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.
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 [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.
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.
Stephan Bosch [Fri, 12 Oct 2018 07:24:06 +0000 (09:24 +0200)]
lib-smtp: client: Remove unused "failed" field from struct smtp_client_transaction_mail.
Stephan Bosch [Sun, 14 Oct 2018 20:34:50 +0000 (22:34 +0200)]
submission: Fix starting secondary backends created before the server-side transaction is fully created.
Record an array of those backends and start them once the transaction is
created. Before, this was implemented using the array of approved recipients
(which each point to their backend). However, this does not work, since there
can be no approved recipients when there is no server-side transaction yet.
Stephan Bosch [Sun, 14 Oct 2018 21:00:11 +0000 (23:00 +0200)]
submission: relay backend: Properly manage the trans_started flag.
Sometimes it was not set at all. This didn't lead to problems in most cases, but
this was at least confusing while debugging. Also, the flag is set before the
client transaction is actually started, making sure (future) recursive problems
will not occur.
Stephan Bosch [Sun, 14 Oct 2018 20:48:58 +0000 (22:48 +0200)]
submission: relay backend: Set the immediate for the client transaction no matter where it is created.
Forgot a few instances.
Stephan Bosch [Sun, 14 Oct 2018 20:42:36 +0000 (22:42 +0200)]
submission: RCPT command: Move starting the backend transaction from submission-commands.c to submission-backend.c.
This way, the transaction is only started from RCPT when the backend needs it at this point.
Stephan Bosch [Sun, 23 Sep 2018 17:53:07 +0000 (19:53 +0200)]
submission: relay backend: Add support for relaying to a unix socket.
Stephan Bosch [Sun, 23 Sep 2018 17:43:05 +0000 (19:43 +0200)]
lib-smtp: client: Allow connecting to SMTP/LMTP services offered through unix sockets.
Stephan Bosch [Sun, 23 Sep 2018 17:32:11 +0000 (19:32 +0200)]
lib-smtp: client: Move creation of connection object to a separate function.
Stephan Bosch [Sun, 7 Oct 2018 16:37:48 +0000 (18:37 +0200)]
lib-smtp: server: Record the associated server command in the recipient object.
This avoids the need to do that in application code.
Stephan Bosch [Sun, 7 Oct 2018 19:24:43 +0000 (21:24 +0200)]
submission: Use the recipient index in the server recipient object rather than the submission recipient.
Stephan Bosch [Sun, 7 Oct 2018 19:23:44 +0000 (21:23 +0200)]
lmtp: Use the recipient index in the server recipient object rather than the lmtp recipient.
Stephan Bosch [Sun, 7 Oct 2018 17:44:40 +0000 (19:44 +0200)]
submission: Use the path in the server recipient object rather than the submission recipient.
It is recorded reliably on a pool from the start now
Stephan Bosch [Sun, 7 Oct 2018 17:47:59 +0000 (19:47 +0200)]
lmtp: Use the path in the server recipient object rather than the lmtp recipient.
It is recorded reliably on a pool from the start now.
Stephan Bosch [Sun, 7 Oct 2018 15:47:29 +0000 (17:47 +0200)]
submission: Start using the new lib-smtp/server recipient pool.
Stephan Bosch [Sun, 7 Oct 2018 20:32:38 +0000 (22:32 +0200)]
lmtp: Start using the new lib-smtp/server recipient pool.
Stephan Bosch [Sun, 7 Oct 2018 19:37:00 +0000 (21:37 +0200)]
lib-smtp: server: Create the definitive recipient object right at the reception of the RCPT command.
Before, it first allocated stuff on the command pool, which gets freed when the RCPT
command finishes. Allocating the recipient data on its own pool from the start
considerably simplifies the code and prevents very nasty bugs.
Stephan Bosch [Sun, 7 Oct 2018 19:13:44 +0000 (21:13 +0200)]
lib-smtp: server: Record the index in the list of approved recipients in the recipient object.
This avoids the need to do that in application code.
Stephan Bosch [Sun, 7 Oct 2018 18:42:20 +0000 (20:42 +0200)]
lib-smtp: server: Add hooks API for recipient.
Stephan Bosch [Sun, 7 Oct 2018 18:34:12 +0000 (20:34 +0200)]
lib-smtp: server: Allocate each recipient on its own pool.
This way, the application can associate data with the recipient, which
implicitly goes away either when the transaction is finished or the recipient is
denied.
Stephan Bosch [Sun, 7 Oct 2018 23:09:26 +0000 (01:09 +0200)]
submission: Rename struct smtp_server_recipient *trcpt variables to *rcpt.
Stephan Bosch [Sun, 7 Oct 2018 22:44:28 +0000 (00:44 +0200)]
submission: Rename struct submission_recipient *rcpt variables to *srcpt.
Stephan Bosch [Sun, 7 Oct 2018 21:53:11 +0000 (23:53 +0200)]
lmtp: Rename struct smtp_server_recipient *trcpt variables to *rcpt.
Stephan Bosch [Mon, 12 Mar 2018 00:22:34 +0000 (01:22 +0100)]
lmtp: local: Rename struct lmtp_local_recipient *rcpt variables to *llrcpt.
Stephan Bosch [Mon, 12 Mar 2018 00:12:30 +0000 (01:12 +0100)]
lmtp: proxy: Rename struct lmtp_proxy_recipient *rcpt variables to *lprcpt.
Stephan Bosch [Sun, 7 Oct 2018 21:08:37 +0000 (23:08 +0200)]
lmtp: common: Rename struct lmtp_recipient *rcpt variables to *lrcpt.
Stephan Bosch [Mon, 12 Mar 2018 02:12:44 +0000 (03:12 +0100)]
lmtp: local: Do not use array_idx() to obtain transaction recipient from lib-smtp.
It is already available in struct lmtp_recipient. Also, this call was very ugly.
Stephan Bosch [Sun, 7 Oct 2018 16:17:28 +0000 (18:17 +0200)]
lmtp: Reformat commands.h.
Stephan Bosch [Thu, 4 Oct 2018 22:26:56 +0000 (00:26 +0200)]
submission: client: Add API for adding extra (non-standard) capabilities.
Stephan Bosch [Thu, 4 Oct 2018 22:26:03 +0000 (00:26 +0200)]
lib-smtp: syntax: Add verification functions for EHLO keywords and parameters.
Stephan Bosch [Tue, 25 Sep 2018 00:18:24 +0000 (02:18 +0200)]
submission: Add support for module contexts to recipient.
Stephan Bosch [Sun, 13 May 2018 09:33:03 +0000 (11:33 +0200)]
submission: Add support for module contexts to client.
Stephan Bosch [Sun, 16 Sep 2018 19:47:10 +0000 (21:47 +0200)]
submission: Implement client vfuncs for transaction start and free.
Stephan Bosch [Sat, 15 Sep 2018 19:47:42 +0000 (21:47 +0200)]
submission: Implement client vfuncs for all normal SMTP commands.
Stephan Bosch [Sun, 13 May 2018 09:15:59 +0000 (11:15 +0200)]
submission: Implement basic client vfuncs.
Currently, only client_destroy can be overriden.
Stephan Bosch [Tue, 25 Sep 2018 00:11:46 +0000 (02:11 +0200)]
submission: Allocate each recipient object on its own pool.
This allows allocating per recipient module data.
Stephan Bosch [Mon, 24 Sep 2018 23:53:02 +0000 (01:53 +0200)]
submission: Provide ephemeral pool for transaction state.
Stephan Bosch [Sun, 16 Sep 2018 19:15:20 +0000 (21:15 +0200)]
submission: Allocate client on alloconly mempool.
Stephan Bosch [Thu, 13 Sep 2018 21:30:26 +0000 (23:30 +0200)]
lib-smtp: server: Add proper infrastructure for adding custom MAIL/RCPT command parameters.
Stephan Bosch [Sun, 16 Sep 2018 20:07:16 +0000 (22:07 +0200)]
lib-smtp: params: Add functions for dropping extra MAIL/RCPT parameters.
Stephan Bosch [Wed, 3 Oct 2018 20:05:10 +0000 (22:05 +0200)]
lib-smtp: params: Add functions for adding extra MAIL/RCPT parameters.
Stephan Bosch [Thu, 13 Sep 2018 20:48:51 +0000 (22:48 +0200)]
lib-smtp: params: Allow only specific custom parameter extensions, rather than any parameter.
Before the choice was between allowing any extension or none.
Stephan Bosch [Sun, 16 Sep 2018 19:55:58 +0000 (21:55 +0200)]
lib-smtp: params: Fix segfault occurring in smtp_param_write() when param->value == NULL.
Stephan Bosch [Sat, 29 Sep 2018 02:42:27 +0000 (04:42 +0200)]
submission: relay backend: Use SMTP client transaction API, rather than relaying individual commands.
Stephan Bosch [Sun, 30 Sep 2018 22:28:06 +0000 (00:28 +0200)]
lib-smtp: client: transaction: Add option to submit commands immediately, rather than queueing them on a zero timeout.
Also, allow interleaving other unrelated (non-transaction) commands. This is
made possible by not locking/plugging the command pipeline.
Stephan Bosch [Sat, 29 Sep 2018 16:28:29 +0000 (18:28 +0200)]
lib-smtp: client: Fully disconnect the connection upon failure before triggering failure callbacks.
Stephan Bosch [Sat, 29 Sep 2018 22:37:10 +0000 (00:37 +0200)]
lib-smtp: client: transaction: Add support for aborting a pending RCPT command.
Stephan Bosch [Sat, 29 Sep 2018 22:35:26 +0000 (00:35 +0200)]
lib-smtp: client: transaction: Add support for aborting a pending MAIL command.
Stephan Bosch [Fri, 28 Sep 2018 15:59:53 +0000 (17:59 +0200)]
lib-smtp: client: transaction: Add support for creating an empty transaction (without MAIL FROM data).
Stephan Bosch [Fri, 28 Sep 2018 13:44:55 +0000 (15:44 +0200)]
lib-smtp: client: transaction: Add support for pipelining more than a single MAIL command.
Stephan Bosch [Fri, 28 Sep 2018 00:10:41 +0000 (02:10 +0200)]
lib-smtp: client: transaction: Add infrastructure for pipelining more than a single MAIL command.
Stephan Bosch [Fri, 28 Sep 2018 11:39:44 +0000 (13:39 +0200)]
lib-smtp: client: transaction: Rename mail_from_callback/mail_from_context to mail_callback/mail_context.
Stephan Bosch [Sun, 30 Sep 2018 09:50:02 +0000 (11:50 +0200)]
lib-smtp: client: transaction: Use linked lists rather than arrays for recipients.
Stephan Bosch [Thu, 20 Sep 2018 22:55:51 +0000 (00:55 +0200)]
lib-smtp: client: transaction: Add support for ending the transaction in a graceful RSET command.
Allows running the pending transaction until RSET, without abruptly aborting
it or issuing a DATA command.
Stephan Bosch [Sun, 30 Sep 2018 21:56:57 +0000 (23:56 +0200)]
lib-smtp: client: transaction: Move initiation of command submission to a central position.
Stephan Bosch [Fri, 28 Sep 2018 11:28:50 +0000 (13:28 +0200)]
lib-smtp: client: transaction: Perform pipeline plug handling just once at top-level in smtp_client_transaction_submit_more().
Stephan Bosch [Fri, 28 Sep 2018 11:17:30 +0000 (13:17 +0200)]
lib-smtp: client: transaction: Annotate sub-parts of smtp_client_transaction_send_more() with comments.
Stephan Bosch [Sun, 30 Sep 2018 21:35:58 +0000 (23:35 +0200)]
lib-smtp: client: transaction: Move smtp_client_transaction_submit_more().
Stephan Bosch [Tue, 2 Oct 2018 02:28:10 +0000 (04:28 +0200)]
lib-smtp: client: transaction: Move initiation of command submission after starting the transaction timeout.
This is a precaution against the emergence of segfaults when command submission
somehow terminates the transaction in a future version (actually, a segfault
did emerge in an earlier version of this set of changes). Also it is a cosmetic
change: putting the most important act at the end of the function makes more
sense in this case.
Stephan Bosch [Fri, 28 Sep 2018 11:08:46 +0000 (13:08 +0200)]
lib-smtp: client: transaction: Rename smtp_client_transaction_send_rcpts() to smtp_client_transaction_submit_more().
Stephan Bosch [Mon, 1 Oct 2018 21:26:18 +0000 (23:26 +0200)]
lib-smtp: client: transaction: Move the code executed at the completion of the transaction to a separate shared function.
The transaction is complete when all RCPT replies are received and either a DATA
or a RSET command is submitted.
Stephan Bosch [Tue, 2 Oct 2018 19:44:48 +0000 (21:44 +0200)]
lib-smtp: client: transaction: Don't trigger next transaction unless all RCPT replies are received and DATA is submitted.
Triggering the next transaction when DATA submitted while not all RCPT replies
are received (as it was before) is problematic when commands are submitted
immediately by the transaction (which is added in a later commit).
Stephan Bosch [Sat, 29 Sep 2018 18:43:20 +0000 (20:43 +0200)]
lib-smtp: client: transaction: Prevent calling callbacks after smtp_client_transaction_destroy().
Stephan Bosch [Sat, 29 Sep 2018 19:09:57 +0000 (21:09 +0200)]
lib-smtp: client: transaction: Annotate sub-parts of smtp_client_transaction_fail_reply() with comments.
Stephan Bosch [Sat, 29 Sep 2018 19:07:50 +0000 (21:07 +0200)]
lib-smtp: client: transaction: Add debug message for when smtp_client_transaction_abort() is called during smtp_client_transaction_fail*().
Stephan Bosch [Sat, 29 Sep 2018 11:19:53 +0000 (13:19 +0200)]
lib-smtp: client: transaction: Make sure the transaction is finished/aborted after smtp_client_connection_destroy().
Otherwise, the transaction could be dereferenced several times too often.
Stephan Bosch [Mon, 1 Oct 2018 22:04:44 +0000 (00:04 +0200)]
lib-smtp: client: connection: Add debug messages for transaction handling.
Stephan Bosch [Fri, 28 Sep 2018 22:21:05 +0000 (00:21 +0200)]
lib-smtp: server: RCPT command: Improve replacement of (forwarded) specific error reply with generic state error.
Predictable transaction state errors were not always replaced reliably when
commands were pipelined, leading to a mix of proxy and remote errors.
Stephan Bosch [Fri, 28 Sep 2018 22:20:50 +0000 (00:20 +0200)]
lib-smtp: server: MAIL command: Improve replacement of (forwarded) specific error reply with generic state error.
Predictable transaction state errors were not always replaced reliably when
commands were pipelined, leading to a mix of proxy and remote errors.
Stephan Bosch [Fri, 28 Sep 2018 22:19:05 +0000 (00:19 +0200)]
lib-smtp: server: Add ability to determine whether command reply was created using smtp_server_reply_create_forward().
Stephan Bosch [Thu, 27 Sep 2018 20:16:56 +0000 (22:16 +0200)]
lib-smtp: server: MAIL command: Reliably start the transaction when several MAIL commands are pipelined.