]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Stephan Bosch [Sat, 29 Sep 2018 18:39:28 +0000 (20:39 +0200)]
lib-smtp: client: Add smtp_client_command_drop_callback().
Stephan Bosch [Sat, 29 Sep 2018 18:38:44 +0000 (20:38 +0200)]
lib-smtp: client: Fix memory issue caused when reconnecting.
Phil Carmody [Thu, 20 Sep 2018 19:33:23 +0000 (22:33 +0300)]
lib-fts: replace repeated explicit hex utf8 with cleaner macro in tokeniser test
utf8 is too line-noisy, this improves readability.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Wed, 16 May 2018 15:08:01 +0000 (18:08 +0300)]
lib-fts: tokenizer-generic - tr29 explicit-prefix parsing
Similar logic to before - any wordlike sequence that ends with a * is
considered a prefix search, and immediately begins a new token.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Sat, 28 Apr 2018 12:33:28 +0000 (15:33 +0300)]
lib-fts: test-fts-tokenizer - explicit-prefix tests
Note that the special handling of '*' only kicks in when in
"search" and "explicitprefix" mode (as passed in through the
settings), and currently, only for the simple mode, not tr29.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Wed, 16 May 2018 14:57:14 +0000 (17:57 +0300)]
lib-fts: tokenizer-generic - simple explicit prefix search logic
Logic is that words followed by a '*' create a prefix search token.
A new token is begun immediately after that. So "foo*bar" is 2 tokens
"foo*" and "bar", when in explicit prefix search tokenisation mode.
Only active in 'simple', not 'tr29'.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Wed, 16 May 2018 14:37:29 +0000 (17:37 +0300)]
lib-fts: tokenizer-generic - add more history to break detection
For example, going from non-word to non-word is a different type
of break (not really a break) from the transition from a word to
a non-word. Presently, that distinction isn't needed, but it will
be for explicit prefix searches.
Make the tok parameter const too, whilst there.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Wed, 16 May 2018 13:32:35 +0000 (16:32 +0300)]
lib-fts: tokenizer-generic - recognise request for explicit prefix searching
Just store a flag in the tokenizer when the setting is seen, nothing more.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Sat, 28 Apr 2018 09:30:49 +0000 (12:30 +0300)]
lib-fts/test-fts-tokenizer - have different possible test inputs
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Fri, 11 May 2018 10:34:40 +0000 (13:34 +0300)]
lib-fts: generic simple tokeniser - distinguish "letters" from non-"letters"
prev_type is only compared against SINGLE_QUOTE, so there will be no
behavioural differences. However, maintaining the state that we've just
seen something we are prepared to search for (very loosely, a "letter")
rather than something that we threw away (word breaks) will be important
when it comes to explicit prefix query parsing.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Wed, 16 May 2018 14:11:27 +0000 (17:11 +0300)]
lib-fts: tokenizer-generic - move related helpers together in file
They're logically related, and not specifically simple or tr29 related,
so keep them together, so either tokeniser can use them. Cosmetic only,
no functional changes.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Wed, 16 May 2018 14:04:35 +0000 (17:04 +0300)]
lib-fts: tokenizer-generic - move state history setting into helper
We can read the value directly, but for encapsulation it's best to do
the shifting of the token type history into a helper in a similar way
as how it is done for tr29 tokenising.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Sat, 28 Apr 2018 12:46:54 +0000 (15:46 +0300)]
lib-fts/fts-tokenizer-generic - rename more state variables - cosmetic
No need for a suffix now we've renamed the type variables.
Patch best viewed with: git show --color-words='[[:alnum:]_]+'
Unfortunately this is very churny, but there are no functional changes.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Sat, 28 Apr 2018 12:38:06 +0000 (15:38 +0300)]
lib-fts/fts-tokenizer-generic - rename state variables - cosmetic
These contain types, not letters, no functional changes.
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Phil Carmody [Thu, 26 Apr 2018 13:57:11 +0000 (16:57 +0300)]
lib-fts/fts-tokeniser-generic: move to container_of() for type-safety
Signed-off-by: Phil Carmody <phil@dovecot.fi>
Stephan Bosch [Sat, 15 Sep 2018 16:15:36 +0000 (18:15 +0200)]
submission: backends: Add trans_start() and trans_free() vfuncs.
These are called when the SMTP transaction is started and freed respectively.
Stephan Bosch [Sat, 15 Sep 2018 16:04:33 +0000 (18:04 +0200)]
submission: Record backend used for each recipient.
This is a preparation for plugins overriding the default backend for a recipient.
Stephan Bosch [Sat, 15 Sep 2018 15:33:03 +0000 (17:33 +0200)]
submission: Record main backend for the transaction.
This is a preparation for plugins overriding the default backend for a transaction.
Stephan Bosch [Thu, 4 Oct 2018 19:56:20 +0000 (21:56 +0200)]
submission: DATA command: Pass the total size of the data stream to the backend.
Stephan Bosch [Thu, 4 Oct 2018 19:01:44 +0000 (21:01 +0200)]
submission: DATA command: Obtain the size of the buffered data from the stream position rather than using i_stream_get_size().
Stephan Bosch [Sat, 15 Sep 2018 14:01:59 +0000 (16:01 +0200)]
submission: relay backend: Use backend-specific settings rather than the generic submission service settings.
This way, several relay backends can be operated together with different
settings.
Stephan Bosch [Sat, 15 Sep 2018 13:46:34 +0000 (15:46 +0200)]
submission: relay backend: Make struct submission_backend_relay private.
Stephan Bosch [Sat, 15 Sep 2018 13:29:40 +0000 (15:29 +0200)]
submission: relay backend: Turn client_proxy_create() into a proper backend constructor.
Stephan Bosch [Sat, 15 Sep 2018 13:13:32 +0000 (15:13 +0200)]
submission: relay backend: Turn client_get_max_mail_size() into a relay backend vfunc.
Stephan Bosch [Sat, 15 Sep 2018 12:44:41 +0000 (14:44 +0200)]
submission: relay backend: Turn client_proxy_input_pre/post() into relay backend vfuncs.
Stephan Bosch [Sat, 15 Sep 2018 12:35:10 +0000 (14:35 +0200)]
submission: relay backend: Turn client_proxy_start() into a relay backend vfunc.
Stephan Bosch [Sat, 15 Sep 2018 12:25:38 +0000 (14:25 +0200)]
submission: relay backend: Turn client_proxy_destroy() into a relay backend vfunc.
Stephan Bosch [Sat, 15 Sep 2018 11:53:07 +0000 (13:53 +0200)]
submission: relay backend: Turn SMTP command functions into relay backend vfuncs.
Stephan Bosch [Sat, 15 Sep 2018 12:08:57 +0000 (14:08 +0200)]
submission: client: Create default backend in a separate function.
Stephan Bosch [Sat, 15 Sep 2018 11:02:50 +0000 (13:02 +0200)]
submission: Define generic backend API.
Stephan Bosch [Wed, 3 Oct 2018 23:37:24 +0000 (01:37 +0200)]
submission: Add submission_backend_capabilities setting.
This can be used to specify which capabilities the (relay) backend supports,
avoiding the need to query the backend explicitly before the EHLO reply is sent
to the client.
Stephan Bosch [Thu, 4 Oct 2018 19:39:58 +0000 (21:39 +0200)]
submission: commands: Expect connection setup errors from relaying commands.
Subsequent changes remove the guarantee that the connection is setup successfuly
(to gain EHLO capabilities) before commands are submitted. This means that the
callbacks from commands can thereafter return connection setup errors as well.
Stephan Bosch [Wed, 26 Sep 2018 19:44:35 +0000 (21:44 +0200)]
lib-smtp: client: Use the new smtp_capability_find_by_name() function.
Stephan Bosch [Wed, 26 Sep 2018 19:36:01 +0000 (21:36 +0200)]
lib-smtp: client: Document the forced_capabilities setting.
Stephan Bosch [Wed, 26 Sep 2018 19:32:45 +0000 (21:32 +0200)]
lib-smtp: Add utility function for finding capabilities by name.
Stephan Bosch [Sat, 15 Sep 2018 13:02:20 +0000 (15:02 +0200)]
submission: client: Simplifly calculation of max mail size.
Stephan Bosch [Sat, 15 Sep 2018 11:17:11 +0000 (13:17 +0200)]
submission: Record accepted recipients in the client object.
Allows associating context with recipients in future changes.
Stephan Bosch [Sun, 15 Jul 2018 20:37:13 +0000 (22:37 +0200)]
submission: Reformat submission-backend-relay.c.
Stephan Bosch [Sun, 15 Jul 2018 19:42:17 +0000 (21:42 +0200)]
submission: relay backend: Change almost all occurrences of 'proxy' to 'relay'.
This makes the naming consistent with the name of the backend. Only the lib-smtp
proxy_data is not renamed.
Stephan Bosch [Sun, 15 Jul 2018 19:27:48 +0000 (21:27 +0200)]
submission: relay backend: Rename client_command_handle_proxy_reply() to backend_relay_handle_relay_reply().
Also make it accept the backend rather than the client struct.
Stephan Bosch [Sun, 15 Jul 2018 18:56:47 +0000 (20:56 +0200)]
submission: relay backend: Rename *_proxy_cb() to *_callback().
Stephan Bosch [Sun, 15 Jul 2018 19:10:39 +0000 (21:10 +0200)]
submission: relay backend: Add 'relay_' prefix to command functions and structs.
Stephan Bosch [Sun, 15 Jul 2018 18:35:45 +0000 (20:35 +0200)]
submission: relay backend: Use pointer to backend rather than client in command contexts.
Stephan Bosch [Sun, 15 Jul 2018 18:49:05 +0000 (20:49 +0200)]
submission: Move relay-related client fields to separate backend struct.
Stephan Bosch [Sun, 2 Sep 2018 15:10:19 +0000 (17:10 +0200)]
submission: Move client_proxy_get_max_mail_size() to submission-backend-relay.c.
Stephan Bosch [Sun, 2 Sep 2018 14:05:28 +0000 (16:05 +0200)]
submission: Move client_proxy_input_pre/post() to submission-backend-relay.c.
Stephan Bosch [Sun, 2 Sep 2018 13:29:24 +0000 (15:29 +0200)]
submission: Move client_proxy_destroy() to submission-backend-relay.c.
Stephan Bosch [Sun, 15 Jul 2018 20:02:37 +0000 (22:02 +0200)]
submission: Move client_proxy_create() to submission-backend-relay.c.
Stephan Bosch [Sat, 1 Sep 2018 14:40:10 +0000 (16:40 +0200)]
submission: Move client_proxy_start() to submission-backend-relay.c.
Stephan Bosch [Sun, 2 Sep 2018 15:04:14 +0000 (17:04 +0200)]
submission: Split off obtaining the relay connection capabilities into a separate function.
Stephan Bosch [Sun, 2 Sep 2018 13:44:33 +0000 (15:44 +0200)]
submission: Split off corking and uncorking the relay connection in a separate function.
Stephan Bosch [Sun, 2 Sep 2018 13:10:08 +0000 (15:10 +0200)]
submission: Split off closing the relay connection in a separate function.
Stephan Bosch [Sat, 1 Sep 2018 13:51:01 +0000 (15:51 +0200)]
submission: Split off starting the relay connection in a separate function.
Stephan Bosch [Sun, 15 Jul 2018 17:54:06 +0000 (19:54 +0200)]
submission: Remove client_proxy_is_disconnected().
It is not used anywhere.
Stephan Bosch [Sun, 15 Jul 2018 17:52:41 +0000 (19:52 +0200)]
submission: Remove client_proxy_is_ready().
It is not used anywhere.
Stephan Bosch [Wed, 29 Aug 2018 22:26:03 +0000 (00:26 +0200)]
submission: Move relay part of QUIT command to submission-backend-relay.c.
Stephan Bosch [Wed, 29 Aug 2018 22:21:59 +0000 (00:21 +0200)]
submission: Move generic part of QUIT command to submission-commands.c.
Stephan Bosch [Sun, 15 Jul 2018 17:06:34 +0000 (19:06 +0200)]
submission: Move relay part of NOOP command to submission-backend-relay.c.
Stephan Bosch [Wed, 29 Aug 2018 21:51:09 +0000 (23:51 +0200)]
submission: Move generic part of NOOP command to submission-commands.c.
Stephan Bosch [Sun, 9 Sep 2018 23:07:58 +0000 (01:07 +0200)]
submission: Move relay part of VRFY command to submission-backend-relay.c.
Stephan Bosch [Wed, 29 Aug 2018 21:37:25 +0000 (23:37 +0200)]
submission: Move generic part of VRFY command to submission-commands.c.
Stephan Bosch [Sun, 15 Jul 2018 17:38:11 +0000 (19:38 +0200)]
submission: Move BURL command implementation to submission-commands.c.
Stephan Bosch [Sun, 15 Jul 2018 17:03:09 +0000 (19:03 +0200)]
submission: Move relay part of DATA command to submission-backend-relay.c.
Stephan Bosch [Wed, 29 Aug 2018 22:59:50 +0000 (00:59 +0200)]
submission: Move generic part of DATA command to submission-commands.c.
Stephan Bosch [Sun, 15 Jul 2018 17:00:11 +0000 (19:00 +0200)]
submission: Move relay part of RSET command to submission-backend-relay.c.
Stephan Bosch [Wed, 29 Aug 2018 21:33:11 +0000 (23:33 +0200)]
submission: Move generic part of RSET command to submission-commands.c.
Stephan Bosch [Wed, 29 Aug 2018 20:45:00 +0000 (22:45 +0200)]
submission: Move relay part of RCPT command to submission-backend-relay.c.
Stephan Bosch [Wed, 29 Aug 2018 21:30:31 +0000 (23:30 +0200)]
submission: Move generic part of RCPT command to submission-commands.c.
Stephan Bosch [Sun, 15 Jul 2018 16:57:26 +0000 (18:57 +0200)]
submission: Move relay part of MAIL command to submission-backend-relay.c.
Stephan Bosch [Wed, 29 Aug 2018 21:25:32 +0000 (23:25 +0200)]
submission: Move generic part of MAIL command to submission-commands.c.
Stephan Bosch [Sun, 15 Jul 2018 16:54:00 +0000 (18:54 +0200)]
submission: Move relay part of HELO/EHLO command to submission-backend-relay.c.
Stephan Bosch [Sat, 1 Sep 2018 11:34:53 +0000 (13:34 +0200)]
submission: Move generic part of HELO/EHLO command to submission-commands.c.
Stephan Bosch [Wed, 29 Aug 2018 22:18:40 +0000 (00:18 +0200)]
submission: Split the QUIT command into a generic part and a part related to relaying to an MTA.
Stephan Bosch [Wed, 29 Aug 2018 21:43:43 +0000 (23:43 +0200)]
submission: Split the NOOP command into a generic part and a part related to relaying to an MTA.
Stephan Bosch [Wed, 29 Aug 2018 20:37:27 +0000 (22:37 +0200)]
submission: Split the VRFY command into a generic part and a part related to relaying to an MTA.
Stephan Bosch [Mon, 27 Aug 2018 23:58:58 +0000 (01:58 +0200)]
submission: Split the DATA command into a generic part and a part related to relaying to an MTA.
Stephan Bosch [Wed, 29 Aug 2018 20:30:51 +0000 (22:30 +0200)]
submission: Split the RSET command into a generic part and a part related to relaying to an MTA.
Stephan Bosch [Wed, 29 Aug 2018 20:27:12 +0000 (22:27 +0200)]
submission: Split the RCPT command into a generic part and a part related to relaying to an MTA.
Stephan Bosch [Wed, 29 Aug 2018 20:25:18 +0000 (22:25 +0200)]
submission: Split the MAIL command into a generic part and a part related to relaying to an MTA.
Stephan Bosch [Sat, 1 Sep 2018 11:30:34 +0000 (13:30 +0200)]
submission: Split the EHLO command into a generic part and a part related to relaying to an MTA.
Stephan Bosch [Mon, 27 Aug 2018 18:15:40 +0000 (20:15 +0200)]
submission: Move submission_helo_reply_submit() from cmd-helo.c to submission-commands.c.
Stephan Bosch [Mon, 27 Aug 2018 17:46:21 +0000 (19:46 +0200)]
submission: Make HELO/EHLO reply submission a separate public function.
Stephan Bosch [Sun, 15 Jul 2018 17:10:36 +0000 (19:10 +0200)]
submission: Move client_command_handle_proxy_reply() to submission-backend-relay.c.
Stephan Bosch [Sat, 15 Sep 2018 16:33:30 +0000 (18:33 +0200)]
submission: client: Remove spurious forward declaration of "struct client_command_context".
Stephan Bosch [Sat, 15 Sep 2018 19:06:07 +0000 (21:06 +0200)]
lib-smtp: client: Add forward declaration for struct smtp_client_settings in smtp-client-connection.h.
Stephan Bosch [Wed, 12 Sep 2018 19:21:09 +0000 (21:21 +0200)]
lib-smtp: server: Drop pending commands and transaction at disconnect rather than destroy.
This makes sure the conn_trans_free() connection callback is called before
th conn_disconnect() callback. This makes more sense than the other way around,
which instead would be a likely cause for mishaps causing segfaults and the
like.
Stephan Bosch [Sun, 2 Sep 2018 21:26:21 +0000 (23:26 +0200)]
lib-smtp: server: Add callback for transaction start.
Timo Sirainen [Fri, 14 Sep 2018 10:19:16 +0000 (13:19 +0300)]
dict-client: Avoid excessive CPU usage while waiting commands to finish
client_dict_add_timeout() adds the timeout thinking that the dict no longer
has any work to do, so it can be freed soon. However, if other work is
added before that, the timeout just keeps getting called over and over
again. This is especially bad with the default idle timeout of 0.
Aki Tuomi [Wed, 3 Oct 2018 09:00:55 +0000 (12:00 +0300)]
push-notification: Resolve confusion about msg->seq
It's not the same seq what the mail has, but a sequence that
is used to find out UID for saved mails. So rename it to
save_idx and treat it accordingly. Note that save_idx is 0
based, and mail sequence is 1 based.
Aki Tuomi [Fri, 28 Sep 2018 10:30:51 +0000 (13:30 +0300)]
push-notification-driver-lua: Include date from MessageAppend
Aki Tuomi [Fri, 28 Sep 2018 10:30:01 +0000 (13:30 +0300)]
push-notification-event-messageappend: Include date information parsed from headers
Consistency with MessageNew
Aki Tuomi [Fri, 28 Sep 2018 10:01:58 +0000 (13:01 +0300)]
push-notification: Make sure txn messages are unique
save_count is not reliable as it's not incremented for events like
flag changes.
Aki Tuomi [Thu, 27 Sep 2018 06:54:10 +0000 (09:54 +0300)]
push-notification-driver-lua: Always use DLUA_LOG_LABEL
Aki Tuomi [Thu, 27 Sep 2018 06:52:59 +0000 (09:52 +0300)]
push-notification-driver-lua: Properly register all events
Aki Tuomi [Tue, 25 Sep 2018 12:49:21 +0000 (15:49 +0300)]
mail-lua: Fix gc code to push key first then value
Otherwise it uses nil as key, which makes no sense and leads to eventual crash.
Aki Tuomi [Tue, 25 Sep 2018 11:09:55 +0000 (14:09 +0300)]
push-notification-driver-lua: tx begin pushed mail user not username
Aki Tuomi [Tue, 25 Sep 2018 11:09:28 +0000 (14:09 +0300)]
push-notification-driver-lua: Do not push user again
User is already pushed in tx begin, and can be stored there into the context.
Aki Tuomi [Tue, 25 Sep 2018 11:08:59 +0000 (14:08 +0300)]
push-notification-driver-lua: Move event push earlier
Simplifies code
Aki Tuomi [Tue, 25 Sep 2018 09:24:02 +0000 (12:24 +0300)]
mail-lua: Add deinit_pre function
Aki Tuomi [Mon, 24 Sep 2018 12:29:12 +0000 (15:29 +0300)]
push-notification-driver-lua: Reference mail user only if initialization is successful
Will cause assert-crash otherwise if initialization fails