Timo Sirainen [Thu, 21 Oct 2010 17:49:19 +0000 (18:49 +0100)]
dbox: Reverted the "check if altpath is mounted" change for now.
If alt path didn't yet exist, it reported bogus errors. It should somehow
check if there is anything under the alt root dir.
Timo Sirainen [Thu, 21 Oct 2010 15:33:28 +0000 (16:33 +0100)]
dbox: If alt path is lost, fail with an error rather than rebuilding indexes.
This could be simply because alt storage is unmounted at the time and
rebuilding would just lose messages. If this error happens unintentionally,
it's still possible to fix it with "doveadm force-resync".
Timo Sirainen [Wed, 20 Oct 2010 17:55:36 +0000 (18:55 +0100)]
lib-storage: Added istream_opened() method to struct mail.
This can be hooked into by plugins that want to do something with the
message's stream in the message file, rather than the virtual resulting
stream visible to client. For example when using dbox attachments, this stream
contains only the data in the dbox files without any external attachments.
Timo Sirainen [Wed, 20 Oct 2010 15:03:13 +0000 (16:03 +0100)]
lib-storage: mailbox_get_status(): return cache fields allocated from data stack.
Allocating them from mailbox's pool just wastes memory if it's called multiple
times for same mailbox.
Timo Sirainen [Fri, 15 Oct 2010 23:35:28 +0000 (00:35 +0100)]
lib-lda: Make sure duplicate_init() handles non-existent home correctly.
With previous change mail_user_get_home() always set home, but this is good
anyway.
Timo Sirainen [Fri, 15 Oct 2010 14:46:43 +0000 (15:46 +0100)]
Cleaned up log callbacks and made them more extensible.
fatal_failure_callback_t type is now gone, there's only failure_callback_t
left that has a struct pointer as parameter. More parameters can be easily
added to the struct in future.
Timo Sirainen [Fri, 15 Oct 2010 13:57:36 +0000 (14:57 +0100)]
lib-storage: Use MAIL_STORAGE_FLAG_NO_AUTOVERIFY for creating shared namespace storages.
This avoids failing storage creation for nonexistent users. Previous failure
made it possible for logged in users to figure out what other usernames
existed on the system.
Timo Sirainen [Thu, 14 Oct 2010 16:23:11 +0000 (17:23 +0100)]
lib-index: Put back some of the removed locking complexity.
This fixes a crash when mmap_disable=no and a index was mmap()ed (which
keeps the index locked) and later its read-lock was tried to be changed to
write-lock.
Timo Sirainen [Wed, 6 Oct 2010 18:19:48 +0000 (19:19 +0100)]
maildir: Write only base filenames to uidlist.
Previously the old filename was used to guess the initial filename, but
nowadays we do that by building the filename based on flags in index.
Timo Sirainen [Wed, 6 Oct 2010 17:20:26 +0000 (18:20 +0100)]
lib-index: Always update index map while committing a transaction.
The previous code was doing this only in some situations, which was probably
enough, except maybe in some special cases. The log file was also read until
EOF always anyway, so the only thing this was saving was some CPU. With the
new behavior the committing stage should be more reliable, and also makes it
easier to do changes without accidentally breaking it.
Timo Sirainen [Wed, 6 Oct 2010 16:15:51 +0000 (17:15 +0100)]
lib-index: Avoid unnecessary pread()s at end of transaction log file.
If we've already read until EOF while the file has been locked, there's no
need to do it again. Previously this worked while index was being synced,
but not while committing a transaction.
Timo Sirainen [Wed, 6 Oct 2010 16:11:52 +0000 (17:11 +0100)]
lib-index: Removed unnecessary code from lock handling.
The code was intended only for blocking write-locks, but those haven't been
used for a long time now.
Timo Sirainen [Mon, 4 Oct 2010 14:13:20 +0000 (15:13 +0100)]
imap-* plugins: Use the new imap_client_created_hook_set() to set the hook.
This avoids accessing variables directly, which allows Dovecot to give better
error messages if imap-* plugins are tried to be loaded by non-imap binary.