]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
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 agolib: json - Escape invalid UTF-8 as unicode bytes
Aki Tuomi [Tue, 2 Apr 2019 10:09:48 +0000 (13:09 +0300)] 
lib: json - Escape invalid UTF-8 as unicode bytes

This prevents dovecot from crashing if invalid UTF-8 input
is given.

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-smtp: smtp-server-cmd-auth - Fix AUTH response error handling so that it stops...
Stephan Bosch [Thu, 25 Apr 2019 07:51:32 +0000 (09:51 +0200)] 
lib-smtp: smtp-server-cmd-auth - Fix AUTH response error handling so that it stops reading more input.

Otherwise, it may try to read more data from the stream as the next AUTH
response, which causes an assert crash in the command parser later on. Even when
the parser finds no input from the stream, it will advance its state
towards AUTH response parsing, which is a problem when the next command is
subsequently being parsed.

Panic was:

Panic: file smtp-command-parser.c: line 438 (smtp_command_parse_next): assertion failed: (!parser->auth_response || parser->state.state == SMTP_COMMAND_PARSE_STATE_INIT || parser->state.state == SMTP_COMMAND_PARSE_STATE_ERROR)

6 years agosubmission-login: client-authenticate - Fix crash occurring when client disconnects...
Stephan Bosch [Tue, 12 Mar 2019 02:18:33 +0000 (03:18 +0100)] 
submission-login: client-authenticate - Fix crash occurring when client disconnects during authentication.

6 years agosubmission-login: Remove unused client->pending_starttls.
Stephan Bosch [Mon, 22 Apr 2019 22:13:46 +0000 (00:13 +0200)] 
submission-login: Remove unused client->pending_starttls.

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 agoNEWS: Update news with missing entries from other branches
Aki Tuomi [Fri, 12 Apr 2019 14:57:32 +0000 (17:57 +0300)] 
NEWS: Update news with missing entries from other branches

6 years agolib-lda: mail-deliver - Emit events at start and finish of delivery.
Stephan Bosch [Tue, 12 Mar 2019 22:23:35 +0000 (23:23 +0100)] 
lib-lda: mail-deliver - Emit events at start and finish of delivery.

6 years agolib-lda: Replace i_warning() with e_warning().
Stephan Bosch [Sun, 10 Mar 2019 12:08:34 +0000 (13:08 +0100)] 
lib-lda: Replace i_warning() with e_warning().

6 years agolib-lda: Replace i_info() with e_info().
Stephan Bosch [Sun, 10 Mar 2019 12:01:08 +0000 (13:01 +0100)] 
lib-lda: Replace i_info() with e_info().

6 years agolib-lda: Replace i_error() with e_error().
Stephan Bosch [Sun, 10 Mar 2019 11:58:03 +0000 (12:58 +0100)] 
lib-lda: Replace i_error() with e_error().

6 years agolib-lda: mail-deliver - Add message fields to the deliver event.
Stephan Bosch [Sun, 10 Mar 2019 09:53:51 +0000 (10:53 +0100)] 
lib-lda: mail-deliver - Add message fields to the deliver event.

6 years agolib-lda: mail-deliver - Rename mail_deliver_cache to mail_deliver_fields.
Stephan Bosch [Sun, 10 Mar 2019 11:13:10 +0000 (12:13 +0100)] 
lib-lda: mail-deliver - Rename mail_deliver_cache to mail_deliver_fields.

Also make the fields public.

6 years agolda: Use LDA event as mail_*user's parent event.
Stephan Bosch [Mon, 4 Mar 2019 00:15:47 +0000 (01:15 +0100)] 
lda: Use LDA event as mail_*user's parent event.

6 years agolda: Add support for event API.
Stephan Bosch [Mon, 4 Mar 2019 00:12:55 +0000 (01:12 +0100)] 
lda: Add support for event API.

6 years agolda: Assign envelope fields in mail deliver context right away.
Stephan Bosch [Mon, 4 Mar 2019 00:08:21 +0000 (01:08 +0100)] 
lda: Assign envelope fields in mail deliver context right away.

