]>
git.ipfire.org Git - thirdparty/dovecot/core.git/log
Aki Tuomi [Tue, 23 Feb 2016 12:14:16 +0000 (14:14 +0200)]
doveadm-log: Use doveadm_print() for output
Aki Tuomi [Tue, 23 Feb 2016 12:13:37 +0000 (14:13 +0200)]
doveadm-print: Add "formatted" print formatter
This allows using the header names as %{variables} in the format string.
Timo Sirainen [Wed, 24 Feb 2016 17:13:28 +0000 (19:13 +0200)]
*-login: Call client.auth_result() also when proxying
Stephan Bosch [Thu, 25 Feb 2016 22:15:45 +0000 (00:15 +0200)]
lib-http: client: Decreased request/connect timeout for test-http-client to 10s.
Stephan Bosch [Thu, 25 Feb 2016 22:15:17 +0000 (00:15 +0200)]
lib-http: client: Gave request, connect and dns timeouts defaults that make more sense.
Stephan Bosch [Thu, 25 Feb 2016 21:46:11 +0000 (22:46 +0100)]
lib-http: client: Fixed crash happening when connection hits an error while handling a new request.
At this point the connection dies within the peer request handler loop.
Before, the dying connection could free the peer when it ended up being
obsolete. But because it was still in the loop, a segfault occurred as the
loop continued. Fixed by deferring the the deallocation of the peer from
the connection_lost() function to the request handler loop itself if it is
active.
Timo Sirainen [Wed, 24 Feb 2016 23:18:06 +0000 (01:18 +0200)]
stats: Minor code cleaup - remove unnecessary includes and fix copyright year
Timo Sirainen [Wed, 24 Feb 2016 14:39:59 +0000 (16:39 +0200)]
lib: Added unit test to iostream-temp.
Timo Sirainen [Wed, 24 Feb 2016 14:39:25 +0000 (16:39 +0200)]
lib: iostream-temp makes the internal fd visible now to o_stream_get_fd()
Mainly for the following unit test.
Timo Sirainen [Wed, 24 Feb 2016 13:00:31 +0000 (15:00 +0200)]
lib-storage: Verify settings only after applying settings from userdb
This is especially important to verify() functions that parse the settings
and store data permanently based on them, e.g. pop3_delete_flag or
imap_client_workarounds, which effectively couldn't be overwritten by userdb.
Timo Sirainen [Tue, 23 Feb 2016 21:41:28 +0000 (23:41 +0200)]
lib: Added iostream_temp_create_sized() to specify the max in-memory size
Timo Sirainen [Tue, 23 Feb 2016 16:41:35 +0000 (18:41 +0200)]
login-proxy: Use io_add_istream() for adding client_input io.
This is required for non-fd istreams to work, e.g. ssl-iostream.
Timo Sirainen [Mon, 22 Feb 2016 23:48:47 +0000 (01:48 +0200)]
lib-http: Fix to earlier http_client_connection_unref() change 1dead6
Patch by Stephan Bosch
Timo Sirainen [Mon, 22 Feb 2016 20:23:08 +0000 (22:23 +0200)]
doveadm: Code cleanup - remove duplicate code
Timo Sirainen [Mon, 22 Feb 2016 20:10:42 +0000 (22:10 +0200)]
doveadm: Fixed usage printing for ver2 commands
Timo Sirainen [Mon, 22 Feb 2016 20:02:03 +0000 (22:02 +0200)]
doveadm: Define DOVEADM_CMD_MAIL_USAGE_PREFIX, which v2 commands use as their usage prefix.
This allows implementing the next changeset without kludging.
Aki Tuomi [Mon, 22 Feb 2016 19:44:40 +0000 (21:44 +0200)]
doveadm: Added doveadm_cmd_get_ver2() helper
Aki Tuomi [Mon, 22 Feb 2016 12:18:04 +0000 (14:18 +0200)]
doveadm-index: Use ver2 structures
Aki Tuomi [Mon, 22 Feb 2016 11:30:12 +0000 (13:30 +0200)]
doveadm-cmd: Add command flags
Timo Sirainen [Mon, 22 Feb 2016 19:39:06 +0000 (21:39 +0200)]
doveadm: Free istream parameters everywhere
Based on patch by Aki Tuomi
Aki Tuomi [Mon, 22 Feb 2016 12:03:41 +0000 (14:03 +0200)]
quota: Use doveadm ver2 structures
Timo Sirainen [Mon, 22 Feb 2016 19:28:24 +0000 (21:28 +0200)]
doveadm: Minor code cleanup - rename doveadm_cmd_find*() to doveadm_cmd_find_with_args*()
Timo Sirainen [Mon, 22 Feb 2016 19:24:06 +0000 (21:24 +0200)]
doveadm: Code cleanup - remove unnecessary NULL sets and checks
Timo Sirainen [Mon, 22 Feb 2016 19:17:26 +0000 (21:17 +0200)]
lib-http: Always set *_obj=NULL first in deinit functions (mainly for consistency)
This doesn't usually matter, but in case deinit calls some callback they may
be trying to access the partially destroyed object.
Timo Sirainen [Mon, 22 Feb 2016 19:15:37 +0000 (21:15 +0200)]
lib-http: http_server_connection_unref() now always sets *conn=NULL
This makes its behavior consistent with other APIs in Dovecot.
Timo Sirainen [Mon, 22 Feb 2016 19:00:41 +0000 (21:00 +0200)]
lib-http: Clarify http_server_response_*_payload() API and minor change to it
Similar to the change in
c3a4c93 . Nothing used this API yet.
Timo Sirainen [Mon, 22 Feb 2016 18:58:03 +0000 (20:58 +0200)]
lib-http: http_server_request_unref() now always sets *req=NULL
This makes its behavior consistent with other APIs in Dovecot.
Timo Sirainen [Mon, 22 Feb 2016 18:47:37 +0000 (20:47 +0200)]
lib-http: Clarify http_client_request_*_payload() API and minor change to it
The earlier behavior was pretty confusing, and potentially could have caused
double-freeing memory in some situations. Now it's clear that req is set to NULL
always when the request is finished, regardless of whether it has any references left.
Changed http_client_request_finish_payload() to return 0 on success instead of 1.
This could have been left alone, but it's unlikely that there is any code outside
Dovecot core that calls it and this way is cleaner.
Timo Sirainen [Mon, 22 Feb 2016 18:34:46 +0000 (20:34 +0200)]
lib-http: http_client_request_unref() now always sets *req=NULL
This makes its behavior consistent with other APIs in Dovecot.
Also http_client_request_finish() no longer sets req=NULL, because all of
its callers already keep a reference. Instead added an assert to make sure
the reference is there.
Timo Sirainen [Mon, 22 Feb 2016 18:14:57 +0000 (20:14 +0200)]
lib-http: http_client_connection_unref() now always sets *conn=NULL
This makes its behavior consistent with other APIs in Dovecot.
Aki Tuomi [Mon, 22 Feb 2016 18:03:44 +0000 (20:03 +0200)]
doveadm-http: Close client input correctly
Timo Sirainen [Mon, 22 Feb 2016 18:00:13 +0000 (20:00 +0200)]
doveadm-http: Return HTTP failure on unexpected JSON input
Timo Sirainen [Mon, 22 Feb 2016 17:56:35 +0000 (19:56 +0200)]
doveadm-http: Handle invalid input better for arrays.
Timo Sirainen [Sat, 20 Feb 2016 21:16:52 +0000 (23:16 +0200)]
doveadm-http: Handle istreams correctly
Based on patch by Aki Tuomi
Aki Tuomi [Wed, 17 Feb 2016 08:24:24 +0000 (10:24 +0200)]
doveadm-save: Use ver2 command structure
Timo Sirainen [Mon, 22 Feb 2016 16:55:03 +0000 (18:55 +0200)]
doveadm: Added support for "file" parameters
Timo Sirainen [Mon, 22 Feb 2016 16:46:29 +0000 (18:46 +0200)]
doveadm: Fixed memory leak at deinit
Timo Sirainen [Mon, 22 Feb 2016 16:42:42 +0000 (18:42 +0200)]
doveadm: Fixed double-free when using -F parameter
Timo Sirainen [Mon, 22 Feb 2016 16:42:10 +0000 (18:42 +0200)]
doveadm: Fixed memory leaks when ver2 command parsing fails with invalid parameter.
Aki Tuomi [Mon, 22 Feb 2016 11:59:14 +0000 (13:59 +0200)]
doveadm-mail: Fixed common parameters to use correct names as in DOVEADM_CMD_MAIL_COMMON
Aki Tuomi [Wed, 17 Feb 2016 07:19:01 +0000 (09:19 +0200)]
doveadm-fetch: Use ver2 structures
Aki Tuomi [Mon, 22 Feb 2016 16:20:59 +0000 (18:20 +0200)]
doveadm: Add kludge to support field array to fieldstr conversion
Aki Tuomi [Mon, 15 Feb 2016 13:14:25 +0000 (15:14 +0200)]
doveadm-stats: Use ver2 structures
Timo Sirainen [Mon, 22 Feb 2016 14:12:16 +0000 (16:12 +0200)]
lib-index: If mail_transaction_log_lock_head() locking took long, include reason string in warning
Timo Sirainen [Mon, 22 Feb 2016 09:47:16 +0000 (11:47 +0200)]
mdbox: Use mail_index_sync_set_reason() to give better reason messages for lock wait warnings.
Timo Sirainen [Mon, 22 Feb 2016 09:46:13 +0000 (11:46 +0200)]
lib-index: Added mail_index_sync_set_reason() to improve lock wait log warnings
Timo Sirainen [Mon, 22 Feb 2016 09:15:52 +0000 (11:15 +0200)]
lib-index: Small improvements to logging the reason for long transaction log lock waits
Timo Sirainen [Mon, 22 Feb 2016 08:25:56 +0000 (10:25 +0200)]
dovecot.service: Fixed PIDFile path - removed extra /dovecot/ directory from the middle.
Timo Sirainen [Sun, 21 Feb 2016 17:01:31 +0000 (19:01 +0200)]
lib: mempool-alloconly unit test improvement: verify that data stack isn't used by p_malloc()
Timo Sirainen [Sun, 21 Feb 2016 16:58:50 +0000 (18:58 +0200)]
lib: Minor code cleanup to mempool-alloconly unit test - use test_begin/assert/end()
Aki Tuomi [Sun, 21 Feb 2016 16:38:24 +0000 (18:38 +0200)]
doveadm-http: Correctly initialize parameters
Aki Tuomi [Sun, 21 Feb 2016 16:37:24 +0000 (18:37 +0200)]
doveadm: Fixed using array type parameters.
Aki Tuomi [Sun, 21 Feb 2016 16:36:19 +0000 (18:36 +0200)]
doveadm: Fixed assert-crash when command with CMD_PARAM_FLAG_DO_NOT_EXPOSE was used.
Aki Tuomi [Sun, 21 Feb 2016 16:35:03 +0000 (18:35 +0200)]
doveadm: Fixed support for --long-option arguments
Timo Sirainen [Sun, 21 Feb 2016 16:32:50 +0000 (18:32 +0200)]
lib: Added [pt]_array_const_string_join()
Based on patch by Aki Tuomi
Timo Sirainen [Sun, 21 Feb 2016 16:32:03 +0000 (18:32 +0200)]
lib: Move code from t_strarray_join() into a more generic p_strarray_join_n()
Timo Sirainen [Sun, 21 Feb 2016 16:31:12 +0000 (18:31 +0200)]
lib: Added unit test for t_strarray_join()
Timo Sirainen [Sun, 21 Feb 2016 15:44:38 +0000 (17:44 +0200)]
quots-fs: Fixed compiling with HP/UX and Solaris
Timo Sirainen [Sun, 21 Feb 2016 15:44:07 +0000 (17:44 +0200)]
doveadm: Compiler warning fix.
Timo Sirainen [Sun, 21 Feb 2016 01:40:48 +0000 (03:40 +0200)]
lib-index: mail_index_sync_next() didn't always return expunges sorted
Maildir and mbox formats were using index_sync_changes_read(), which assumed that
they were sorted. So some of the intended expunges weren't actually always being
done. This mainly affected when expunges were being done simultaneously by multiple
processes or by pipelined commands. For example:
printf "a select inbox\nb uid move 2 Trash\nc uid move 1 Trash\nd logout\n" | ./imap
manuel [Tue, 16 Feb 2016 17:05:59 +0000 (18:05 +0100)]
imap-hibernate: send connect/disconnect events to anvil
make doveadm who + mail_max_userip_connections work with
hibernated connections.
Timo Sirainen [Sat, 20 Feb 2016 21:32:59 +0000 (23:32 +0200)]
lib: json_parse_next_stream() wrongly returned -1 even when a stream was returned.
Stephan Bosch [Sat, 20 Feb 2016 17:47:58 +0000 (19:47 +0200)]
uri-util: Fixed assertion failure for invalid character in path segment.
Stephan Bosch [Sat, 20 Feb 2016 17:35:12 +0000 (19:35 +0200)]
lib-http: server: Implicitly free a request response structure when a new (failure) response is started.
Timo Sirainen [Sat, 20 Feb 2016 11:40:18 +0000 (13:40 +0200)]
doveadm: Fix for previous attempt to make static analyzer happier.
Timo Sirainen [Fri, 19 Feb 2016 18:20:43 +0000 (20:20 +0200)]
doveadm: Make static analyzer happier - cptr can't be NULL here.
Timo Sirainen [Fri, 19 Feb 2016 14:36:00 +0000 (16:36 +0200)]
doveadm: Use char type for short options instead of a string.
The ":" = "has parameters" can be determined from the type.
Also removed "?" checks since it wasn't actually used.
Timo Sirainen [Fri, 19 Feb 2016 14:34:53 +0000 (16:34 +0200)]
doveadm: Remove CMD_PARAM_NONE type, since it already defaulted to same as CMD_PARAM_BOOL
Timo Sirainen [Fri, 19 Feb 2016 17:11:53 +0000 (19:11 +0200)]
lib-index: Fixed mail_index_lookup_ext_full()'s map_r with transaction-view.
Timo Sirainen [Fri, 19 Feb 2016 17:08:43 +0000 (19:08 +0200)]
lib-index: Code cleanup - moved code to tview_lookup_ext_update()
No functional changes.
Timo Sirainen [Fri, 19 Feb 2016 14:13:51 +0000 (16:13 +0200)]
Makefile: Added missing client-connection-private.h
Timo Sirainen [Fri, 19 Feb 2016 14:11:58 +0000 (16:11 +0200)]
dovecot.service: Fixed PIDFile path
Timo Sirainen [Fri, 19 Feb 2016 14:03:30 +0000 (16:03 +0200)]
doveadm: Use correct uoff_t type for printf
Timo Sirainen [Fri, 19 Feb 2016 13:39:35 +0000 (15:39 +0200)]
dovecot.service: Disabled ProtectSystem=full for now
It's not supported by RHEL7's systemd.
Aki Tuomi [Fri, 19 Feb 2016 13:03:51 +0000 (15:03 +0200)]
doveadm: Use ver2 structures for all "doveadm mailbox *" commands.
Aki Tuomi [Fri, 19 Feb 2016 13:02:56 +0000 (15:02 +0200)]
doveadm: Use ver2 structures for stop & reload.
Aki Tuomi [Fri, 19 Feb 2016 12:58:41 +0000 (14:58 +0200)]
doveadm: Implement HTTP server API, slightly based on JMAP API
Timo Sirainen [Fri, 19 Feb 2016 12:40:59 +0000 (14:40 +0200)]
doveadm: Code cleanup - moved code to client_connection_init()
No functional changes.
Aki Tuomi [Mon, 15 Feb 2016 12:02:19 +0000 (14:02 +0200)]
doveadm: Add infrastructure for doveadm_cmd_ver2
Version 2 commands have named parameters, which also have types. This is
especially useful for reading input from HTTP/JSON API. This also simplifies
the parameter parsing for command line input.
For v2.3 the plan is to replace all the old doveadm_cmds with this new
version and get rid of the _ver2 suffixes. But for now we'll have two
versions of commands.
For backwards compatibility with old commands we have also implemented
wrappers so that v2 structs can be defined and there's a function to convert
the named parameters to old v1 style args[] string, so the old command
handlers can still be run. This will also be removed in v2.3.
This change also adds requirement for getopt_long(). It's already available
in all the Linuxes and BSDs, so this shouldn't be too big of a requirement.
Other systems can install it from an external library.
Aki Tuomi [Thu, 18 Feb 2016 13:49:03 +0000 (15:49 +0200)]
doveadm: Add unit tests for i_strccdascmp
Aki Tuomi [Thu, 18 Feb 2016 13:48:21 +0000 (15:48 +0200)]
doveadm: Add i_strccdascmp()
This comparator considers camel case==camel-case==camelCase. This
is to help with HTTP API to make it more flexible.
Timo Sirainen [Fri, 19 Feb 2016 12:08:40 +0000 (14:08 +0200)]
doveadm: If user lookup fails, log an error but don't kill the process.
Timo Sirainen [Fri, 19 Feb 2016 12:05:13 +0000 (14:05 +0200)]
doveadm: Code cleanup - Removed passing through unnecessary argv parameter
Aki Tuomi [Thu, 18 Feb 2016 07:27:10 +0000 (09:27 +0200)]
doveadm: Code cleanup - move code to doveadm_mail_cmd_exec()
No functional changes.
Aki Tuomi [Mon, 15 Feb 2016 11:55:41 +0000 (13:55 +0200)]
lib-http: Add accessors for some response details
Aki Tuomi [Thu, 18 Feb 2016 17:27:13 +0000 (19:27 +0200)]
dovecot: improve systemd support
Timo Sirainen [Tue, 16 Feb 2016 16:34:19 +0000 (18:34 +0200)]
fts: When searching data headers, don't expand search keys to all languages.
For example "SEARCH HEADER Message-Id foo@example.com" works better the
less expansion there is for "foo@example.com".
Timo Sirainen [Tue, 16 Feb 2016 16:33:46 +0000 (18:33 +0200)]
fts: Code cleanup - moved fts_header_has_language() to a global function
Timo Sirainen [Tue, 16 Feb 2016 15:50:53 +0000 (17:50 +0200)]
lib-storage: Avoid duplicate work when a search query has multiple header/body keys.
Timo Sirainen [Tue, 16 Feb 2016 15:48:53 +0000 (17:48 +0200)]
lib-mail: Added message_search_more_get_decoded()
Timo Sirainen [Thu, 11 Feb 2016 11:25:28 +0000 (13:25 +0200)]
auth: Moved all passdb/userdb template handling to auth_passdb/userdb.
This is because passdb_find() and userdb_find() attempts to avoid
duplicating passdbs and userdbs when they have identical driver+args.
This deduplication is useful when using multiple protocol { .. } blocks
that duplicate some passdb/userdb backends. For example we might want
to have only a single SQL connection regardless of how the protocol-specific
passdbs and userdbs are being set up. All the default/override_fields and
result_* settings aren't relevant to the passdb/userdb backends, so removing
them will again allow the deduplication to work correctly.
Timo Sirainen [Thu, 11 Feb 2016 11:21:18 +0000 (13:21 +0200)]
auth: Moved cache_key from passdb_module to auth_passdb.
This is in preparation for the next changeset, which moves
default/override_fields also to auth_passdb.
Timo Sirainen [Thu, 11 Feb 2016 11:58:54 +0000 (13:58 +0200)]
lib-http: server: Error handling fix - avoid potential crash when request is already gone
Timo Sirainen [Wed, 10 Feb 2016 20:02:50 +0000 (22:02 +0200)]
login-proxy: Preserve client's istream even after login.
This eventually allows things like using lib-ssl-iostream, moving IMAP
COMPRESS handling to login process, etc.
Timo Sirainen [Wed, 10 Feb 2016 20:02:15 +0000 (22:02 +0200)]
lib: Added i_stream_set_persistent_buffers()
Timo Sirainen [Wed, 10 Feb 2016 17:30:42 +0000 (19:30 +0200)]
lib: Ignore ENOSYS errors from madvise() calls.
For example Raspberry Pi kernels have removed this. We'll wrap all the
madvise() calls with my_madvise() to avoid extra checks all over the place.
Stephan Bosch [Wed, 10 Feb 2016 22:39:25 +0000 (23:39 +0100)]
lib-http: Created test program that tests payload exchange between client and server with various configurations.
It recursively uses all files in the current directory as payload.
It is currenrly not part of `make check', because it is a stress-testing tool that can run for a long time.
Stephan Bosch [Wed, 10 Feb 2016 21:32:46 +0000 (22:32 +0100)]
lib-http: server: Implemented blocking request input stream.
Stephan Bosch [Wed, 10 Feb 2016 21:30:22 +0000 (22:30 +0100)]
lib-http: server: Implemented blocking response output stream.
Stephan Bosch [Wed, 10 Feb 2016 21:25:07 +0000 (22:25 +0100)]
lib-http: server: Created blocking http_server_response_send_payload() API that closely mimics the client equivalent.
It allows sending response payload in several chunks in a blocking fashion.