Timo Sirainen [Mon, 19 Oct 2015 10:49:54 +0000 (13:49 +0300)]
director: Remember backends' hostnames and send them in login reply.
This allows login processes to verify the remote server's hostname in SSL
certificate.
Timo Sirainen [Fri, 18 Aug 2017 08:51:36 +0000 (11:51 +0300)]
director: Run director/host changing doveadm commands only after ring is synced
If the ring sync is still pending, the doveadm command may become reverted.
This doesn't fully prevent problems caused by sending doveadm commands
simultaneously to multiple directors, but it should prevent issues when
only a single director is used for doveadm commands.
It would have been nice to enable this also for HOST/DIRECTOR-LIST commands,
but they don't support returning a ring timeout error without changing the
protocol. It's a bit too much effort to change that for now.
Timo Sirainen [Wed, 13 Sep 2017 12:16:59 +0000 (15:16 +0300)]
cassandra: Fix paged queries to work again
When continuing the result, consistency was reset to 0 (=ANY), which caused
the queries to fail. There's no need to initialize the statement again when
continuing it. Also set result->consistency to be correct mainly for
debugging purposes.
Timo Sirainen [Thu, 24 Aug 2017 08:13:32 +0000 (11:13 +0300)]
cassandra: sql_transaction_commit_s() - Set query_type correctly
The queries were all sent with READ type instead of WRITE/DELETE. This
meant they were using potentially wrong consistency values. Although
synchronous commits aren't actually used anywhere, so this practically
this doesn't fix anything right now.
Timo Sirainen [Thu, 7 Sep 2017 12:40:16 +0000 (15:40 +0300)]
dict-sql: Use prepared statements
Create a hash table of query template -> prepared statement and fill it out
as needed. This could have been done some alternative ways that wouldn't
require building the string first, but this should still be fast enough and
much easier to implement.
Timo Sirainen [Tue, 15 Aug 2017 13:50:16 +0000 (16:50 +0300)]
dict-sql: Cleanup - Remove unnecessary code
The values are explicitly added to params. sql_dict_update_query() doesn't
add them again. Since the "diff" parameter is already a long long type,
this avoids unnecessary conversion to string and back.
Timo Sirainen [Tue, 15 Aug 2017 11:27:40 +0000 (14:27 +0300)]
dict-sql: Change "uint" type to mean 64bit instead of 32bit integer.
This is likely what is usually wanted (especially in e.g. quotas).
If someone actually wants it to be restricted to 32bit, we could add
uint32 later on.
Timo Sirainen [Mon, 18 Sep 2017 20:04:55 +0000 (23:04 +0300)]
notify-status: Remove first_unseen_seq field
The sequence number keeps changing, so it's very unlikely to be useful.
It's also not always as efficiently available as the other fields, so
better to avoid having it.
Aki Tuomi [Tue, 4 Jul 2017 11:22:19 +0000 (14:22 +0300)]
notify-status: Add notify-status plugin
This enables updating a dictionary with mailbox
status information when the mailbox changes.
It requires notify_status_dict setting for specifying
the dict where the data is stored.
One can optionally use notify_status_mailbox patterns
for specifying which box(es) the status update is done.
Subsequent patterns are notify_status_mailbox2 and so forth.
One can also specify data format using notify_status_value
plugin setting.
Timo Sirainen [Fri, 14 Jul 2017 14:00:21 +0000 (17:00 +0300)]
master: Change service "connections are being dropped" warning interval to 1 second
When this is happening, it's often accompanied with all kinds of other errors and
these warnings drown in them. Make them easier to notice by reducing the interval
from 60 seconds to 1 second.
Timo Sirainen [Thu, 10 Aug 2017 14:50:04 +0000 (17:50 +0300)]
director: Make sure users gets expired even on an idle director
Normally expiring gets done while looking up users, but if nothing is doing
that on an idle director the users won't get expired. This can cause confusion
in "doveadm director status" output.
Timo Sirainen [Mon, 11 Sep 2017 09:27:17 +0000 (12:27 +0300)]
lib-storage: Fix mailbox list notification assert-crash when mailbox is deleted
Reproduced with if IMAP NOTIFY is used for non-selected mailboxes without
MailboxName being specified. Another session then does changes to a
mailbox and immediately deletes it, which causes the crash.
Fixes:
Panic: file mailbox-list-index-notify.c: line 751: unreached
Timo Sirainen [Mon, 21 Aug 2017 12:11:30 +0000 (15:11 +0300)]
lib-storage: Fix error logging after mail_storage_set_internal_error()
The function doesn't actually set the last_internal_error and it also
doesn't update last_error_is_internal, so calling
mail_storage_get_last_internal_error() afterwards could be returning an
error for some different older error.
Since there's no parameter to set the internal error string, just reset
last_error_is_internal=FALSE.
Timo Sirainen [Fri, 8 Sep 2017 09:20:21 +0000 (12:20 +0300)]
lib-storage: Preserve messages' vsize record when rebuilding index
Since vsize is often used by quota, losing this can be very expensive.
If the vsize is wrong, it gets fixed automatically when fetching the
message body.
Timo Sirainen [Fri, 25 Aug 2017 12:12:06 +0000 (15:12 +0300)]
lib-index: Avoid opening .log.2 file if .log was reset
After a reset there's no point in trying to read the older log files.
This avoids trying to open .log.2 at least for newly created mailboxes
when trying to lookup log file sequence 1 (since due to some bug/feature
the log files start from sequence 2).
Without this fix, if the new message does not contain a from, a subject, and
a snippet the generated JSON will be malformed (the status check at the end
appended a '"' when it shouldn't have).
Timo Sirainen [Mon, 4 Sep 2017 16:37:12 +0000 (19:37 +0300)]
pop3-migration: Fail if all IMAP mails were matched by size, but POP3 had extra mails
This makes the handling same as what happens when the same situation happens
and the last mails were matched by headers. That's an error, unless
pop3_migration_ignore_*_uidls=yes.