]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
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.

9 years agolib-http: Add accessors for some response details
Aki Tuomi [Mon, 15 Feb 2016 11:55:41 +0000 (13:55 +0200)] 
lib-http: Add accessors for some response details

9 years agodovecot: improve systemd support
Aki Tuomi [Thu, 18 Feb 2016 17:27:13 +0000 (19:27 +0200)] 
dovecot: improve systemd support

9 years agofts: When searching data headers, don't expand search keys to all languages.
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".

9 years agofts: Code cleanup - moved fts_header_has_language() to a global function
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

9 years agolib-storage: Avoid duplicate work when a search query has multiple header/body keys.
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.

9 years agolib-mail: Added message_search_more_get_decoded()
Timo Sirainen [Tue, 16 Feb 2016 15:48:53 +0000 (17:48 +0200)] 
lib-mail: Added message_search_more_get_decoded()

9 years agoauth: Moved all passdb/userdb template handling to auth_passdb/userdb.
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.

9 years agoauth: Moved cache_key from passdb_module to auth_passdb.
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.

9 years agolib-http: server: Error handling fix - avoid potential crash when request is already...
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

9 years agologin-proxy: Preserve client's istream even after login.
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.

9 years agolib: Added i_stream_set_persistent_buffers()
Timo Sirainen [Wed, 10 Feb 2016 20:02:15 +0000 (22:02 +0200)] 
lib: Added i_stream_set_persistent_buffers()

9 years agolib: Ignore ENOSYS errors from madvise() calls.
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.

9 years agolib-http: Created test program that tests payload exchange between client and server...
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.

9 years agolib-http: server: Implemented blocking request input stream.
Stephan Bosch [Wed, 10 Feb 2016 21:32:46 +0000 (22:32 +0100)] 
lib-http: server: Implemented blocking request input stream.

9 years agolib-http: server: Implemented blocking response output stream.
Stephan Bosch [Wed, 10 Feb 2016 21:30:22 +0000 (22:30 +0100)] 
lib-http: server: Implemented blocking response output stream.

9 years agolib-http: server: Created blocking http_server_response_send_payload() API that close...
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.

9 years agolib-http: server: Added some request debug logging.
Stephan Bosch [Wed, 10 Feb 2016 21:19:27 +0000 (22:19 +0100)] 
lib-http: server: Added some request debug logging.

9 years agolib-http: request parser: Added support for explicitly finishing payload of previous...
Stephan Bosch [Wed, 10 Feb 2016 21:17:07 +0000 (22:17 +0100)] 
lib-http: request parser: Added support for explicitly finishing payload of previous request.

9 years agolib-sql: Allow port to be configured for Cassandra cluster
Michael M Slusarz [Thu, 11 Feb 2016 05:15:12 +0000 (22:15 -0700)] 
lib-sql: Allow port to be configured for Cassandra cluster

9 years agolib-storage: Added missing %{userdb:*:default} handling
Timo Sirainen [Wed, 10 Feb 2016 17:08:11 +0000 (19:08 +0200)] 
lib-storage: Added missing %{userdb:*:default} handling

9 years agolib-storage: Deduplicate %{userdb:*} handling for mail_user and mail_storage_service_user
Timo Sirainen [Wed, 10 Feb 2016 17:06:14 +0000 (19:06 +0200)] 
lib-storage: Deduplicate %{userdb:*} handling for mail_user and mail_storage_service_user

9 years ago*-login: Pass client_auth_reply to client.auth_result() whenever possible.
Timo Sirainen [Wed, 10 Feb 2016 16:27:52 +0000 (18:27 +0200)] 
*-login: Pass client_auth_reply to client.auth_result() whenever possible.

This didn't matter normally, but some plugins might care about it.

9 years agoauth: Added "fail" parameter, which fails the passdb lookup.
Timo Sirainen [Wed, 10 Feb 2016 14:54:43 +0000 (16:54 +0200)] 
auth: Added "fail" parameter, which fails the passdb lookup.

