]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
10 years agolib-storage: Update mailbox vsize header on save/copy/expunge.
Timo Sirainen [Mon, 21 Sep 2015 13:32:27 +0000 (16:32 +0300)] 
lib-storage: Update mailbox vsize header on save/copy/expunge.
This allows always efficiently looking up maiboxes' vsizes after they're
initially calculated.

The expunge handling is unfortunately done currently in quota handling code,
so it works only if quota is enabled. Ideally this would be solved in v2.3
with some lib-storage core changes.

10 years agoquota: Added quota_vsizes=yes setting to count quotas using virtual sizes instead...
Timo Sirainen [Mon, 21 Sep 2015 13:24:30 +0000 (16:24 +0300)] 
quota: Added quota_vsizes=yes setting to count quotas using virtual sizes instead of physical sizes.
This doesn't work with all the quota backends.

10 years agoquota: Commit expunge transaction instead of rolling back.
Timo Sirainen [Mon, 21 Sep 2015 13:12:43 +0000 (16:12 +0300)] 
quota: Commit expunge transaction instead of rolling back.
This likely won't make much of a difference, since it should have accessed
only expunged mails. But it's a bit cleaner this way.

10 years agoquota: Code cleanup - extract default init() handling to quota_root_default_init()
Timo Sirainen [Mon, 21 Sep 2015 13:09:37 +0000 (16:09 +0300)] 
quota: Code cleanup - extract default init() handling to quota_root_default_init()

10 years agoimap: If client disconnects, log the in-progress commands' input/output bytes.
Timo Sirainen [Mon, 21 Sep 2015 12:41:49 +0000 (15:41 +0300)] 
imap: If client disconnects, log the in-progress commands' input/output bytes.

10 years agoimap: If client disconnects, log how long the in-progress commands were running.
Timo Sirainen [Mon, 21 Sep 2015 12:32:02 +0000 (15:32 +0300)] 
imap: If client disconnects, log how long the in-progress commands were running.

10 years agoCompiler warning fix.
Timo Sirainen [Mon, 21 Sep 2015 11:18:51 +0000 (14:18 +0300)] 
Compiler warning fix.

10 years agoimap: Improved command timing information reporting.
Timo Sirainen [Mon, 21 Sep 2015 11:02:47 +0000 (14:02 +0300)] 
imap: Improved command timing information reporting.
We now report also the time we spent waiting on ioloop. Also fixed reporting
command timing information when multiple commands were running in parallel
(e.g. SEARCH + FETCH). If multiple commands are running in parallel they all
report the same ioloop wait time, because there's no easy way to know which
one of them caused the wait.

10 years agolib: Added io_loop_get_wait_usecs()
Timo Sirainen [Mon, 21 Sep 2015 10:59:41 +0000 (13:59 +0300)] 
lib: Added io_loop_get_wait_usecs()

10 years agoimap: When running SEARCH on "background", run it through command_exec()
Timo Sirainen [Mon, 21 Sep 2015 10:59:22 +0000 (13:59 +0300)] 
imap: When running SEARCH on "background", run it through command_exec()
Otherwise all the timing information isn't right and the pre/post hooks
weren't being called so stats counting was also wrong.

10 years agolib-index: Added mail_index_sync_have_any_expunges()
Timo Sirainen [Sun, 20 Sep 2015 19:25:11 +0000 (22:25 +0300)] 
lib-index: Added mail_index_sync_have_any_expunges()
This can be used to quickly check before mail_index_sync_begin() if there
are likely to be any expunges that will be synced.

10 years agoauth: The mechanisms configured using the auth_mechanisms setting were not enforced.
Stephan Bosch [Sun, 20 Sep 2015 18:49:51 +0000 (21:49 +0300)] 
auth: The mechanisms configured using the auth_mechanisms setting were not enforced.
The login service would check whether the mechanism is supported by auth,
but auth performed no such check of its own. This means that any
implemented mechanism was accessible from a login, even though was
presumably disabled.

