]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
9 years agodoveadm-mailbox-status: Fixed declaring and processing args
Aki Tuomi [Thu, 25 Feb 2016 10:30:45 +0000 (12:30 +0200)] 
doveadm-mailbox-status: Fixed declaring and processing args

9 years agodoveadm: Fully populate mail_cmd in ver2 wrapper
Aki Tuomi [Thu, 25 Feb 2016 10:30:33 +0000 (12:30 +0200)] 
doveadm: Fully populate mail_cmd in ver2 wrapper

9 years agodoveadm-fts: Use ver2 structures
Aki Tuomi [Thu, 25 Feb 2016 08:34:34 +0000 (10:34 +0200)] 
doveadm-fts: Use ver2 structures

9 years agodoveadm-acl: Use ver2 structures
Aki Tuomi [Thu, 25 Feb 2016 08:17:16 +0000 (10:17 +0200)] 
doveadm-acl: Use ver2 structures

9 years agodoveadm-search: Use ver2 structures
Aki Tuomi [Thu, 25 Feb 2016 07:58:55 +0000 (09:58 +0200)] 
doveadm-search: Use ver2 structures

9 years agodoveadm-purge: Use ver2 structures
Aki Tuomi [Thu, 25 Feb 2016 07:54:01 +0000 (09:54 +0200)] 
doveadm-purge: Use ver2 structures

9 years agodoveadm-force-resync: Use ver2 structures
Aki Tuomi [Thu, 25 Feb 2016 07:53:37 +0000 (09:53 +0200)] 
doveadm-force-resync: Use ver2 structures

9 years agodoveadm-import: Use ver2 structures
Aki Tuomi [Thu, 25 Feb 2016 07:46:40 +0000 (09:46 +0200)] 
doveadm-import: Use ver2 structures

9 years agodoveadm-flags: Use ver2 structures
Aki Tuomi [Thu, 25 Feb 2016 07:44:04 +0000 (09:44 +0200)] 
doveadm-flags: Use ver2 structures

9 years agodoveadm-expunge: Use ver2 structures
Aki Tuomi [Thu, 25 Feb 2016 07:39:55 +0000 (09:39 +0200)] 
doveadm-expunge: Use ver2 structures

9 years agodoveadm-deduplicate: Use ver2 structures
Aki Tuomi [Thu, 25 Feb 2016 07:30:41 +0000 (09:30 +0200)] 
doveadm-deduplicate: Use ver2 structures

9 years agodoveadm-batch: Fixed it to work with ver2 commands.
Aki Tuomi [Thu, 25 Feb 2016 07:20:06 +0000 (09:20 +0200)] 
doveadm-batch: Fixed it to work with ver2 commands.

9 years agodoveadm-altmove: Use ver2 structures
Aki Tuomi [Thu, 25 Feb 2016 07:08:38 +0000 (09:08 +0200)] 
doveadm-altmove: Use ver2 structures

9 years agodoveadm: Remove return value from ver2 cmd() - doveadm_exit_code is enough
Aki Tuomi [Wed, 24 Feb 2016 09:19:11 +0000 (11:19 +0200)] 
doveadm: Remove return value from ver2 cmd() - doveadm_exit_code is enough

9 years agodoveadm-cmd: Constify doveadm_cmd_param_*() usage
Aki Tuomi [Wed, 24 Feb 2016 09:14:14 +0000 (11:14 +0200)] 
doveadm-cmd: Constify doveadm_cmd_param_*() usage

9 years agodoveadm-log: Use ver2 structure
Aki Tuomi [Tue, 23 Feb 2016 12:36:22 +0000 (14:36 +0200)] 
doveadm-log: Use ver2 structure

9 years agodoveadm-log: Use doveadm_print() for output
Aki Tuomi [Tue, 23 Feb 2016 12:14:16 +0000 (14:14 +0200)] 
doveadm-log: Use doveadm_print() for output

9 years agodoveadm-print: Add "formatted" print formatter
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.

9 years ago*-login: Call client.auth_result() also when proxying
Timo Sirainen [Wed, 24 Feb 2016 17:13:28 +0000 (19:13 +0200)] 
*-login: Call client.auth_result() also when proxying

9 years agolib-http: client: Decreased request/connect timeout for test-http-client to 10s.
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.

