Timo Sirainen [Wed, 20 Mar 2013 15:43:32 +0000 (17:43 +0200)]
lib-storage: mailbox_rename() shouldn't require source mailbox to exist.
\Noselect mailboxes may not exist. The nonexistence will be noticed
eventually in the backend code.
Timo Sirainen [Tue, 19 Mar 2013 11:34:12 +0000 (13:34 +0200)]
lib-storage: mailbox_attribute_set() now uses struct mail_attribute_value.
This allows settig the last_change value, as well as using streams and
setting other flags in future.
Timo Sirainen [Tue, 19 Mar 2013 09:42:51 +0000 (11:42 +0200)]
Moved ssl_client_ca_dir and ssl_crypto_device to mail_storage_settings.
Probably could also be moved to master_service_settings, but that makes
accessing them a bit more tricky with the current code.
Timo Sirainen [Mon, 18 Mar 2013 19:31:34 +0000 (21:31 +0200)]
ldap auth: "!ldapField" now requests the given field, but doesn't return it directly.
It's only useful for listing fields that %{ldap_ptr} can potentially access.
This first does the regular lookup, and then does another lookup using
mailDN's value as the new lookup's base. The other lookup's filter is
currently hardcoded to "no filter".
Timo Sirainen [Mon, 18 Mar 2013 13:47:14 +0000 (15:47 +0200)]
istream-qp-decoder: Fixed assert-crashing with buffer size allocations.
The original implementation was copy&pasted from istream-base64-decoder
without enough thinking..
Timo Sirainen [Thu, 14 Mar 2013 13:41:39 +0000 (15:41 +0200)]
acl: Added ACL checks for attributes. Added ACL <-> mailbox attribute mapping.
The ACL checks will be useful once IMAP METADATA extension is finished. The
mapping is used by dsync to sync ACLs via generic attribute syncing.
Timo Sirainen [Thu, 14 Mar 2013 13:32:14 +0000 (15:32 +0200)]
lib-storage: Changed mailbox_attribute_get/set() APIs to have a transaction and update index.
The _get() doesn't currently actually use the transaction. It was mainly put
there for future use where it could be useful. It's also possible that
_iter() will need a transaction also. For now these decisions seem good
enough.
Timo Sirainen [Thu, 14 Mar 2013 13:29:18 +0000 (15:29 +0200)]
lib-index: mail_index_attribute_[un]set() adds changed attributes' keys to transaction log.
This provides them both a modseq (so their changes become visible) as well
as an efficient way to see what attributes have changed by reading the
transaction log. The values themselves aren't written to the log, because
they could be large.
Timo Sirainen [Wed, 13 Mar 2013 20:11:39 +0000 (22:11 +0200)]
iostreams: Added close_parent flag to close() handler and clarified close/destroy APIs.
This makes it unambiguous how things work: Unless you explicitly call
[io]_stream_close(), the parent streams won't be closed. This is what most
(hopefully all!) of the existing code expects.
I was wondering a bit if [io]_stream_destroy() should simply have been
removed and replaced with [io]_stream_unref() calls, since they would have
worked basically everywhere, but there might be some places where it's
better to have explicitly closed the stream (and where closing the parent
stream doesn't matter).
Timo Sirainen [Sun, 10 Mar 2013 17:54:51 +0000 (19:54 +0200)]
lib-http: If host can't be connected to, don't keep retrying with more than one connection.
This also fixes infinitely trying to reconnect to host and retry.
Timo Sirainen [Tue, 5 Mar 2013 19:44:07 +0000 (21:44 +0200)]
lib-http: Avoid hanging on urgent requests.
Patch by Timo & Stephan. There are still some problems though, all urgent
requests don't seem to get a new connection.
Timo Sirainen [Tue, 26 Feb 2013 15:18:18 +0000 (17:18 +0200)]
istream-seekable: Don't forcibly close underlying streams when stream is destroyed.
The underlying streams may still have references and be reused for other
purposes.
Timo Sirainen [Tue, 26 Feb 2013 13:55:16 +0000 (15:55 +0200)]
lib-http: Track peers using a linked list also.
Mainly because this makes it much easier to debug using gdb. The overhead
isn't that much extra either.
Timo Sirainen [Tue, 26 Feb 2013 11:03:30 +0000 (13:03 +0200)]
lib-http: Track list of hosts using a linked list also.
http_client_switch_ioloop() is done very often, and scanning a few entries
in a linked list is much faster than going through a hash table.
Timo Sirainen [Tue, 26 Feb 2013 09:30:11 +0000 (11:30 +0200)]
lib-storage: Write dovecot.mailbox.log entries using virtual names, not storage names.
This file is used only by dsync, and the new dsync design uses only virtual
names everywhere. This of course means that now it's not easily possible to
use different virtual names for the same user, but nobody really did that
before anyway. The only other fully working solution would be to send both
the virtual and the storage names in dsync, but that's a bit of a waste.