10 years agolib: file_wait_lock*(): Improve the panic log message on EDEADLOCK.
Timo Sirainen [Sat, 19 Sep 2015 22:04:50 +0000 (01:04 +0300)] 
lib: file_wait_lock*(): Improve the panic log message on EDEADLOCK.

10 years agolib-fs: Fixed compiling with some OSes
Timo Sirainen [Wed, 16 Sep 2015 22:33:22 +0000 (07:33 +0900)] 
lib-fs: Fixed compiling with some OSes

10 years agolib-fs: timing_deinit()s was called too late - fs was already freed.
Timo Sirainen [Wed, 16 Sep 2015 22:33:01 +0000 (07:33 +0900)] 
lib-fs: timing_deinit()s was called too late - fs was already freed.

10 years agocassandra: With debugging, log also how many rows were iterated.
Timo Sirainen [Wed, 16 Sep 2015 22:26:49 +0000 (07:26 +0900)] 
cassandra: With debugging, log also how many rows were iterated.

10 years agocassandra: With debugging, log also how long result was used for before it was freed.
Timo Sirainen [Wed, 16 Sep 2015 22:24:28 +0000 (07:24 +0900)] 
cassandra: With debugging, log also how long result was used for before it was freed.
This includes the time spent on SELECT query's iterator.

10 years agocassandra: Don't crash if connection to Cassandra failed.
Timo Sirainen [Wed, 16 Sep 2015 22:20:32 +0000 (07:20 +0900)] 
cassandra: Don't crash if connection to Cassandra failed.

10 years agocassandra: If log_level=debug, log also how long the queries take.
Timo Sirainen [Wed, 16 Sep 2015 22:07:57 +0000 (07:07 +0900)] 
cassandra: If log_level=debug, log also how long the queries take.

10 years agolib: file_wait_lock_error() assert-crashes now on EDEADLOCK
Timo Sirainen [Wed, 16 Sep 2015 01:46:44 +0000 (10:46 +0900)] 
lib: file_wait_lock_error() assert-crashes now on EDEADLOCK
It's always a bug and a crash can help debug it.

10 years agolib-fs: Track operation timing statistics if enable_timing setting is set.
Timo Sirainen [Tue, 15 Sep 2015 20:01:40 +0000 (05:01 +0900)] 
lib-fs: Track operation timing statistics if enable_timing setting is set.

10 years agolib: Added a simple timing.h API for tracking min/max/avg for events.
Timo Sirainen [Tue, 15 Sep 2015 19:44:37 +0000 (04:44 +0900)] 
lib: Added a simple timing.h API for tracking min/max/avg for events.

10 years agocassandra: Added delete_consistency parameter.
Timo Sirainen [Tue, 15 Sep 2015 06:20:08 +0000 (15:20 +0900)] 
cassandra: Added delete_consistency parameter.

10 years agolib: file_create_locked() may have leaked memory on some race conditions.
Timo Sirainen [Sun, 13 Sep 2015 13:42:32 +0000 (16:42 +0300)] 
lib: file_create_locked() may have leaked memory on some race conditions.

10 years agodoveadm mailbox metadata list: Fixed not giving the prefix parameter.
Timo Sirainen [Sat, 12 Sep 2015 10:00:58 +0000 (13:00 +0300)] 
doveadm mailbox metadata list: Fixed not giving the prefix parameter.

10 years agodoveadm mailbox attribute list: Prefix parameter was ignored.
Timo Sirainen [Fri, 11 Sep 2015 11:02:21 +0000 (14:02 +0300)] 
doveadm mailbox attribute list: Prefix parameter was ignored.

10 years agolib-storage: Fixed iterating attribute prefix that matched the attribute itself.
Timo Sirainen [Fri, 11 Sep 2015 11:02:01 +0000 (14:02 +0300)] 
lib-storage: Fixed iterating attribute prefix that matched the attribute itself.
So if attribute key was "foo", iterating "foo" returned garbage because it
skipped over the trailing \0.