6 years agolmtp: lmtp-local - Use recipient event for mail delivery.
Stephan Bosch [Sun, 3 Mar 2019 23:30:27 +0000 (00:30 +0100)] 
lmtp: lmtp-local - Use recipient event for mail delivery.

6 years agolib-lda: mail-deliver - Add support for event API.
Stephan Bosch [Sun, 3 Mar 2019 23:28:42 +0000 (00:28 +0100)] 
lib-lda: mail-deliver - Add support for event API.

6 years agolib-lda: Initialize/deinitialize mail_deliver_context in separate functions.
Stephan Bosch [Wed, 27 Mar 2019 00:25:57 +0000 (01:25 +0100)] 
lib-lda: Initialize/deinitialize mail_deliver_context in separate functions.

This changes the allocation of parsed SMTP addresses to initially use a
datastack pool rather than the mail_deliver context pool. This is necessary
because the context is created a bit later. Upon mail_deliver_init(), the
addresses are moved to the context pool.

6 years agolda: Move mail_deliver() invocation to a separate function.
Stephan Bosch [Sun, 31 Mar 2019 14:14:06 +0000 (16:14 +0200)] 
lda: Move mail_deliver() invocation to a separate function.

6 years agolib-lda: mail-deliver - Split the mail_deliver() function to perform post-delivery...
Stephan Bosch [Mon, 4 Mar 2019 00:19:05 +0000 (01:19 +0100)] 
lib-lda: mail-deliver - Split the mail_deliver() function to perform post-delivery cleanup in one place.

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: 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 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 agolmtp: Add mail_user_settings to struct client
Timo Sirainen [Thu, 14 Mar 2019 16:57:54 +0000 (18:57 +0200)] 
lmtp: Add mail_user_settings to struct client

6 years agolib-storage: Add mailbox_keywords_merge()
Timo Sirainen [Thu, 14 Mar 2019 16:58:14 +0000 (18:58 +0200)] 
lib-storage: Add mailbox_keywords_merge()

6 years agolib-storage: Add mailbox_search_mail_detach()
Timo Sirainen [Thu, 28 Feb 2019 13:10:59 +0000 (15:10 +0200)] 
lib-storage: Add mailbox_search_mail_detach()

This allows keeping the struct mail open even after the mail_search_context
that created it is freed.

6 years agolib-storage: Move tracking mails to mail_search_context from index-specific code
Timo Sirainen [Thu, 28 Feb 2019 13:03:22 +0000 (15:03 +0200)] 
lib-storage: Move tracking mails to mail_search_context from index-specific code

This makes the next commit much easier to implement.

6 years agolib-storage: Move index_mail.search_mail to mail_private struct
Timo Sirainen [Thu, 28 Feb 2019 13:08:38 +0000 (15:08 +0200)] 
lib-storage: Move index_mail.search_mail to mail_private struct

6 years agolib-mail: istream-header-filter: Fix HEADER_FILTER_ADD_MISSING_EOH with callback
Timo Sirainen [Mon, 18 Mar 2019 13:34:10 +0000 (15:34 +0200)] 
lib-mail: istream-header-filter: Fix HEADER_FILTER_ADD_MISSING_EOH with callback

If mail already had EOH and callback returned matched=TRUE in the EOH
callback (e.g. adding more headers), the callback was called a second
time for the EOH.

Currently there doesn't seem to be any existing code that was affected by
this bug.

6 years agolib: Add test for backtrace-string
Aki Tuomi [Thu, 14 Mar 2019 08:10:45 +0000 (10:10 +0200)] 
lib: Add test for backtrace-string

6 years agolib: Add libunwind support for getting backtrace
Aki Tuomi [Fri, 8 Mar 2019 11:38:56 +0000 (13:38 +0200)] 
lib: Add libunwind support for getting backtrace

This actually resolves symbols to readable names
making the backtrace useful.

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 agolib-oauth2: Don't crash when http response has no payload
Martti Rannanjärvi [Fri, 22 Mar 2019 06:11:21 +0000 (08:11 +0200)] 
lib-oauth2: Don't crash when http response has no payload

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()

