dovecot-2.0: virtual: Allow opening virtual mailboxes that refer...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Sep 30 18:49:21 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/32f68d621f1d
changeset: 12210:32f68d621f1d
user: Timo Sirainen <tss at iki.fi>
date: Thu Sep 30 16:49:16 2010 +0100
description:
virtual: Allow opening virtual mailboxes that refer to non-existing mailboxes.
It could be intentional that not everyone has the same set of mailboxes always.
diffstat:
src/plugins/virtual/virtual-storage.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diffs (30 lines):
diff -r a7a953486a0b -r 32f68d621f1d src/plugins/virtual/virtual-storage.c
--- a/src/plugins/virtual/virtual-storage.c Thu Sep 30 16:05:57 2010 +0100
+++ b/src/plugins/virtual/virtual-storage.c Thu Sep 30 16:49:16 2010 +0100
@@ -142,16 +142,19 @@
&error);
name = t_strdup(get_user_visible_mailbox_name(bbox->box));
mailbox_free(&bbox->box);
- if (bbox->wildcard &&
- (error == MAIL_ERROR_PERM || error == MAIL_ERROR_NOTFOUND)) {
- /* this mailbox wasn't explicitly specified. just skip it. */
+ if (error == MAIL_ERROR_NOTFOUND) {
+ /* ignore this. it could be intentional. */
+ if (mbox->storage->storage.user->mail_debug) {
+ i_debug("virtual mailbox %s: "
+ "Skipping non-existing mailbox %s",
+ mbox->box.vname, name);
+ }
return 0;
}
- if (error == MAIL_ERROR_NOTFOUND) {
- /* the virtual mailbox exists, we just can't open it.
- change the error type. */
- error = MAIL_ERROR_NOTPOSSIBLE;
+ if (error == MAIL_ERROR_PERM && bbox->wildcard) {
+ /* this mailbox wasn't explicitly specified. just skip it. */
+ return 0;
}
str = t_strdup_printf(
"Virtual mailbox open failed because of mailbox %s: %s",
More information about the dovecot-cvs
mailing list