10 years agomaster: systemd's sd_listen_fds() error handling was wrong.
Timo Sirainen [Thu, 10 Sep 2015 22:20:28 +0000 (01:20 +0300)] 
master: systemd's sd_listen_fds() error handling was wrong.

10 years agolib-storage: Fixed crash in mailbox list index notifying caused by fa979ccfa34c
Timo Sirainen [Wed, 9 Sep 2015 08:31:41 +0000 (11:31 +0300)] 
lib-storage: Fixed crash in mailbox list index notifying caused by fa979ccfa34c

10 years agolib: test-strnum - do not invite undetectable errors
Phil Carmody [Tue, 8 Sep 2015 16:28:31 +0000 (19:28 +0300)] 
lib: test-strnum - do not invite undetectable errors
The very numbers which could cause a broken parser to over-run, the ones we
are testing, are the ones which will be parsed as having a value similar to
'value', so check that no value was returned by using a number completely
dissimilar to that. Otherwise, there might be an accidental mis-parse that
overwrote value, but left its value the same.

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agolib-storage: Replaced some unlink()s with i_unlink*()s where we could.
Timo Sirainen [Tue, 8 Sep 2015 16:12:26 +0000 (19:12 +0300)] 
lib-storage: Replaced some unlink()s with i_unlink*()s where we could.
This changes some mail_storage_set_critical() calls to i_error()s, but
because these unlink() failures don't actually fail the operation it doesn't
matter.

10 years agolib-index: Replaced some unlink()s with i_unlink*()s where we could.
Timo Sirainen [Tue, 8 Sep 2015 16:11:45 +0000 (19:11 +0300)] 
lib-index: Replaced some unlink()s with i_unlink*()s where we could.
This changes some mail_index_set_error() calls to i_error()s, but because
these unlink() failures don't actually fail the operation it doesn't matter.
In fact it may be even better that it doesn't overwrite the existing
index->error if it exists.

10 years agoReplaced unlink() calls with i_unlink*() wherever possible.
Timo Sirainen [Tue, 8 Sep 2015 16:07:02 +0000 (19:07 +0300)] 
Replaced unlink() calls with i_unlink*() wherever possible.

10 years agolib: Added i_unlink() and i_unlink_if_exists()
Timo Sirainen [Tue, 8 Sep 2015 15:49:00 +0000 (18:49 +0300)] 
lib: Added i_unlink() and i_unlink_if_exists()
These log the error message on a failed unlink(). They also include the
source code file and line number to make it easier to find which unlink()
actually failed if the path itself doesn't already clearly identify it.
This can be especially useful if the path is (null), "" or contains some
corrupted garbage.

10 years agolib-storage: Mailbox deletion shouldn't fail when trying to delete read-only attributes.
Timo Sirainen [Tue, 8 Sep 2015 15:45:57 +0000 (18:45 +0300)] 
lib-storage: Mailbox deletion shouldn't fail when trying to delete read-only attributes.

10 years agolib-storage: Use MAIL_ERROR_NOTPOSSIBLE if mailbox_attribute_*set() fails for read...
Timo Sirainen [Tue, 8 Sep 2015 15:45:28 +0000 (18:45 +0300)] 
lib-storage: Use MAIL_ERROR_NOTPOSSIBLE if mailbox_attribute_*set() fails for read-only attribute.
MAIL_ERROR_PARAMS indicates that there was something wrong with the
parameters itself. But the caller can't know (at least with current APIs)
if it's a read-only attribute it's trying to change before actually doing it.

10 years agolib-storage: If mail_attribute_dict is set, ignore non-authority rank internal attrib...
Timo Sirainen [Tue, 8 Sep 2015 10:41:21 +0000 (13:41 +0300)] 
lib-storage: If mail_attribute_dict is set, ignore non-authority rank internal attributes.
This way dsync can still sync things like Sieve scripts, but it doesn't
attempt to sync anything that actually requires dict.