9 years agoauth: Don't revert any previous failed=TRUE status if allow_nets check succeeds
Timo Sirainen [Wed, 10 Feb 2016 14:51:42 +0000 (16:51 +0200)] 
auth: Don't revert any previous failed=TRUE status if allow_nets check succeeds

9 years agoMakefile: Added missing ostream-escaped.h
Timo Sirainen [Wed, 10 Feb 2016 13:50:48 +0000 (15:50 +0200)] 
Makefile: Added missing ostream-escaped.h

9 years agolib-http: Fixed test-http-request-parser unit test
Timo Sirainen [Wed, 10 Feb 2016 13:39:45 +0000 (15:39 +0200)] 
lib-http: Fixed test-http-request-parser unit test

Patch by Stephan Bosch

9 years agolib: Add ostream-escaped filter
Aki Tuomi [Mon, 8 Feb 2016 14:22:34 +0000 (16:22 +0200)] 
lib: Add ostream-escaped filter

9 years agodoveadm-print: Fix doveadm_print_json_print_stream
Aki Tuomi [Tue, 9 Feb 2016 08:03:56 +0000 (10:03 +0200)] 
doveadm-print: Fix doveadm_print_json_print_stream

9 years agolib-http: message parser: Made sure that payload stream is always destroyed (hence...
Stephan Bosch [Mon, 8 Feb 2016 21:57:13 +0000 (22:57 +0100)] 
lib-http: message parser: Made sure that payload stream is always destroyed (hence closed) when the next request is to be parsed.

This makes sure that the connection input is always at the correct position
for the next request. Remaining references to the payload stream could
theoretically mess this up.

9 years agolib-http: server: Make sure that any pending request is aborted and destroyed before...
Stephan Bosch [Mon, 8 Feb 2016 21:55:09 +0000 (22:55 +0100)] 
lib-http: server: Make sure that any pending request is aborted and destroyed before connection FDs are closed.

This way, any payload io struct created from the request callback can be
freed before the associated FD becomes invalid. This would cause an assert
failure otherwise.

9 years agolib-http: server: Sometimes a success response was sent before all payload from the...
Stephan Bosch [Mon, 8 Feb 2016 21:53:50 +0000 (22:53 +0100)] 
lib-http: server: Sometimes a success response was sent before all payload from the client request was read.

This can confuse clients, so this is supposed to be prevented.

9 years agolib-http: server: Fixed memory problem reported by Valgrind, which was caused by...
Stephan Bosch [Mon, 8 Feb 2016 21:52:38 +0000 (22:52 +0100)] 
lib-http: server: Fixed memory problem reported by Valgrind, which was caused by the request being freed too early while sending a response.

Fixed by referencing the request while it is being sent.

9 years agolib-http: server: Fixed datastack framing problem in error handling of response sending.
Stephan Bosch [Mon, 8 Feb 2016 21:51:14 +0000 (22:51 +0100)] 
lib-http: server: Fixed datastack framing problem in error handling of response sending.

The returned error string crossed a data stack frame, which wasn't handled correctly.

9 years agolib-http: request parser: Made sure that partially parsed requests never have stale...
Stephan Bosch [Mon, 8 Feb 2016 21:49:28 +0000 (22:49 +0100)] 
lib-http: request parser: Made sure that partially parsed requests never have stale string values.

Due to the fact that we assign method and target fields early for proper
error messages, stale fields from previous requests could have ended up in a
partially parsed new request.

9 years agolib-http: client: Fixed pipelining bug: client sometimes sent new request while still...
Stephan Bosch [Mon, 8 Feb 2016 21:47:30 +0000 (22:47 +0100)] 
lib-http: client: Fixed pipelining bug: client sometimes sent new request while still waiting for 100-continue.

9 years agolib-http: client: Make sure that any pending request is aborted and destroyed before...
Stephan Bosch [Mon, 8 Feb 2016 21:45:54 +0000 (22:45 +0100)] 
lib-http: client: Make sure that any pending request is aborted and destroyed before connection FDs are closed.

This way, any payload io struct created from the response callback can be freed before the associated FD becomes invalid.
This would cause an assert failure otherwise.

9 years agolib-http: Forgot to assign pointer parameter to NULL in request/response parser deini...
Stephan Bosch [Mon, 8 Feb 2016 21:44:52 +0000 (22:44 +0100)] 
lib-http: Forgot to assign pointer parameter to NULL in request/response parser deinit functions.

9 years agoMakefile: Added missing auth-request-stats.h
Timo Sirainen [Tue, 9 Feb 2016 08:34:29 +0000 (10:34 +0200)] 
Makefile: Added missing auth-request-stats.h

9 years agodoveadm auth test/login: Added -M <master user> parameter.
Timo Sirainen [Mon, 8 Feb 2016 16:43:02 +0000 (18:43 +0200)] 
doveadm auth test/login: Added -M <master user> parameter.

9 years agostats: Minor error message cleanup.
Timo Sirainen [Mon, 8 Feb 2016 14:21:40 +0000 (16:21 +0200)] 
stats: Minor error message cleanup.

FIFO stats can come from auth also, not just mail server.

9 years agoauth: If auth_stats=yes, send statistics to stats process.
Timo Sirainen [Mon, 8 Feb 2016 14:20:46 +0000 (16:20 +0200)] 
auth: If auth_stats=yes, send statistics to stats process.

9 years agoman: document dsync -m and -R options
Michael M Slusarz [Fri, 5 Feb 2016 18:36:32 +0000 (11:36 -0700)] 
man: document dsync -m and -R options

9 years agolib-master: Fail if syslog_facility's value is unknown.
Timo Sirainen [Mon, 8 Feb 2016 10:20:34 +0000 (12:20 +0200)] 
lib-master: Fail if syslog_facility's value is unknown.

9 years agoacl: If acl_user is set, use it for ACL username checks. Overrides master_user.
Timo Sirainen [Mon, 8 Feb 2016 10:04:02 +0000 (12:04 +0200)] 
acl: If acl_user is set, use it for ACL username checks. Overrides master_user.

9 years agoauth: Small code cleanup to auth cache - deduplicate code.
Timo Sirainen [Fri, 5 Feb 2016 13:55:36 +0000 (15:55 +0200)] 
auth: Small code cleanup to auth cache - deduplicate code.

No functional changes.

9 years agoauth: Minor code cleanup - fix parameter type
Timo Sirainen [Fri, 5 Feb 2016 13:54:35 +0000 (15:54 +0200)] 
auth: Minor code cleanup - fix parameter type

9 years agoauth: If auth cache lookup results in expired entry, it should be tracked in stats...
Timo Sirainen [Fri, 5 Feb 2016 13:48:25 +0000 (15:48 +0200)] 
auth: If auth cache lookup results in expired entry, it should be tracked in stats as a "miss"

9 years agostats: Removed accidentally commited i_panic() in abb242da
Timo Sirainen [Fri, 5 Feb 2016 13:26:15 +0000 (15:26 +0200)] 
stats: Removed accidentally commited i_panic() in abb242da

9 years agostats: Split stats-connection.[ch] to lib-stats/ and plugin's mail-specific parts.
Timo Sirainen [Fri, 5 Feb 2016 13:07:00 +0000 (15:07 +0200)] 
stats: Split stats-connection.[ch] to lib-stats/ and plugin's mail-specific parts.

9 years agostats: Added ADD-USER command to add stats to a user without having a session.
Timo Sirainen [Fri, 5 Feb 2016 12:55:56 +0000 (14:55 +0200)] 
stats: Added ADD-USER command to add stats to a user without having a session.

This will be used by at least the auth process. Although the auth process
does have a session, it's a bit too early to start using it yet. At least the
PID should be possible to change when the session moves to imap process.
Also the unsuccessful authentication sessions shouldn't really be added at
all.

9 years agostats: Renamed mail-server-connection to fifo-input-connection.
Timo Sirainen [Fri, 5 Feb 2016 12:35:48 +0000 (14:35 +0200)] 
stats: Renamed mail-server-connection to fifo-input-connection.

9 years agolib-mail: Reading from istream-header-filter second time reverted callback's eoh...
Timo Sirainen [Thu, 4 Feb 2016 12:02:42 +0000 (14:02 +0200)] 
lib-mail: Reading from istream-header-filter second time reverted callback's eoh change.

9 years agolib: Fixed calling json_parse_skip_next() within arrays
Timo Sirainen [Thu, 4 Feb 2016 11:32:58 +0000 (13:32 +0200)] 
lib: Fixed calling json_parse_skip_next() within arrays

9 years agolib: If json-parser has JSON_PARSER_NO_ROOT_OBJECT set, return the ending root "...
Timo Sirainen [Thu, 4 Feb 2016 11:31:59 +0000 (13:31 +0200)] 
lib: If json-parser has JSON_PARSER_NO_ROOT_OBJECT set, return the ending root "]" and "}"

9 years agolib: Avoid typeof() if HAVE_TYPEOF isn't set, even if gcc version is high enough.
Timo Sirainen [Wed, 3 Feb 2016 15:56:49 +0000 (17:56 +0200)] 
lib: Avoid typeof() if HAVE_TYPEOF isn't set, even if gcc version is high enough.

This is mainly to test that we can compile without typeof().

9 years agoimap, pop3, imap-urlauth: Added -a <auth-master socket path> parameter
Timo Sirainen [Wed, 3 Feb 2016 12:05:07 +0000 (14:05 +0200)] 
imap, pop3, imap-urlauth: Added -a <auth-master socket path> parameter

9 years ago*-login: Added -l parameter to specify the socket where to connect to after authentic...
Timo Sirainen [Wed, 3 Feb 2016 12:00:16 +0000 (14:00 +0200)] 
*-login: Added -l parameter to specify the socket where to connect to after authentication

9 years agoimap: SETMETADATA shouldn't crash when value parameter is missing.
Timo Sirainen [Wed, 3 Feb 2016 11:56:09 +0000 (13:56 +0200)] 
imap: SETMETADATA shouldn't crash when value parameter is missing.

9 years agolib-sasl: Compiler warning fix for previous EXTERNAL change..
Timo Sirainen [Wed, 3 Feb 2016 11:03:36 +0000 (13:03 +0200)] 
lib-sasl: Compiler warning fix for previous EXTERNAL change..

9 years agolib-sasl: Don't require authid for EXTERNAL mechanism, since we're not really authent...
Timo Sirainen [Wed, 3 Feb 2016 10:29:29 +0000 (12:29 +0200)] 
lib-sasl: Don't require authid for EXTERNAL mechanism, since we're not really authenticating.

9 years agolib-sasl: Added support for EXTERNAL SASL mechanism
Timo Sirainen [Wed, 3 Feb 2016 10:26:10 +0000 (12:26 +0200)] 
lib-sasl: Added support for EXTERNAL SASL mechanism

9 years agodoveadm: Reset JSON formatter context before reuse
Aki Tuomi [Tue, 2 Feb 2016 20:06:38 +0000 (22:06 +0200)] 
doveadm: Reset JSON formatter context before reuse

This is needed to implement multicommand support in HTTP API.

9 years agopop3c: Compiler warning fixes to earlier change
Timo Sirainen [Tue, 2 Feb 2016 10:32:49 +0000 (12:32 +0200)] 
pop3c: Compiler warning fixes to earlier change

9 years agoimapc: Compare INBOX in STATUS case-insensitively.
Timo Sirainen [Mon, 1 Feb 2016 21:32:15 +0000 (23:32 +0200)] 
imapc: Compare INBOX in STATUS case-insensitively.

9 years agosdbox: Failing after saved mails' UIDs were already assigned caused unlink()ing garbage
Timo Sirainen [Mon, 1 Feb 2016 20:48:22 +0000 (22:48 +0200)] 
sdbox: Failing after saved mails' UIDs were already assigned caused unlink()ing garbage

Mainly with dsync when it fails, the transaction is still committed and
mails are given UIDs. If the transaction commit still fails, it attempts to
rollback the saved mails by unlink()ing them, but at that point the path
pointed to an already freed memory. This caused unlink() errors with some
garbage strings as the path (and hopefully no actually valid paths).

The easiest way to reproduce this was to fill up the filesystem with dsync.

9 years agodsync: If mailbox importing fails, stop immediately without waiting for exporter...
Timo Sirainen [Mon, 1 Feb 2016 20:40:15 +0000 (22:40 +0200)] 
dsync: If mailbox importing fails, stop immediately without waiting for exporter to finish.

9 years agoimap: Removed now-unused cmd_sync_callback(), which doesn't work very well.
Timo Sirainen [Mon, 1 Feb 2016 18:30:26 +0000 (20:30 +0200)] 
imap: Removed now-unused cmd_sync_callback(), which doesn't work very well.

See commit message in b7b25e0 for more details.

9 years agoimap: Removed special EXPUNGE callback for an Outlook workaround.
Timo Sirainen [Mon, 1 Feb 2016 18:26:19 +0000 (20:26 +0200)] 
imap: Removed special EXPUNGE callback for an Outlook workaround.

As the comment mentions, this workaround isn't needed if index files are
used.  Hopefully also the Outlook bug itself is gone nowadays.. In any case
the current callback code didn't work, because it was returning FALSE and
causing an assert in a pipelined EXPUNGE+APPEND combination after 6e9454f:

Panic: file imap-client.c: line 862 (client_check_command_hangs): assertion
failed: (!have_wait_unfinished || unfinished_count > 0)

It would probably be possible to fix this, but it would complicate the code
even further, so it's easier just to get rid of this feature. It was easily
triggered by running imaptest stress testing.

9 years agopop3-migration: Ignore mails returned as expunged by pop3c.
Timo Sirainen [Mon, 1 Feb 2016 17:08:24 +0000 (19:08 +0200)] 
pop3-migration: Ignore mails returned as expunged by pop3c.

Whether the -ERR actually meant they were expunged or not is another
issue, but the answer to that belongs to pop3c code. MAIL_ERROR_EXPUNGED
in any case can be safely handled this way here.

9 years agopop3c: If prefetch fails, treat it as if prefetching simply wasn't done.
Timo Sirainen [Mon, 1 Feb 2016 17:07:59 +0000 (19:07 +0200)] 
pop3c: If prefetch fails, treat it as if prefetching simply wasn't done.

This avoids having error handling twice. Also in case the error was caused
by -ERR, this should retry the operation, which even might fix it in some
situations.

9 years agopop3-migration: Use message_header_hash_more() instead of duplicating the code
Timo Sirainen [Mon, 1 Feb 2016 15:57:07 +0000 (17:57 +0200)] 
pop3-migration: Use message_header_hash_more() instead of duplicating the code

9 years agolib-mail: Changed message_header_hash_more() to support any hash algorithm
Timo Sirainen [Mon, 1 Feb 2016 15:56:49 +0000 (17:56 +0200)] 
lib-mail: Changed message_header_hash_more() to support any hash algorithm

9 years agolib: JSON parser can now optionally parse input that isn't an object.
Timo Sirainen [Mon, 1 Feb 2016 15:38:11 +0000 (17:38 +0200)] 
lib: JSON parser can now optionally parse input that isn't an object.

Based on patch by Aki Tuomi.