9 years agolib-http: client: Gave request, connect and dns timeouts defaults that make more...
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.

9 years agolib-http: client: Fixed crash happening when connection hits an error while handling...
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.

9 years agostats: Minor code cleaup - remove unnecessary includes and fix copyright year
Timo Sirainen [Wed, 24 Feb 2016 23:18:06 +0000 (01:18 +0200)] 
stats: Minor code cleaup - remove unnecessary includes and fix copyright year

9 years agolib: Added unit test to iostream-temp.
Timo Sirainen [Wed, 24 Feb 2016 14:39:59 +0000 (16:39 +0200)] 
lib: Added unit test to iostream-temp.

9 years agolib: iostream-temp makes the internal fd visible now to o_stream_get_fd()
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.

9 years agolib-storage: Verify settings only after applying settings from userdb
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.

9 years agolib: Added iostream_temp_create_sized() to specify the max in-memory size
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

9 years agologin-proxy: Use io_add_istream() for adding client_input io.
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.

9 years agolib-http: Fix to earlier http_client_connection_unref() change 1dead6
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

9 years agodoveadm: Code cleanup - remove duplicate code
Timo Sirainen [Mon, 22 Feb 2016 20:23:08 +0000 (22:23 +0200)] 
doveadm: Code cleanup - remove duplicate code

9 years agodoveadm: Fixed usage printing for ver2 commands
Timo Sirainen [Mon, 22 Feb 2016 20:10:42 +0000 (22:10 +0200)] 
doveadm: Fixed usage printing for ver2 commands

9 years agodoveadm: Define DOVEADM_CMD_MAIL_USAGE_PREFIX, which v2 commands use as their usage...
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.

9 years agodoveadm: Added doveadm_cmd_get_ver2() helper
Aki Tuomi [Mon, 22 Feb 2016 19:44:40 +0000 (21:44 +0200)] 
doveadm: Added doveadm_cmd_get_ver2() helper

9 years agodoveadm-index: Use ver2 structures
Aki Tuomi [Mon, 22 Feb 2016 12:18:04 +0000 (14:18 +0200)] 
doveadm-index: Use ver2 structures

9 years agodoveadm-cmd: Add command flags
Aki Tuomi [Mon, 22 Feb 2016 11:30:12 +0000 (13:30 +0200)] 
doveadm-cmd: Add command flags

9 years agodoveadm: Free istream parameters everywhere
Timo Sirainen [Mon, 22 Feb 2016 19:39:06 +0000 (21:39 +0200)] 
doveadm: Free istream parameters everywhere

Based on patch by Aki Tuomi

9 years agoquota: Use doveadm ver2 structures
Aki Tuomi [Mon, 22 Feb 2016 12:03:41 +0000 (14:03 +0200)] 
quota: Use doveadm ver2 structures

9 years agodoveadm: Minor code cleanup - rename doveadm_cmd_find*() to doveadm_cmd_find_with_args*()
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*()

9 years agodoveadm: Code cleanup - remove unnecessary NULL sets and checks
Timo Sirainen [Mon, 22 Feb 2016 19:24:06 +0000 (21:24 +0200)] 
doveadm: Code cleanup - remove unnecessary NULL sets and checks

9 years agolib-http: Always set *_obj=NULL first in deinit functions (mainly for consistency)
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.

9 years agolib-http: http_server_connection_unref() now always sets *conn=NULL
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.

9 years agolib-http: Clarify http_server_response_*_payload() API and minor change to it
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.

9 years agolib-http: http_server_request_unref() now always sets *req=NULL
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.

9 years agolib-http: Clarify http_client_request_*_payload() API and minor change to it
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.

9 years agolib-http: http_client_request_unref() now always sets *req=NULL
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.

9 years agolib-http: http_client_connection_unref() now always sets *conn=NULL
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.

9 years agodoveadm-http: Close client input correctly
Aki Tuomi [Mon, 22 Feb 2016 18:03:44 +0000 (20:03 +0200)] 
doveadm-http: Close client input correctly

9 years agodoveadm-http: Return HTTP failure on unexpected JSON input
Timo Sirainen [Mon, 22 Feb 2016 18:00:13 +0000 (20:00 +0200)] 
doveadm-http: Return HTTP failure on unexpected JSON input