10 years agoexample-config: 10-mail.conf: Added example configuration for the new settings relati...
Stephan Bosch [Tue, 8 Sep 2015 10:30:21 +0000 (13:30 +0300)] 
example-config: 10-mail.conf: Added example configuration for the new settings relating to IMAP METADATA.

10 years agoexample-config: Added more detailed documentation for mailbox settings.
Stephan Bosch [Tue, 8 Sep 2015 10:27:41 +0000 (13:27 +0300)] 
example-config: Added more detailed documentation for mailbox settings.

10 years agolib: strnum: Fixed test suite failure on 32 bit systems.
Stephan Bosch [Tue, 8 Sep 2015 10:26:38 +0000 (13:26 +0300)] 
lib: strnum: Fixed test suite failure on 32 bit systems.

10 years agoacl: Log which ACL groups are enabled with mail_debug=yes
Timo Sirainen [Tue, 8 Sep 2015 10:18:58 +0000 (13:18 +0300)] 
acl: Log which ACL groups are enabled with mail_debug=yes

10 years agolib-charset: Fixed assert-crash with some iconv() versions.
Timo Sirainen [Tue, 8 Sep 2015 10:07:59 +0000 (13:07 +0300)] 
lib-charset: Fixed assert-crash with some iconv() versions.
Older glibc iconv() versions seem to skip over invalid characters, at least
with some charsets, while newer versions don't. We were assuming that the
skipping never happened, so if the invalid character was at the end of the
string we could have wrapped size to (size_t)-1 and caused a crash later on.

10 years agoimap: METADATA: Implemented mailbox and server comment entries and the server admin...
Stephan Bosch [Sat, 25 Apr 2015 09:42:06 +0000 (11:42 +0200)] 
imap: METADATA: Implemented mailbox and server comment entries and the server admin entry.

10 years agoimap: Implemented /private/specialuse METADATA entry for SPECIAL-USE capability.
Stephan Bosch [Sat, 25 Apr 2015 09:42:06 +0000 (11:42 +0200)] 
imap: Implemented /private/specialuse METADATA entry for SPECIAL-USE capability.

10 years agolib: Added some tests for the new strnum _hex() and _oct() function variants.
Stephan Bosch [Mon, 7 Sep 2015 22:27:18 +0000 (01:27 +0300)] 
lib: Added some tests for the new strnum _hex() and _oct() function variants.

10 years agolib: Added assert to Solaris sendfile() return value.
Timo Sirainen [Mon, 7 Sep 2015 22:20:51 +0000 (01:20 +0300)] 
lib: Added assert to Solaris sendfile() return value.

10 years agodoveadm: Fixed hiding titles' tabs with tab formatter (-h -f tab)
Timo Sirainen [Mon, 7 Sep 2015 21:51:30 +0000 (00:51 +0300)] 
doveadm: Fixed hiding titles' tabs with tab formatter (-h -f tab)

10 years agoMake static analyzer happier.
Timo Sirainen [Mon, 7 Sep 2015 21:46:11 +0000 (00:46 +0300)] 
Make static analyzer happier.

10 years agolib-charset: Added more asserts to checking iconv() results.
Timo Sirainen [Mon, 7 Sep 2015 21:34:14 +0000 (00:34 +0300)] 
lib-charset: Added more asserts to checking iconv() results.

10 years agolib-charset: Updated test-charset unit test to check for iconv() E2BIG result
Timo Sirainen [Mon, 7 Sep 2015 21:33:21 +0000 (00:33 +0300)] 
lib-charset: Updated test-charset unit test to check for iconv() E2BIG result

10 years agolib-storage: Mailbox list notifications didn't work for INBOX.
Timo Sirainen [Mon, 7 Sep 2015 21:07:55 +0000 (00:07 +0300)] 
lib-storage: Mailbox list notifications didn't work for INBOX.
Because of some earlier optimizations that changes to INBOX aren't written
to dovecot.list.index.log file.

