Timo Sirainen [Wed, 14 Oct 2015 14:34:23 +0000 (17:34 +0300)]
dsync: If rename algorithm seems go to an infinite loop, log an error and stop.
Ideally we would of course fix the algorithm (especially to not require this
kind of looping).
Timo Sirainen [Wed, 14 Oct 2015 14:28:11 +0000 (17:28 +0300)]
imap/pop3-login: If LOGIN/USER is used with plaintext auth disabled, remember the username for logging.
It's still useful to see the username that was sent in the logout message.
This won't work for AUTHENTICATE PLAIN, but hopefully the clients that use
it understand the LOGINDISABLED capability better.
Timo Sirainen [Wed, 14 Oct 2015 11:06:35 +0000 (14:06 +0300)]
cassandra: Added read/write/delete_fallback_consistency settings.
The fallback is attempted if the primary consistency can't be satisfied.
One useful use case for this is to have:
Which means that during regular operation all writes go to all data centers
before they are finished, but if one of the data centers go down we'll
switch to just waiting for local data center writes to finish.
Timo Sirainen [Tue, 13 Oct 2015 18:21:48 +0000 (21:21 +0300)]
auth ldap: If tls_* settings are used, pass them to LDAP library even if tls=no
Most importantly this allows using the settings for ldaps URLs. And they
hopefully won't hurt anything if neither STARTTLS nor ldaps are used.
Timo Sirainen [Mon, 12 Oct 2015 12:47:46 +0000 (15:47 +0300)]
director: Detect if directors' hosts have become desynced by sending hosts_hash in SYNC parameter.
Also fix up such a situation by resending all HOSTs.
Timo Sirainen [Sat, 10 Oct 2015 15:32:06 +0000 (18:32 +0300)]
director: Don't become desynced if two directors change the same backend in incompatible ways.
This would have caused "User hash .. is being redirected to two hosts"
errors, which wouldn't easily go away as the directors have a different view
of what hosts currently exist.
Timo Sirainen [Tue, 6 Oct 2015 15:17:45 +0000 (18:17 +0300)]
lib-http: Minor improvement to "disconnected during payload read" error message.
The same error is also used for http-server for parsing client input, so the
message shouldn't say anything about reading the input from server.
Timo Sirainen [Sun, 4 Oct 2015 18:51:55 +0000 (21:51 +0300)]
lib-index: Fixed checking when we want to update dovecot.index
This has been broken since 76f576fc28dc. After that dovecot.index was
usually updated only when dovecot.index.log was being rotated.
Timo Sirainen [Sun, 4 Oct 2015 18:49:08 +0000 (21:49 +0300)]
lib-index: When writing new index, rotate the log file first before writing it.
This way the index contains the new log's seq+offset instead of having to
recreate the index almost immediately afterwards.
Timo Sirainen [Fri, 2 Oct 2015 15:30:22 +0000 (18:30 +0300)]
pop3: Fixed buffer overflow with handling pop3_deleted_flag setting.
This has been broken since v2.2.10, although the setting wasn't working
completely correctly before that version either. Afterwards it should have
become obvious quickly enough that the setting is broken, because it started
crashing POP3 sessions in normal use quite soon. So I doubt there are any
installations that are accidentally exploitable.
Timo Sirainen [Fri, 2 Oct 2015 08:13:14 +0000 (11:13 +0300)]
push-notification: Removed optimization to init drivers only once.
Different users may have different drivers. And the previous
metadata-caching change especially isn't working without this change.
Timo Sirainen [Thu, 1 Oct 2015 10:45:17 +0000 (13:45 +0300)]
push-notification: Allow OX driver to use "user" from METADATA only if user_from_metadata is set.
Otherwise users could send push-notifications to each others' if
imap_metadata=yes.
Timo Sirainen [Mon, 28 Sep 2015 20:39:31 +0000 (23:39 +0300)]
lib: s/EDEADLOCK/EDEADLK/
It felt wrong since the beginning, but my first attempt at EDEADLCK didn't
work and EDEADLOCK did. Of course, not everywhere.
Timo Sirainen [Mon, 28 Sep 2015 13:15:00 +0000 (16:15 +0300)]
virtual plugin: Fixed assert-crash on mailbox_status() if virtual mailbox wasn't opened yet.
We no longer require that mailboxes must not be auto-opened.
Timo Sirainen [Mon, 28 Sep 2015 10:54:28 +0000 (13:54 +0300)]
lib-http: Added asserts to all refcount increments.
These could catch situations where an already freed object's refcount is
attempted to be increased.
Timo Sirainen [Mon, 28 Sep 2015 09:33:33 +0000 (12:33 +0300)]
quota: Avoid crash in quota_root_iter_init() if mailbox has no quota enabled.
This allows quota_get_mail_user_quota() to be called even when quota doesn't
exist. Cleaned up all the code using it to now check for the NULL result.
Timo Sirainen [Sun, 27 Sep 2015 18:25:59 +0000 (21:25 +0300)]
*-login: Session ID generator wasn't encoding remote port number correctly to it.
The upper 8bits of the port number were always written as 0.
This could have lead to duplicate session ID strings in some rare cases.
Found by Coverity.
Timo Sirainen [Sun, 27 Sep 2015 17:46:29 +0000 (20:46 +0300)]
Fixed compiler warnings in some systems.
major() and minor() are unsigned ints nowadays, but in Solaris it's major_t.
Cast them explicitly to avoid compiler warnings, and use unsigned longs
instead of unsigned ints just in case.
Timo Sirainen [Sun, 27 Sep 2015 15:58:08 +0000 (18:58 +0300)]
lib-http: Removed "pure" attribute from http_header_field_find_unique().
It's a bit questionable if returning a pointer via parameter is allowed for
a pure function. Also having this attribute seems to confuse clang static
analyzer, because it gives false positives for code using
http_header_field_find_unique(). It's not important for performance anyway,
so better to avoid using it.
Timo Sirainen [Thu, 24 Sep 2015 16:27:10 +0000 (19:27 +0300)]
virtual plugin: Auto-close mailboxes by hooking into backend's mailbox_open()
This is a more reliable way of doing it. The earlier version had problems
that all the backend mailboxes could be opened when doing a search on the
virtual mailbox (for getting the GUID of the mailboxes).
Timo Sirainen [Thu, 24 Sep 2015 13:30:23 +0000 (16:30 +0300)]
indexer: Use a slightly different session ID than the session that requested indexing.
Required to avoid "duplicate session ID" errors in stats process.
Alternative would have been to change the stats protocol a bit and always
send the service name along with session ID, and use those two together as
the primary key. Maybe this could be done in future if we get more of these
kind of processes.
Timo Sirainen [Thu, 24 Sep 2015 13:16:43 +0000 (16:16 +0300)]
doveconf: Unless -P parameter is used, hide all keys ending with "_password"
A little bit ugly way, but implementing a proper SET_PASSWORD type was
getting too difficult with the current config code. Then again as a bonus
this also hides plugin { *_password } settings, if there are any, which
wouldn't have been possible with SET_PASSWORD.