9 years agodoveadm-http: Handle invalid input better for arrays.
Timo Sirainen [Mon, 22 Feb 2016 17:56:35 +0000 (19:56 +0200)] 
doveadm-http: Handle invalid input better for arrays.

9 years agodoveadm-http: Handle istreams correctly
Timo Sirainen [Sat, 20 Feb 2016 21:16:52 +0000 (23:16 +0200)] 
doveadm-http: Handle istreams correctly

Based on patch by Aki Tuomi

9 years agodoveadm-save: Use ver2 command structure
Aki Tuomi [Wed, 17 Feb 2016 08:24:24 +0000 (10:24 +0200)] 
doveadm-save: Use ver2 command structure

9 years agodoveadm: Added support for "file" parameters
Timo Sirainen [Mon, 22 Feb 2016 16:55:03 +0000 (18:55 +0200)] 
doveadm: Added support for "file" parameters

9 years agodoveadm: Fixed memory leak at deinit
Timo Sirainen [Mon, 22 Feb 2016 16:46:29 +0000 (18:46 +0200)] 
doveadm: Fixed memory leak at deinit

9 years agodoveadm: Fixed double-free when using -F parameter
Timo Sirainen [Mon, 22 Feb 2016 16:42:42 +0000 (18:42 +0200)] 
doveadm: Fixed double-free when using -F parameter

9 years agodoveadm: Fixed memory leaks when ver2 command parsing fails with invalid 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.

9 years agodoveadm-mail: Fixed common parameters to use correct names as in DOVEADM_CMD_MAIL_COMMON
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

9 years agodoveadm-fetch: Use ver2 structures
Aki Tuomi [Wed, 17 Feb 2016 07:19:01 +0000 (09:19 +0200)] 
doveadm-fetch: Use ver2 structures

9 years agodoveadm: Add kludge to support field array to fieldstr conversion
Aki Tuomi [Mon, 22 Feb 2016 16:20:59 +0000 (18:20 +0200)] 
doveadm: Add kludge to support field array to fieldstr conversion

9 years agodoveadm-stats: Use ver2 structures
Aki Tuomi [Mon, 15 Feb 2016 13:14:25 +0000 (15:14 +0200)] 
doveadm-stats: Use ver2 structures

9 years agolib-index: If mail_transaction_log_lock_head() locking took long, include reason...
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

9 years agomdbox: Use mail_index_sync_set_reason() to give better reason messages for lock wait...
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.

9 years agolib-index: Added mail_index_sync_set_reason() to improve lock wait log 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

9 years agolib-index: Small improvements to logging the reason for long transaction log lock...
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

9 years agodovecot.service: Fixed PIDFile path - removed extra /dovecot/ directory from the...
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.

9 years agolib: mempool-alloconly unit test improvement: verify that data stack isn't used by...
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()

9 years agolib: Minor code cleanup to mempool-alloconly unit test - use test_begin/assert/end()
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()

9 years agodoveadm-http: Correctly initialize parameters
Aki Tuomi [Sun, 21 Feb 2016 16:38:24 +0000 (18:38 +0200)] 
doveadm-http: Correctly initialize parameters

9 years agodoveadm: Fixed using array type parameters.
Aki Tuomi [Sun, 21 Feb 2016 16:37:24 +0000 (18:37 +0200)] 
doveadm: Fixed using array type parameters.

9 years agodoveadm: Fixed assert-crash when command with CMD_PARAM_FLAG_DO_NOT_EXPOSE was used.
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.

9 years agodoveadm: Fixed support for --long-option arguments
Aki Tuomi [Sun, 21 Feb 2016 16:35:03 +0000 (18:35 +0200)] 
doveadm: Fixed support for --long-option arguments

9 years agolib: Added [pt]_array_const_string_join()
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

9 years agolib: Move code from t_strarray_join() into a more generic p_strarray_join_n()
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()

9 years agolib: Added unit test for t_strarray_join()
Timo Sirainen [Sun, 21 Feb 2016 16:31:12 +0000 (18:31 +0200)] 
lib: Added unit test for t_strarray_join()