10 years agoMailbox list notify API changed to return multiple events at once.
Timo Sirainen [Mon, 7 Sep 2015 20:55:31 +0000 (23:55 +0300)] 
Mailbox list notify API changed to return multiple events at once.
This fixes some issues where a single event could actually trigger multiple
different kinds of events.

10 years agoimap: NOTIFY (SUBSCRIPTIONS) assert-crashed when subscriptions hadn't been refreshed.
Timo Sirainen [Mon, 7 Sep 2015 20:08:44 +0000 (23:08 +0300)] 
imap: NOTIFY (SUBSCRIPTIONS) assert-crashed when subscriptions hadn't been refreshed.

10 years agoVarious passthrough istreams didn't preserve readable_fd.
Timo Sirainen [Mon, 7 Sep 2015 19:35:30 +0000 (22:35 +0300)] 
Various passthrough istreams didn't preserve readable_fd.

10 years agolib: Fix hang in safe_sendfile on SmartOS
Sebastian Wiedenroth [Thu, 16 Jul 2015 12:41:24 +0000 (14:41 +0200)] 
lib: Fix hang in safe_sendfile on SmartOS
The call to sendfile on SmartOS can fail with EOPNOTSUPP. This is a valid
error code and documented in the man page. This error code needs to be
handled or else dovecot will retry the sendfile call endlessly and hang.

10 years agoimap: Fixed assert-crash in NOTIFY when using multiple namespaces.
Timo Sirainen [Mon, 7 Sep 2015 19:14:18 +0000 (22:14 +0300)] 
imap: Fixed assert-crash in NOTIFY when using multiple namespaces.
I'm not sure why the original code was trying to add it to multiple
namespaces. A single mailbox name should be matching only a single
namespace (visible one at least). In any case we can't use
mail_namespace_find() with only partial namespaces-list, because it'll
assert-crash if it can't find a namespace for the mailbox.

10 years agolib-storage: Fixed assert-crash when reading binary streams.
Timo Sirainen [Mon, 7 Sep 2015 19:06:16 +0000 (22:06 +0300)] 
lib-storage: Fixed assert-crash when reading binary streams.

10 years agodoveadm: Added new "auth login" command to simulate an actual client login.
Timo Sirainen [Mon, 7 Sep 2015 18:54:20 +0000 (21:54 +0300)] 
doveadm: Added new "auth login" command to simulate an actual client login.
This performs both passdb and userdb lookups and prints their results.

10 years agoauth: If userdb lookup was found from auth cache, don't clear the earlier userdb...
Timo Sirainen [Mon, 7 Sep 2015 18:24:01 +0000 (21:24 +0300)] 
auth: If userdb lookup was found from auth cache, don't clear the earlier userdb fields.

10 years agoauth: If multiple userdbs are used, default_fields was ignored for all but the first...
Timo Sirainen [Mon, 7 Sep 2015 18:02:51 +0000 (21:02 +0300)] 
auth: If multiple userdbs are used, default_fields was ignored for all but the first one.

10 years agodirector: Added director_user_kick_delay setting.
Timo Sirainen [Mon, 7 Sep 2015 17:24:25 +0000 (20:24 +0300)] 
director: Added director_user_kick_delay setting.
This replaces the hardcoded 2 seconds delay. This setting specifies how long
to wait for after user has been kicked from all directors before letting the
user login to the new server. This timeout should be large enough that the
user's existing processes in the old backend should be finished.

10 years agologin proxy: Added delayed disconnection of clients on server mass-disconnect.
Timo Sirainen [Mon, 7 Sep 2015 15:50:24 +0000 (18:50 +0300)] 
login proxy: Added delayed disconnection of clients on server mass-disconnect.
login_proxy_max_disconnect_delay setting (default 0 = disabled) controls for
how long time period the disconnections are spread to. The idea behind this
is to avoid load spikes due to client reconnections when a backend server
dies or is restarted.