6 years agolib-ssl-iostream: Minor assert cleanup.
Timo Sirainen [Tue, 4 Oct 2016 13:00:18 +0000 (16:00 +0300)] 
lib-ssl-iostream: Minor assert cleanup.

If stream->closed is TRUE then stream->stream_errno != 0 as well. And here
we really want to be sure that stream_errno isn't 0, so make the assert
reflect that.

6 years agoconfig: reproducible output from settings-get.pl
Olaf Hering [Thu, 3 Jan 2019 19:32:26 +0000 (20:32 +0100)] 
config: reproducible output from settings-get.pl

If the same source gets built twice ('build same source on different
hosts at different times') the resulting files may differ.
Fix this by sorting the hash keys before usage.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
6 years agolib-oauth2: Remove obsolete files.
Sergey Kitov [Wed, 20 Mar 2019 12:20:44 +0000 (14:20 +0200)] 
lib-oauth2: Remove obsolete files.

6 years agolib-oauth2: Refactor oauth request code.
Sergey Kitov [Mon, 11 Feb 2019 14:37:53 +0000 (16:37 +0200)] 
lib-oauth2: Refactor oauth request code.

Use one parameterized function instead of three copy-paste functions.

6 years agolib-http: client: Fix segfault crash sometimes happening while running sub-ioloop...
Stephan Bosch [Wed, 29 Aug 2018 17:01:37 +0000 (19:01 +0200)] 
lib-http: client: Fix segfault crash sometimes happening while running sub-ioloop in request callback.

The connection was not completely disconnected before calling the callback.
Running a sub-ioloop means that timeouts and ios that haven't been destroyed yet
for the connection can be triggered, causing all kinds of issues. Therefore, it
is important to disconnect before calling the request callbacks. The fix therefore
consists of calling http_client_connection_disconnect() before calling
http_client_connection_retry_requests() in
http_client_connection_abort_temp_error().

This also amends the test suite to account for these changes, as it is now
unclear which requests will actually succeed.

6 years agolib-http: client: Abort pending requests at connection destroy rather than disconnect.
Stephan Bosch [Sun, 16 Sep 2018 13:36:59 +0000 (15:36 +0200)] 
lib-http: client: Abort pending requests at connection destroy rather than disconnect.

This is needed for subsequent changes.

6 years agolib-http: client: Implement the no_auto_retry setting in http_client_request_retry().
Stephan Bosch [Sun, 16 Sep 2018 13:19:23 +0000 (15:19 +0200)] 
lib-http: client: Implement the no_auto_retry setting in http_client_request_retry().

Before, it was implemented in http_client_connection_retry_requests(), but that
would not work after http_client_connection_disconnect().The peer is detached
from the connection there, which makes conn->peer->client->set unavailable.
Instead, we use req->client->set for each request individually to determine
whether it should be retried or not.

6 years agolib-storage: mail-storage-service: Fix failure prefix composition in mail_storage_ser...
Stephan Bosch [Sun, 6 Jan 2019 11:11:26 +0000 (12:11 +0100)] 
lib-storage: mail-storage-service: Fix failure prefix composition in mail_storage_service_lookup().

It produced a prefix without the required ": " suffix and in one case it
produced a spurious comma.

6 years agolib-storage: Fix -Wimplicit-fallthrough compiler warning
Timo Sirainen [Wed, 20 Mar 2019 12:00:51 +0000 (14:00 +0200)] 
lib-storage: Fix -Wimplicit-fallthrough compiler warning

6 years agolib-smtp: smtp-server-reply - Fix dead assignment in smtp_server_reply_get_path_len().
Stephan Bosch [Wed, 20 Mar 2019 08:26:54 +0000 (09:26 +0100)] 
lib-smtp: smtp-server-reply - Fix dead assignment in smtp_server_reply_get_path_len().

Problem found by Clang scan-build.

6 years agolib-smtp: test-smtp-payload: Implement connection reuse.
Stephan Bosch [Wed, 14 Nov 2018 00:10:13 +0000 (01:10 +0100)] 
lib-smtp: test-smtp-payload: Implement connection reuse.

Makes the test as a whole faster and it tests an important aspect of connection
management (which, in fact, we currently don't use).

6 years agolib-smtp: smtp-server-cmd-rcpt - Use smtp_server_recipient_reply() to submit the...
Stephan Bosch [Tue, 19 Mar 2019 00:54:16 +0000 (01:54 +0100)] 
lib-smtp: smtp-server-cmd-rcpt - Use smtp_server_recipient_reply() to submit the default success reply.

6 years agolib-smtp: smtp-server-recipient - Enforce <path> prefix in forwarded reply.
Stephan Bosch [Fri, 15 Mar 2019 23:53:07 +0000 (00:53 +0100)] 
lib-smtp: smtp-server-recipient - Enforce <path> prefix in forwarded reply.

This is mainly for concistency, but it also prevents exposing addresses that
are supposed to be only visible to the backend. Also, this implicitly adds the
<path> prefix to the reply when it is missing, provided it is not an RCPT
success reply.

6 years agolib-smtp: smtp-server-reply - Add smtp_server_reply_replace_path().
Stephan Bosch [Fri, 15 Mar 2019 00:16:35 +0000 (01:16 +0100)] 
lib-smtp: smtp-server-reply - Add smtp_server_reply_replace_path().

Replaces or adds a <path> prefix to the reply text.

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-smtp: smtp-server-reply - Add smtp_server_reply_prepend_text().
Stephan Bosch [Sat, 16 Mar 2019 16:41:38 +0000 (17:41 +0100)] 
lib-smtp: smtp-server-reply - Add smtp_server_reply_prepend_text().

6 years agolib-smtp: smtp-server-reply - Add smtp_server_reply_get_status().
Stephan Bosch [Sat, 16 Mar 2019 16:31:41 +0000 (17:31 +0100)] 
lib-smtp: smtp-server-reply - Add smtp_server_reply_get_status().

6 years agolib-smtp: smtp-server-reply - Support changing the reply status and enhanced code.
Stephan Bosch [Sat, 16 Mar 2019 16:13:28 +0000 (17:13 +0100)] 
lib-smtp: smtp-server-reply - Support changing the reply status and enhanced code.

6 years agolib-smtp: smtp-server-reply - Assign reply status and enhanced code in a separate...
Stephan Bosch [Sat, 16 Mar 2019 15:25:22 +0000 (16:25 +0100)] 
lib-smtp: smtp-server-reply - Assign reply status and enhanced code in a separate function.

6 years agolib-smtp: smtp-server-recipient - Add smtp_server_recipient_get_reply() and use it.
Stephan Bosch [Sat, 16 Mar 2019 15:24:59 +0000 (16:24 +0100)] 
lib-smtp: smtp-server-recipient - Add smtp_server_recipient_get_reply() and use it.

6 years agolib-smtp: smtp-server-recipient - Add hook for the submission of a DATA/BDAT/BURL...
Stephan Bosch [Sat, 16 Mar 2019 13:41:37 +0000 (14:41 +0100)] 
lib-smtp: smtp-server-recipient - Add hook for the submission of a DATA/BDAT/BURL command reply.

6 years agolib-smtp: smtp-server-cmd-data - Call smtp_server_transaction_last_data() earlier...
Stephan Bosch [Sat, 16 Mar 2019 14:26:58 +0000 (15:26 +0100)] 
lib-smtp: smtp-server-cmd-data - Call smtp_server_transaction_last_data() earlier for the DATA command.

Makes sure rcpt->cmd is set before replies are being submitted.

6 years agolib-mstp: smtp-server-recipient - Make smtp_server_recipient_call_hooks() private...
Stephan Bosch [Sat, 16 Mar 2019 14:20:22 +0000 (15:20 +0100)] 
lib-mstp: smtp-server-recipient - Make smtp_server_recipient_call_hooks() private rather than static.

6 years agolib-smtp: smtp-server-transaction - Allow calling smtp_server_transaction_last_data...
Stephan Bosch [Sat, 16 Mar 2019 14:14:59 +0000 (15:14 +0100)] 
lib-smtp: smtp-server-transaction - Allow calling smtp_server_transaction_last_data() more than once.

6 years agolib-smtp: smtp-server-transaction - Allow calling smtp_server_transaction_last_data...
Stephan Bosch [Sat, 16 Mar 2019 14:13:03 +0000 (15:13 +0100)] 
lib-smtp: smtp-server-transaction - Allow calling smtp_server_transaction_last_data() when all recipients failed.

6 years agolib-smtp: smtp-server-command - Add hook for the submission of individual replies.
Stephan Bosch [Sat, 16 Mar 2019 14:03:39 +0000 (15:03 +0100)] 
lib-smtp: smtp-server-command - Add hook for the submission of individual replies.

6 years agolib-smtp: smtp-server-command - Make removal of hook optional for smtp_server_command...
Stephan Bosch [Sat, 16 Mar 2019 13:47:41 +0000 (14:47 +0100)] 
lib-smtp: smtp-server-command - Make removal of hook optional for smtp_server_command_call_hooks().

6 years agosubmission: Use the new recipient reply wrapper functions.
Stephan Bosch [Fri, 15 Mar 2019 01:14:57 +0000 (02:14 +0100)] 
submission: Use the new recipient reply wrapper functions.

6 years agolmtp: lmtp-proxy - Use the new recipient reply wrapper functions.
Stephan Bosch [Thu, 14 Mar 2019 22:31:49 +0000 (23:31 +0100)] 
lmtp: lmtp-proxy - Use the new recipient reply wrapper functions.

6 years agolmtp: lmtp-local - Use the new recipient reply wrapper functions.
Stephan Bosch [Thu, 14 Mar 2019 21:49:21 +0000 (22:49 +0100)] 
lmtp: lmtp-local - Use the new recipient reply wrapper functions.

6 years agolib-smtp: smtp-server-recipient - Add smtp_server_recipient_reply_forward().
Stephan Bosch [Fri, 15 Mar 2019 00:50:01 +0000 (01:50 +0100)] 
lib-smtp: smtp-server-recipient - Add smtp_server_recipient_reply_forward().

This acts as a wrapper around smtp_server_reply_index_forward().

6 years agolib-smtp: smtp-server-recipient - Add smtp_server_recipient_is_replied().
Stephan Bosch [Fri, 15 Mar 2019 00:38:29 +0000 (01:38 +0100)] 
lib-smtp: smtp-server-recipient - Add smtp_server_recipient_is_replied().

This is a convenience wrapper around smtp_server_command_is_replied().

6 years agolib-smtp: smtp-server-recipient - Add smtp_server_recipient_reply().
Stephan Bosch [Thu, 14 Mar 2019 21:31:09 +0000 (22:31 +0100)] 
lib-smtp: smtp-server-recipient - Add smtp_server_recipient_reply().

This is a convenience wrapper around smtp_server_reply_index(). This implicitly
adds the <path> prefix to the reply (when it is not an RCPT success reply).

6 years agolib-smtp: smtp-server-cmd-rcpt - Add smtp_server_cmd_is_rcpt().
Stephan Bosch [Tue, 19 Mar 2019 11:37:53 +0000 (12:37 +0100)] 
lib-smtp: smtp-server-cmd-rcpt - Add smtp_server_cmd_is_rcpt().

6 years agolmtp: lmtp-proxy - Remove useless proxy->pending_data_cmd.
Stephan Bosch [Sat, 16 Mar 2019 01:05:06 +0000 (02:05 +0100)] 
lmtp: lmtp-proxy - Remove useless proxy->pending_data_cmd.

6 years agolmtp: lmtp-proxy - Replace cmd parameter with recipient for lmtp_proxy_handle_reply().
Stephan Bosch [Sat, 16 Mar 2019 00:49:17 +0000 (01:49 +0100)] 
lmtp: lmtp-proxy - Replace cmd parameter with recipient for lmtp_proxy_handle_reply().

6 years agolmtp: lmtp-local - Remove cmd parameter from lmtp_local_open_raw_mail().
Stephan Bosch [Sat, 16 Mar 2019 00:13:17 +0000 (01:13 +0100)] 
lmtp: lmtp-local - Remove cmd parameter from lmtp_local_open_raw_mail().