Timo Sirainen [Tue, 2 Oct 2012 21:41:18 +0000 (00:41 +0300)]
auth: Don't add proxy/pass fields when we're only authenticating (not logging in).
For example SMTP server doesn't need these fields when doing SMTP AUTH.
Timo Sirainen [Tue, 18 Sep 2012 16:57:48 +0000 (19:57 +0300)]
auth: userdb static used auth caching wrong when verifying user existence with passdb lookup.
Cache entries were being looked/added for userdbs instead of passdbs. This
caused problems at least with:
a) Multiple userdbs (where static userdb was the last). Passdb results were
added as cache entries to the first userdbs, possibly causing some confusion.
b) Multiple passdbs, because the first passdb result was added to cache and
used for the rest of the passdbs.
Timo Sirainen [Tue, 18 Sep 2012 15:44:46 +0000 (18:44 +0300)]
Added mailbox-alias plugin.
Aliases can be created like:
plugin {
mailbox_alias_old = Sent
mailbox_alias_new = Sent Messages
mailbox_alias_old2 = Sent
mailbox_alias_new2 = Sent Items
}
When creating an alias, the original mailbox is also created. The alias
itself is a symlink to the original. Deleting an alias deletes the symlink.
The original mailbox can't be deleted or renamed while it has aliases.
Aliases cannot be renamed. Aliases are skipped when recalculating quota.
If a mailbox with the alias's name was already created before the aliasing
was enabled, it's not treated as alias until it's first deleted.
Timo Sirainen [Tue, 18 Sep 2012 15:40:17 +0000 (18:40 +0300)]
lib-storage: MAILBOX_LIST_ITER_SKIP_ALIASES now skips also "alias symlinks"
An "alias symlink" is a symlink that points to the same directory. These can
safely be skipped when iterating through all mails in all mailboxes (unlike
other symlinks that may point to external storages).
Timo Sirainen [Tue, 11 Sep 2012 15:42:05 +0000 (18:42 +0300)]
Decrease minimum memory allocations.
This is mainly to avoid wasting settings-related memory for IMAP processes.
Probably something more radical should be done at some point.
Timo Sirainen [Thu, 27 Sep 2012 21:11:19 +0000 (00:11 +0300)]
lib-storage: Added initial implementation for layout=index.
The idea is that all of the mailbox names only exist in the mailbox list
index. Storage directories use mailbox GUIDs. This avoids all kinds of
race conditions with mailbox renames. mailbox_list_index=yes is required for
this layout to work.
There are probably still some race conditions within the indexing code
itself. Also error recovery is missing.
Timo Sirainen [Wed, 26 Sep 2012 17:50:08 +0000 (20:50 +0300)]
lib-storage: mailbox_get_path() and friends can now return an error.
An upcoming "index" mailbox_list backend uses mailbox GUIDs as the directory
names. Doing a name => GUID lookup may fail, so the path lookup may fail.
This is a somewhat annoying change and perhaps it can be removed in future,
but for now it looks like it can't be avoided.
Timo Sirainen [Tue, 25 Sep 2012 21:35:10 +0000 (00:35 +0300)]
lib-storage: Removed mailbox_list.create_mailbox_dir() virtual function.
It really didn't need to be virtual. Some storages didn't care about it,
others wanted it to work basically the same.
Timo Sirainen [Tue, 25 Sep 2012 20:38:14 +0000 (23:38 +0300)]
lib-storage: Create "maildirfolder" file only with maildir storage.
Previously it was created for all storages, as long as they used
LAYOUT=maildir++. The file is mainly meant for MDAs that want to update
maildirsize quota, but that's only available for Maildir storage.
Timo Sirainen [Tue, 25 Sep 2012 19:51:46 +0000 (22:51 +0300)]
lib-storage: Fixed shared namespace autocreation after previous mailbox list changes.
mailbox_list_is_valid_existing_name() no longer goes all the way through to
shared-list backend, but mailbox_list_join_refpattern() does.
Timo Sirainen [Tue, 25 Sep 2012 18:45:00 +0000 (21:45 +0300)]
lib-storage: Removed mailbox list backend-specific mailbox name/pattern validation.
The virtual name validity is independent of the backend. The physical name
is always used for paths in filesystem, so it can also be verified with
common code. Backend's mailbox_dir and storage's internal directories can
also be checked. There's nothing else left really.
Timo Sirainen [Tue, 25 Sep 2012 17:15:58 +0000 (20:15 +0300)]
lib-storage: Added mailbox_get_path_to() wrapper for mailbox_list_get_path().
Changed the code to use as much of mailbox_get_path_to() and
mailbox_get_path() as possible.
Timo Sirainen [Sun, 16 Sep 2012 13:42:25 +0000 (16:42 +0300)]
Makefile: Again changes to handling test program dependencies.
.la libraries need to link .lo files, .a libraries need to link .o files.
Changed dsync to be .la library for consistency.
Timo Sirainen [Sun, 16 Sep 2012 12:40:10 +0000 (15:40 +0300)]
Makefile: Fixed test program dependencies
Explicit dependencies on .o or .lo files didn't seem to work properly and
with high enough make -j value the build failed. Depending on the entire
library guarantees that all the individual .o files have been built.