10 years agoauth: Ignore first passdbs that contain skip=unauthenticated.
Timo Sirainen [Mon, 7 Sep 2015 14:10:19 +0000 (17:10 +0300)] 
auth: Ignore first passdbs that contain skip=unauthenticated.
They can never match anything.

10 years agolib-storage: Added mailbox_attribute_register_internals()
Timo Sirainen [Mon, 7 Sep 2015 13:39:28 +0000 (16:39 +0300)] 
lib-storage: Added mailbox_attribute_register_internals()
Just for making it easier to register multiple attributes.

10 years agolib-storage: Allow MAIL_ATTRIBUTE_INTERNAL_RANK_DEFAULT to use get=NULL
Timo Sirainen [Mon, 7 Sep 2015 13:23:40 +0000 (16:23 +0300)] 
lib-storage: Allow MAIL_ATTRIBUTE_INTERNAL_RANK_DEFAULT to use get=NULL
This is useful for registering internal attributes whose only purpose is to
be able to set/get them via dict. (Because normally the dict access would be
denied completely.)

10 years agolib-storage: Allow set/get for Dovecot-private attributes via internal attributes.
Timo Sirainen [Mon, 7 Sep 2015 13:22:11 +0000 (16:22 +0300)] 
lib-storage: Allow set/get for Dovecot-private attributes via internal attributes.
This allows registering attributes with MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT
prefix and having them be get/set via dict, instead of failing them.

10 years agolib-storage: Added MAIL_ATTRIBUTE_INTERNAL_FLAG_CHILDREN
Timo Sirainen [Mon, 7 Sep 2015 13:38:24 +0000 (16:38 +0300)] 
lib-storage: Added MAIL_ATTRIBUTE_INTERNAL_FLAG_CHILDREN
This also adds the key to get() and set() functions, so they can know
exactly what key is wanted to be accessed.

10 years agomail-storage: Added registration API for builtin mailbox attributes.
Stephan Bosch [Sat, 25 Apr 2015 09:42:06 +0000 (11:42 +0200)] 
mail-storage: Added registration API for builtin mailbox attributes.

10 years agolib-storage: mail_user_init() wasn't always expanding %h correctly to settings.
Timo Sirainen [Mon, 7 Sep 2015 12:07:55 +0000 (15:07 +0300)] 
lib-storage: mail_user_init() wasn't always expanding %h correctly to settings.
This mainly affected users autocreated for accessing shared mailboxes.

10 years agolib-storage: Updated MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE() to not allow private...
Timo Sirainen [Mon, 7 Sep 2015 12:06:40 +0000 (15:06 +0300)] 
lib-storage: Updated MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE() to not allow private server attributes.

10 years agodovecot.m4: Added LIBDOVECOT_ACL_INCLUDE
Timo Sirainen [Mon, 7 Sep 2015 11:16:39 +0000 (14:16 +0300)] 
dovecot.m4: Added LIBDOVECOT_ACL_INCLUDE

10 years agoauth: Fixed passdb skip_password_check / result_success=continue-fail handling
Timo Sirainen [Mon, 7 Sep 2015 11:08:52 +0000 (14:08 +0300)] 
auth: Fixed passdb skip_password_check / result_success=continue-fail handling
If passdb returned success, but result_success=continue-fail, it means that
the authentication didn't succeed. So we still want to check the password
again and in general treat the request as unauthenticated (especially for
the passdb { skip } setting).

So the current logic means that there are 2 ways for the request to be
treated as authenticated and skipping any password checking:

1) passdb lookup succeeding, with result_success=continue, continue-ok,
return or return-ok

2) passdb lookup not succeeding, with result_failure=continue-ok or
return-ok

It's a bit questionable though if 2) should be allowed.

10 years agoimap: Don't allow IMAP METADATA to access Dovecot's private server attributes.
Timo Sirainen [Mon, 7 Sep 2015 10:40:41 +0000 (13:40 +0300)] 
imap: Don't allow IMAP METADATA to access Dovecot's private server attributes.

