Timo Sirainen [Sat, 1 Jan 2011 13:52:39 +0000 (15:52 +0200)]
lib-storage: Moved some items from mailbox_get_status() to a new mailbox_get_metadata().
The idea is now that all status items are tracked all the time after mailbox
is opened and they can always be looked up without failure. The metadata
items are looked up lazily and the lookups may fail at any time.
mailbox_get_status() can be used after mailbox_alloc() to indicate that the
mailbox doesn't necessarily have to be opened, just that the status fields
get returned.
If mailbox is already known to be open, mailbox_get_open_status() can be
used. It never fails.
Timo Sirainen [Fri, 17 Dec 2010 13:23:07 +0000 (13:23 +0000)]
lda: Removed optimization of not creating temp files for large mails when not using Sieve.
The backwards seeking was still needed if bouncing the mail because of
out of quota.
Timo Sirainen [Wed, 15 Dec 2010 17:07:01 +0000 (17:07 +0000)]
master-child API change: Use a separate fd for tracking when master dies.
This works around a Linux performance problem where when one process writes
to status fd all the other processes of the same service type wake up.
Timo Sirainen [Mon, 13 Dec 2010 13:27:18 +0000 (13:27 +0000)]
quota: Quota warnings could have been executed at incorrect times with some configs.
If target mailbox had quota ignored, the warning was sent if the mail would
have otherwise exceeded the warning threshold. Same when using multiple
quota roots where all of the roots weren't used for the target mailbox.
Timo Sirainen [Mon, 6 Dec 2010 03:08:31 +0000 (03:08 +0000)]
lib-storage: Added mailbox_list_get_root_[dir_]permissions()
They should be used instead of mailbox_list_get_[dir_]permissions() with
name=NULL parameter.
Timo Sirainen [Mon, 6 Dec 2010 02:16:22 +0000 (02:16 +0000)]
lib-storage: Simplified mailbox_keyword*() APIs.
They are no longer struct mailbox methods, because they're always implemented
as being wrappers to lib-index APIs anyway.
Also mailbox_keywords_ref/unref() no longer take mailbox parameter.
Timo Sirainen [Mon, 6 Dec 2010 00:52:42 +0000 (00:52 +0000)]
lib-storage: Removed subscription name validity check from lib-storage after all.
It could have broken when subscriptions were being set for subscriptions=no
namespace.
Timo Sirainen [Mon, 6 Dec 2010 00:43:28 +0000 (00:43 +0000)]
lib-storage: Mailbox directory creation didn't properly enforce that the name was valid.
The name was checked against "valid existing name" rather than "valid create
name", which mainly meant that the name could have contained control characters
and other things that weren't really intended. This couldn't be used to
cause any security holes though.
Timo Sirainen [Mon, 6 Dec 2010 00:42:42 +0000 (00:42 +0000)]
acl: Make the mailbox visible only when it has l/r/i right.
This change only affects the ability to SUBSCRIBE to a mailbox. Previously
it was allowed when user had any rights at all to mailbox.
Timo Sirainen [Mon, 6 Dec 2010 00:30:36 +0000 (00:30 +0000)]
imap: Avoid using mailbox_list_get_mailbox_name_status()
The validity checks should already be done by the actual commands in most
cases (if they didn't, there would be race condition bugs). The only
exception is SUBSCRIBE. It doesn't require that the mailbox exists, but
we want to enforce that anyway via IMAP.
Timo Sirainen [Mon, 6 Dec 2010 00:13:28 +0000 (00:13 +0000)]
lib-storage: Mailbox directory creation didn't properly enforce that the name was valid.
The name was checked against "valid existing name" rather than "valid create
name", which mainly meant that the name could have contained control characters
and other things that weren't really intended. This couldn't be used to
cause any security holes though.
Timo Sirainen [Thu, 2 Dec 2010 19:10:23 +0000 (19:10 +0000)]
auth: passdb credentials lookup fix when using multiple passdbs.
If at least one passdb returns "user unknown" and the last passdb returns
"credential lookup not supported", the proper return value is still
"user unknown".
Timo Sirainen [Fri, 26 Nov 2010 18:19:16 +0000 (18:19 +0000)]
auth sql/ldap: Allow using global %variables in iterate_query/filter.
No per-query %variables are defined, but e.g. %{hostname} or %{env:*} can
be used.