9 years agoquots-fs: Fixed compiling with HP/UX and Solaris
Timo Sirainen [Sun, 21 Feb 2016 15:44:38 +0000 (17:44 +0200)] 
quots-fs: Fixed compiling with HP/UX and Solaris

9 years agodoveadm: Compiler warning fix.
Timo Sirainen [Sun, 21 Feb 2016 15:44:07 +0000 (17:44 +0200)] 
doveadm: Compiler warning fix.

9 years agolib-index: mail_index_sync_next() didn't always return expunges sorted
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

9 years agoimap-hibernate: send connect/disconnect events to anvil
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.

9 years agolib: json_parse_next_stream() wrongly returned -1 even when a stream was returned.
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.

9 years agouri-util: Fixed assertion failure for invalid character in path segment.
Stephan Bosch [Sat, 20 Feb 2016 17:47:58 +0000 (19:47 +0200)] 
uri-util: Fixed assertion failure for invalid character in path segment.

9 years agolib-http: server: Implicitly free a request response structure when a new (failure...
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.

9 years agodoveadm: Fix for previous attempt to make static analyzer happier.
Timo Sirainen [Sat, 20 Feb 2016 11:40:18 +0000 (13:40 +0200)] 
doveadm: Fix for previous attempt to make static analyzer happier.

9 years agodoveadm: Make static analyzer happier - cptr can't be NULL here.
Timo Sirainen [Fri, 19 Feb 2016 18:20:43 +0000 (20:20 +0200)] 
doveadm: Make static analyzer happier - cptr can't be NULL here.

9 years agodoveadm: Use char type for short options instead of a string.
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.

9 years agodoveadm: Remove CMD_PARAM_NONE type, since it already defaulted to same as CMD_PARAM_BOOL
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

9 years agolib-index: Fixed mail_index_lookup_ext_full()'s map_r with transaction-view.
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.

9 years agolib-index: Code cleanup - moved code to tview_lookup_ext_update()
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.

9 years agoMakefile: Added missing client-connection-private.h
Timo Sirainen [Fri, 19 Feb 2016 14:13:51 +0000 (16:13 +0200)] 
Makefile: Added missing client-connection-private.h

9 years agodovecot.service: Fixed PIDFile path
Timo Sirainen [Fri, 19 Feb 2016 14:11:58 +0000 (16:11 +0200)] 
dovecot.service: Fixed PIDFile path

9 years agodoveadm: Use correct uoff_t type for printf
Timo Sirainen [Fri, 19 Feb 2016 14:03:30 +0000 (16:03 +0200)] 
doveadm: Use correct uoff_t type for printf

9 years agodovecot.service: Disabled ProtectSystem=full for now
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.

9 years agodoveadm: Use ver2 structures for all "doveadm mailbox *" commands.
Aki Tuomi [Fri, 19 Feb 2016 13:03:51 +0000 (15:03 +0200)] 
doveadm: Use ver2 structures for all "doveadm mailbox *" commands.

9 years agodoveadm: Use ver2 structures for stop & reload.
Aki Tuomi [Fri, 19 Feb 2016 13:02:56 +0000 (15:02 +0200)] 
doveadm: Use ver2 structures for stop & reload.

9 years agodoveadm: Implement HTTP server API, slightly based on JMAP API
Aki Tuomi [Fri, 19 Feb 2016 12:58:41 +0000 (14:58 +0200)] 
doveadm: Implement HTTP server API, slightly based on JMAP API

9 years agodoveadm: Code cleanup - moved code to client_connection_init()
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.

9 years agodoveadm: Add infrastructure for doveadm_cmd_ver2
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.

9 years agodoveadm: Add unit tests for i_strccdascmp
Aki Tuomi [Thu, 18 Feb 2016 13:49:03 +0000 (15:49 +0200)] 
doveadm: Add unit tests for i_strccdascmp

9 years agodoveadm: Add 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.

9 years agodoveadm: If user lookup fails, log an error but don't kill the process.
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.

9 years agodoveadm: Code cleanup - Removed passing through unnecessary argv parameter
Timo Sirainen [Fri, 19 Feb 2016 12:05:13 +0000 (14:05 +0200)] 
doveadm: Code cleanup - Removed passing through unnecessary argv parameter

9 years agodoveadm: Code cleanup - move code to doveadm_mail_cmd_exec()
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.