10 years agoauth: Aborting auth request didn't abort a pending proxy DNS lookup.
Timo Sirainen [Mon, 7 Sep 2015 08:40:08 +0000 (11:40 +0300)] 
auth: Aborting auth request didn't abort a pending proxy DNS lookup.

10 years agolib-storage: Store pointer to mail_storage_service_user to mail_user if it exists.
Timo Sirainen [Sun, 6 Sep 2015 19:28:07 +0000 (22:28 +0300)] 
lib-storage: Store pointer to mail_storage_service_user to mail_user if it exists.

10 years agolib-storage: Added mail_storage_service_user_get_service_ctx()
Timo Sirainen [Sun, 6 Sep 2015 19:27:29 +0000 (22:27 +0300)] 
lib-storage: Added mail_storage_service_user_get_service_ctx()

10 years agoacl: Install most of the header files.
Timo Sirainen [Fri, 4 Sep 2015 10:00:25 +0000 (13:00 +0300)] 
acl: Install most of the header files.

10 years agoacl: acl_object_list_next() should return -1 if acl refreshing failed earlier.
Timo Sirainen [Fri, 4 Sep 2015 10:00:14 +0000 (13:00 +0300)] 
acl: acl_object_list_next() should return -1 if acl refreshing failed earlier.

10 years agodsync: If remote disconnects, log the last sent/recv state.
Timo Sirainen [Fri, 4 Sep 2015 08:21:39 +0000 (11:21 +0300)] 
dsync: If remote disconnects, log the last sent/recv state.

10 years agodsync: If we disconnect with I/O timeout, log the last sent/recv state.
Timo Sirainen [Fri, 4 Sep 2015 08:17:30 +0000 (11:17 +0300)] 
dsync: If we disconnect with I/O timeout, log the last sent/recv state.

10 years agologin proxy: Code cleanup - separate login_proxy_free_final()
Timo Sirainen [Thu, 3 Sep 2015 22:23:28 +0000 (01:23 +0300)] 
login proxy: Code cleanup - separate login_proxy_free_final()

10 years agologin proxy: Always keep proxy->state_rec available.
Timo Sirainen [Thu, 3 Sep 2015 22:21:28 +0000 (01:21 +0300)] 
login proxy: Always keep proxy->state_rec available.

10 years agologin proxy: Added asserts to track that num_waiting_connections are correct.
Timo Sirainen [Thu, 3 Sep 2015 22:18:04 +0000 (01:18 +0300)] 
login proxy: Added asserts to track that num_waiting_connections are correct.

10 years agologin proxy: Small code cleanup
Timo Sirainen [Thu, 3 Sep 2015 22:10:29 +0000 (01:10 +0300)] 
login proxy: Small code cleanup

10 years agodsync: Assert-crashfix
Timo Sirainen [Thu, 3 Sep 2015 19:12:14 +0000 (22:12 +0300)] 
dsync: Assert-crashfix
Fixes:

Panic: file mail-storage.c: line 1897 (mailbox_save_alloc): assertion
failed: (!ctx->unfinished)

10 years agocassandra: Handle async queries internally - don't use sql pooling code.
Timo Sirainen [Thu, 3 Sep 2015 18:37:09 +0000 (21:37 +0300)] 
cassandra: Handle async queries internally - don't use sql pooling code.
There's no need to create multiple Cassandra instances, since the single
instance is capable of doing multiple asynchronous requests in parallel.

10 years agolib-storage: Another fix to using index_storage_mailbox_close() without an opened...
Timo Sirainen [Thu, 3 Sep 2015 17:55:18 +0000 (20:55 +0300)] 
lib-storage: Another fix to using index_storage_mailbox_close() without an opened view.
Calling mail_index_close() without mail_index_open() caused it to
assert-crash.

10 years agodict: Various reference counting and other fixes related to using freed memory.
Timo Sirainen [Thu, 3 Sep 2015 17:54:27 +0000 (20:54 +0300)] 
dict: Various reference counting and other fixes related to using freed memory.

