]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Timo Sirainen [Fri, 20 Mar 2020 14:36:17 +0000 (16:36 +0200)]
lib-index: Split off mail_cache_transaction_forget_flushed()
Timo Sirainen [Fri, 20 Mar 2020 14:42:45 +0000 (16:42 +0200)]
lib-index: mail_cache_header_add_field_locked() - Move unlocking to caller
Timo Sirainen [Fri, 20 Mar 2020 14:29:17 +0000 (16:29 +0200)]
lib-index: Split off mail_cache_header_add_field_locked()
Timo Sirainen [Fri, 20 Mar 2020 14:27:31 +0000 (16:27 +0200)]
lib-index: mail_cache_header_fields_write() - Take cache parameter instead
Timo Sirainen [Fri, 20 Mar 2020 14:23:27 +0000 (16:23 +0200)]
lib-index: Split off mail_cache_trans_get_file_field()
Timo Sirainen [Wed, 25 Mar 2020 15:45:56 +0000 (17:45 +0200)]
lib-index: mail_cache_lock() - Clarify why index->mapping might be TRUE here
Timo Sirainen [Mon, 30 Mar 2020 13:03:07 +0000 (16:03 +0300)]
lib-index: mail_transaction_log_sync_lock() - Fix function's comment
Timo Sirainen [Tue, 7 Apr 2020 10:24:10 +0000 (13:24 +0300)]
lib-auth: Rename auth_client_request_continue event to ...continued
Timo Sirainen [Tue, 7 Apr 2020 09:51:39 +0000 (12:51 +0300)]
auth: auth_request_finished event - Rename translated_username to translated_user
All the other fields are also "user", not "username".
Timo Sirainen [Tue, 7 Apr 2020 09:49:54 +0000 (12:49 +0300)]
auth: auth_request_finished event - Rename original_username to orig_user
This way it matches %{orig_user} variable.
Timo Sirainen [Tue, 7 Apr 2020 09:41:50 +0000 (12:41 +0300)]
auth: Remove unnecessary NULL checks for adding event fields
The NULL values are ignored internally. No need to complicate the code.
Timo Sirainen [Tue, 7 Apr 2020 09:39:56 +0000 (12:39 +0300)]
auth: Remove duplicate "mechanism" field in auth request events
The "mech" field already existed, and it matches %{mech} variable.
Timo Sirainen [Sat, 4 Apr 2020 22:16:08 +0000 (01:16 +0300)]
lib-master: Replace auth-master-client-login category with auth-client
This is just a reimplementation of lib-auth/auth-master code. This commit
also changes lib-master to require lib-auth to get to the category. This
dependency shouldn't really be a problem, since eventually this
master-login-auth code should be replaced by lib-auth anyway.
Timo Sirainen [Sat, 4 Apr 2020 22:13:39 +0000 (01:13 +0300)]
lib-oauth2: Unit tests don't need to link libmaster
Timo Sirainen [Sat, 4 Apr 2020 22:06:44 +0000 (01:06 +0300)]
lib-auth: Replace auth-master-client category with auth-client
The auth-client and auth-master connections are using mostly the same auth
API. Also the auth-master event names were already auth_client_*. So
there's not much point in having separate categories for them - it's just
confusing.
Timo Sirainen [Sat, 4 Apr 2020 22:03:21 +0000 (01:03 +0300)]
push-notification: Rename event category from push_notification to push-notification
All other categories are using "-" instead of "_".
Aki Tuomi [Tue, 14 Apr 2020 17:55:48 +0000 (20:55 +0300)]
lib-dcrypt: Avoid using BN_bn2binpad
It's not available in older versions.
Aki Tuomi [Tue, 14 Apr 2020 15:30:34 +0000 (18:30 +0300)]
lib-dcrypt: Add EC_GROUP_order_bits if missing
Not there in older OpenSSL
Timo Sirainen [Tue, 14 Apr 2020 11:24:43 +0000 (14:24 +0300)]
lib: ostream.h - Fix indent in enum ostream_create_file_flags
Aki Tuomi [Tue, 14 Apr 2020 12:23:20 +0000 (15:23 +0300)]
lib-dcrypt: Require ECDSA signature size is even
Valid ECDSA signature has two parts of equal sizes
Aki Tuomi [Tue, 14 Apr 2020 12:22:20 +0000 (15:22 +0300)]
lib-dcrypt: Pad signature parts to match ECDSA key size
This is required for ECDSA signatures.
Timo Sirainen [Tue, 7 Apr 2020 07:49:10 +0000 (10:49 +0300)]
lib-compression: Add unit tests for gz header handling bugs
Philippe Antoine [Tue, 31 Mar 2020 07:57:38 +0000 (09:57 +0200)]
lib-compression: Fix length checks for zlib header
Timo Sirainen [Tue, 7 Apr 2020 07:19:49 +0000 (10:19 +0300)]
lib-mail: test-message-address - Add unit test for the one byte overread
Note that this is visible only with valgrind.
Philippe Antoine [Thu, 2 Apr 2020 15:28:58 +0000 (17:28 +0200)]
lib-mail: message_address_parse_path() - Fix one byte overread
Timo Sirainen [Fri, 3 Apr 2020 12:32:35 +0000 (15:32 +0300)]
lib-master: If stats_writer_socket_path is empty, don't try to send stats
Timo Sirainen [Thu, 2 Apr 2020 14:45:46 +0000 (17:45 +0300)]
lib-test: test_exit() - Use regular exit() instead of _exit()
Otherwise code coverage output isn't written for the forked process.
Stephan Bosch [Fri, 29 Nov 2019 09:08:42 +0000 (10:08 +0100)]
submission: submission-backend-relay - Abort client command when server command is destroyed.
This fixes segmentation faults occurring when server commands are aborted
(connection is closed).
Stephan Bosch [Wed, 1 Apr 2020 23:49:25 +0000 (01:49 +0200)]
submission: submission-backend-relay - Clear client command in each client command callback.
Stephan Bosch [Wed, 1 Apr 2020 23:37:14 +0000 (01:37 +0200)]
submission: submission-backend-relay - Add assertions for command contexts in callbacks.
Stephan Bosch [Fri, 29 Nov 2019 09:14:50 +0000 (10:14 +0100)]
submission: submission-backend-relay - Rename "helo" parameter to "helo_cmd".
Makes it more consistent with implementation of other non-transaction commands.
Stephan Bosch [Fri, 29 Nov 2019 09:26:26 +0000 (10:26 +0100)]
submission: Reformat submission-backend-relay.c.
michael.slusarz [Wed, 8 Apr 2020 07:55:31 +0000 (07:55 +0000)]
lib: Remove deprecated str_append_n
This causes error when compiling within C++, so easiest to remove as it
is already not being used anywhere
Timo Sirainen [Tue, 11 Feb 2020 09:20:43 +0000 (11:20 +0200)]
lib: var_expand*() - Ignore modifiers for unknown variables
So for example %M{asdf} will return UNSUPPORTED_VARIABLE_asdf instead of MD5
hash of it, which might not be so obvious that it's not working correctly.
Timo Sirainen [Tue, 11 Feb 2020 09:18:53 +0000 (11:18 +0200)]
lib: var_expand*() - Return UNKNOWN_VARIABLE_x if %x is unknown
This was already done for %{long_keys}, just not for single letter keys.
Timo Sirainen [Mon, 6 Apr 2020 08:05:19 +0000 (11:05 +0300)]
dict: Remove "dict client: " log prefix
Almost all log messages from dict process would end up having this prefix.
Stephan Bosch [Thu, 19 Mar 2020 16:14:34 +0000 (17:14 +0100)]
lib-storage: index: imapc: Implement support for SAVEDATE attribute.
Stephan Bosch [Thu, 19 Mar 2020 15:16:03 +0000 (16:16 +0100)]
lib-imap-client: imapc-client - Recognize the new SAVEDATE capability.
Stephan Bosch [Thu, 19 Mar 2020 00:19:40 +0000 (01:19 +0100)]
imap: Implement the standard SAVEDATE capability.
Stephan Bosch [Thu, 19 Mar 2020 00:19:32 +0000 (01:19 +0100)]
lib-storage: mail-search - Add support for the SAVEDATESUPPORTED search item.
Stephan Bosch [Thu, 19 Mar 2020 00:04:53 +0000 (01:04 +0100)]
lib-storage: mail-storage - Change mail_get_save_date() to return 1 when result is reliable.
Aki Tuomi [Thu, 26 Mar 2020 11:14:05 +0000 (13:14 +0200)]
dict-sql: Pass dict event to lib-sql
Aki Tuomi [Tue, 10 Mar 2020 19:48:52 +0000 (21:48 +0200)]
dict: Add events
Aki Tuomi [Tue, 10 Mar 2020 08:31:19 +0000 (10:31 +0200)]
dict-client: Use event based logging
Aki Tuomi [Mon, 11 Jun 2018 13:35:25 +0000 (16:35 +0300)]
dict-redis: Use event based logging
Aki Tuomi [Mon, 11 Jun 2018 13:11:28 +0000 (16:11 +0300)]
dict-memcached: Use event based logging
Aki Tuomi [Mon, 11 Jun 2018 13:03:24 +0000 (16:03 +0300)]
dict-file: Use event based logging
Aki Tuomi [Mon, 11 Jun 2018 12:25:54 +0000 (15:25 +0300)]
lib-dict: Add named events
Aki Tuomi [Wed, 11 Mar 2020 12:59:05 +0000 (14:59 +0200)]
lib-dict: Add event support
Aki Tuomi [Mon, 11 Jun 2018 13:02:26 +0000 (16:02 +0300)]
dict-file: Move error logging higher up
Makes next commit easier.
Patrick Gansterer [Tue, 24 Mar 2020 19:34:17 +0000 (20:34 +0100)]
lib-oauth2: Fix possible timing attack in oauth2_validate_hmac()
Use mem_equals_timing_safe() instead of memcmp() to test the equality of the digest.
Aki Tuomi [Tue, 24 Mar 2020 09:49:07 +0000 (11:49 +0200)]
lib-dict: Add refcounting
This way we do not crash if lookup callback happens after caller
has already called dict_deinit. This is now done because
dict-sql does not support aborting SQL queries. This is hopefully
fixed in future.
Aki Tuomi [Mon, 2 Mar 2020 18:09:48 +0000 (20:09 +0200)]
lib-dict: Add async lookup/commit helpers
Simplifies following commits
Aki Tuomi [Tue, 10 Mar 2020 18:33:50 +0000 (20:33 +0200)]
lib-dict-backend: Use ioloop pointers in parent struct
Aki Tuomi [Tue, 10 Mar 2020 08:49:38 +0000 (10:49 +0200)]
lib-dict: Use ioloop pointers in parent struct
Juha-Petri Tyrkkö [Tue, 24 Mar 2020 11:19:21 +0000 (13:19 +0200)]
lib-dns: Remove superfluous client event and avoid duplicate client connection event unreferencing.
Stephan Bosch [Tue, 17 Mar 2020 08:41:10 +0000 (09:41 +0100)]
lib-smtp: smtp-server-command - Change log label for invalid/unknown command to "[unknown]".
Stephan Bosch [Mon, 16 Mar 2020 22:22:37 +0000 (23:22 +0100)]
lib-smtp: smtp-command-parser - Don't upper-case the parsed command name.
Stephan Bosch [Mon, 16 Mar 2020 21:01:14 +0000 (22:01 +0100)]
lib-smtp: smtp-server-command - Set cmd_name event field only for valid commands.
Set cmd_input_name for the user input.
Stephan Bosch [Tue, 17 Mar 2020 10:58:52 +0000 (11:58 +0100)]
lib-smtp: smtp-server-command - Assign cmd->reg immediately.
Timo Sirainen [Thu, 12 Mar 2020 10:58:11 +0000 (12:58 +0200)]
lib: ostream-file - Fix using sendfile() when input stream is ends unexpectedly early
Handle this the same as if writing was done without sendfile(), i.e. ignore
the problem and just return EOF in input stream early.
Timo Sirainen [Thu, 12 Mar 2020 10:57:41 +0000 (12:57 +0200)]
lib: safe_sendfile() - clarify return value 0 handling
Timo Sirainen [Tue, 24 Mar 2020 10:21:26 +0000 (12:21 +0200)]
global: Remove dead assignments
Found by latest clang scan-build.
Timo Sirainen [Tue, 24 Mar 2020 10:24:01 +0000 (12:24 +0200)]
stats, fts-solr: Tweak unit tests to make static analyzers happier
Timo Sirainen [Tue, 24 Mar 2020 15:51:57 +0000 (17:51 +0200)]
imap: SETMETADATA - Reorder if checks to remove unnecessary indenting
Nothing changes in the code logic.
Timo Sirainen [Tue, 24 Mar 2020 10:07:35 +0000 (12:07 +0200)]
imap: SETMETADATA - Cleanup istream return value checking
The old code seems to have worked correctly already, but now it's a bit
clearer how it was intended to work.
Timo Sirainen [Tue, 24 Mar 2020 09:59:23 +0000 (11:59 +0200)]
lib-oauth2: Add assert to make sure json_parse_next() doesn't think istream is nonblocking
Timo Sirainen [Tue, 24 Mar 2020 09:58:35 +0000 (11:58 +0200)]
imap: Add assert to make sure fd was successfully sent to imap-hibernate
Timo Sirainen [Tue, 1 Oct 2019 20:33:47 +0000 (23:33 +0300)]
lib-index: Don't rewrite dovecot.index if another process has already done it
This mainly happened when there were multiple sessions accessing the index
at the same time.
Timo Sirainen [Tue, 1 Oct 2019 16:12:10 +0000 (19:12 +0300)]
lib-index: Log a debug message with reason whenever recreating dovecot.index
Timo Sirainen [Tue, 1 Oct 2019 15:58:05 +0000 (18:58 +0300)]
lib-index: Change mail_index.need_recreate into a string
The string specifies the reason why the recreation is wanted.
Timo Sirainen [Tue, 1 Oct 2019 15:54:31 +0000 (18:54 +0300)]
lib-index: Change mail_transaction_log_file.need_rotate into a string
The string specifies the reason why the rotation is wanted.
Markus Valentin [Fri, 20 Mar 2020 14:57:12 +0000 (15:57 +0100)]
auth: Add session_id to default policy_request_attributes
Timo Sirainen [Mon, 16 Mar 2020 11:33:55 +0000 (13:33 +0200)]
imap: Fix SEARCH PARTIAL handling with other options
Especially SAVE and RELEVANCY should use only the partial results, not all
results.
Timo Sirainen [Mon, 16 Mar 2020 10:07:16 +0000 (12:07 +0200)]
imap: Fix SEARCH (MAX RELEVANCY) to return the relevancy
Timo Sirainen [Mon, 16 Mar 2020 09:50:38 +0000 (11:50 +0200)]
imap: Simplify SEARCH MIN and MAX result handling
Timo Sirainen [Fri, 13 Mar 2020 10:24:39 +0000 (12:24 +0200)]
imap: Fix using SEARCH RELEVANCY option with MIN/MAX
It should return only the one MIN/MAX mail's relevancy, not all of them.
Similarly the SEARCHRES $ should be updated only to the MIN/MAX mail, not
all mails.
Timo Sirainen [Fri, 13 Mar 2020 09:55:51 +0000 (11:55 +0200)]
imap: Fix using $ in a SEARCH that also uses SAVE, or fails with BAD
SEARCH RETURN (SAVE) $ cleared the $ instead of being a no-op.
Also using a SEARCH that returns BAD shouldn't have cleared $ (but NO
reply especially for BADCHARSET should clear it).
Timo Sirainen [Fri, 13 Mar 2020 09:38:57 +0000 (11:38 +0200)]
imap: Clear SEARCHRES $ after closing mailbox
$ shouldn't have been preserved after a mailbox was SELECTed.
Timo Sirainen [Fri, 13 Mar 2020 08:51:55 +0000 (10:51 +0200)]
lib-storage: mail_search_arg_init() - Remove support for changing uidset
This is done earlier now - there's no need to do it twice.
Timo Sirainen [Fri, 13 Mar 2020 08:50:18 +0000 (10:50 +0200)]
lib-storage: Fix using $ (IMAP SEARCHRES) in search seqset/uidset
Markus Valentin [Mon, 16 Mar 2020 18:56:42 +0000 (19:56 +0100)]
auth: userdb: Ensure changed username in auth worker gets updated in cache
If a username gets changed and auth cache is in use, auth-workers for
blocking userdb did not update the username in cache. This is now
fixed by setting user_changed_by_lookup in case the username changed.
Josef 'Jeff' Sipek [Tue, 17 Mar 2020 13:01:06 +0000 (09:01 -0400)]
configure.ac: Don't look for PRIuSIZE_T
We are using %zu instead.
Josef 'Jeff' Sipek [Tue, 17 Mar 2020 12:56:13 +0000 (08:56 -0400)]
global: use %zu directly instead of PRIuSIZE_T
Josef 'Jeff' Sipek [Wed, 11 Mar 2020 12:33:51 +0000 (14:33 +0200)]
lib-storage: Remove stub mail support
Nothing used them in the 3 years since they were introduced.
Timo Sirainen [Fri, 13 Mar 2020 09:30:01 +0000 (11:30 +0200)]
imap: Unknown SEARCH charset should return NO, not BAD
Josef 'Jeff' Sipek [Wed, 11 Mar 2020 11:29:33 +0000 (13:29 +0200)]
imap: Use "unknown" for cmd_name when the command name is not known
Josef 'Jeff' Sipek [Thu, 5 Mar 2020 13:22:53 +0000 (15:22 +0200)]
stats: Move group-by value and label getting code into helper functions
This avoids some excessive indentation.
Josef 'Jeff' Sipek [Thu, 5 Mar 2020 12:20:53 +0000 (07:20 -0500)]
stats: Add support for exponential stats group-by fxn
One can specify the quantization parameters in the config file as:
<field>:exponential:<min mag>:<max mag>:<base>
Currently, only base 2 and base 10 are supported.
For example:
group_by = bytes_out:exponential:1:4:10
Which will quantize the bytes_out values into the buckets: (-inf, 10],
(10,100], (100,1000], (1000, 10000], (10000, +inf).
Josef 'Jeff' Sipek [Wed, 19 Feb 2020 16:02:24 +0000 (11:02 -0500)]
stats: Add support for linear stats group-by fxn
One can specify the quantization parameters in the config file as:
<field>:linear:<min val>:<max val>:<step>
For example:
group_by = bytes_out:linear:0:1000:100
Which will quantize the bytes_out values into the buckets: (-inf, 0],
(0,100], (100,200], ... (900, 1000], (1000, +inf).
Josef 'Jeff' Sipek [Thu, 20 Feb 2020 19:19:29 +0000 (14:19 -0500)]
stats: Process 'duration' like any other metric value
This will allow the soon-to-be-added group-by quantization functions to work
on the duration value.
Josef 'Jeff' Sipek [Thu, 20 Feb 2020 19:18:32 +0000 (14:18 -0500)]
stats: Move event field stats distribution update into a helper function
Josef 'Jeff' Sipek [Tue, 18 Feb 2020 18:27:23 +0000 (13:27 -0500)]
stats: Use a switch instead of if/else-if
The compiler will then warn about unchecked enum values.
Josef 'Jeff' Sipek [Wed, 4 Mar 2020 11:34:06 +0000 (06:34 -0500)]
stats: Add support for explicit discrete group-by function
One can specify the function as:
<field>:discrete
This has the same exact behavior as the bare field name syntax before this
change.
For example, the following two lines have identical semantics:
group_by = cmd_name:discrete
group_by = cmd_name
Josef 'Jeff' Sipek [Wed, 4 Mar 2020 11:34:29 +0000 (06:34 -0500)]
stats: Rewrite group-by discrete test to be more thorough
This will also help with expanding the test in later commits.
Josef 'Jeff' Sipek [Fri, 28 Feb 2020 15:22:56 +0000 (10:22 -0500)]
stats: Move group by setting parsing earlier
Instead of doing the split and parsing in the metric code, we now do it in
the settings code. This makes the following commits much simpler.
Aki Tuomi [Thu, 12 Mar 2020 11:48:36 +0000 (13:48 +0200)]
lib-compression: test-compression - Fix test buffer size in partial write test
The buffer size does not match the amount of data filled.
Found by valgrind.
Aki Tuomi [Tue, 10 Mar 2020 19:16:46 +0000 (21:16 +0200)]
dict-ldap: Do not attempt to query if LDAP query building fails
Josef 'Jeff' Sipek [Tue, 10 Mar 2020 09:13:01 +0000 (05:13 -0400)]
plugins/fts: script parser - Properly determine the attachment extension
Josef 'Jeff' Sipek [Mon, 9 Mar 2020 13:52:37 +0000 (09:52 -0400)]
plugins/fts: Lower-case content types received from script parser
Later on during the execution, the script parser code does a strcmp() to
match the content type of the attachment with that returned by the script.
The content type from the mail is already lowercased.