10 years agodsync: Crashfix in certain situation.
Timo Sirainen [Thu, 3 Sep 2015 16:59:16 +0000 (19:59 +0300)] 
dsync: Crashfix in certain situation.

10 years agolib-storage: Allow index_storage_mailbox_close() to be called without an opened view.
Timo Sirainen [Thu, 3 Sep 2015 16:58:39 +0000 (19:58 +0300)] 
lib-storage: Allow index_storage_mailbox_close() to be called without an opened view.
Some failing mailbox_open() call may leave it in such a state.

10 years agodoveadm director update command added.
Timo Sirainen [Thu, 3 Sep 2015 13:04:26 +0000 (16:04 +0300)] 
doveadm director update command added.
The difference to "doveadm director add" is that if the IP doesn't already
exist, it's not added.

10 years agoRemoved SET_IN_PORT_ZERO - SET_IN_PORT now always allows zeros as well.
Timo Sirainen [Thu, 3 Sep 2015 11:10:36 +0000 (14:10 +0300)] 
Removed SET_IN_PORT_ZERO - SET_IN_PORT now always allows zeros as well.
A zero in all the port settings means that the port is disabled, which is
also the default. So it shouldn't be an error to explicitly set it to zero
in the config file.

10 years agolib: strnum - simplify hex and oct overflow code
Phil Carmody [Thu, 3 Sep 2015 11:01:57 +0000 (14:01 +0300)] 
lib: strnum - simplify hex and oct overflow code
uintmax_t is defined to have modulo-2^n semantics, and therefore the bottom
bits of (uintmax_t) are guaranteed to be all set. Therefore the checking of
the next character read is unnecessary, as it's already done in the loop
control statement itself. (This is not true about the bottom digit base 10,
which is why the check remains in the decimal case)

Signed-off-by: Phil Carmody <phil@dovecot.fi>
10 years agoman: doveadm-sync.1: Added description for option `-T secs'.
Pascal Volk [Mon, 31 Aug 2015 22:31:19 +0000 (22:31 +0000)] 
man: doveadm-sync.1: Added description for option `-T secs'.

10 years agodict-sql: Fixed iteration with blob fields.
Timo Sirainen [Wed, 2 Sep 2015 17:30:07 +0000 (20:30 +0300)] 
dict-sql: Fixed iteration with blob fields.

10 years agodict-sql: Implemented support for binary fields.
Timo Sirainen [Wed, 2 Sep 2015 16:46:36 +0000 (19:46 +0300)] 
dict-sql: Implemented support for binary fields.
Example:

map {
  pattern = shared/blobtest/$key
  table = blobtest
  value_field = value
  value_hexblob = yes

  fields {
    key = ${hexblob:key}
  }
}

Now you can access both field and value as hex data. For example:

doveadm dict set proxy::sqldict shared/blobtest/746573746b6579 7465737476616c7565

This adds "testkey" and "testvalue" to key and value fields blobs.

10 years agolib-sql: Implemented sql_escape_blob()
Timo Sirainen [Wed, 2 Sep 2015 16:43:26 +0000 (19:43 +0300)] 
lib-sql: Implemented sql_escape_blob()

10 years agocassandra: Implemented support for binary values.
Timo Sirainen [Wed, 2 Sep 2015 16:42:45 +0000 (19:42 +0300)] 
cassandra: Implemented support for binary values.

10 years agodoveadm dict iter: Added -V parameter to return only keys.
Timo Sirainen [Wed, 2 Sep 2015 16:41:23 +0000 (19:41 +0300)] 
doveadm dict iter: Added -V parameter to return only keys.

10 years agodict-sql: Fixed iteration with DICT_ITERATE_FLAG_NO_VALUE
Timo Sirainen [Wed, 2 Sep 2015 16:38:35 +0000 (19:38 +0300)] 
dict-sql: Fixed iteration with DICT_ITERATE_FLAG_NO_VALUE