# HG changeset patch # User Timo Sirainen # Date 1451935426 18000 # Node ID 304b06f6302cee0a5ecd36091ad68832904d6bd2 # Parent c4f960341b0c145334fc0f526e3a0e1b2a92105f lib-storage: Fixed autoexpunge for namespaces with non-empty prefix diff -r c4f960341b0c -r 304b06f6302c src/lib-storage/mail-autoexpunge.c --- a/src/lib-storage/mail-autoexpunge.c Mon Jan 04 14:15:50 2016 -0500 +++ b/src/lib-storage/mail-autoexpunge.c Mon Jan 04 14:23:46 2016 -0500 @@ -63,6 +63,7 @@ struct mailbox_settings *const *box_set; struct mailbox *box; time_t expire_time; + const char *vname; if (!array_is_created(&ns->set->mailboxes)) return; @@ -71,8 +72,10 @@ if ((*box_set)->autoexpunge == 0 || (unsigned int)ioloop_time < (*box_set)->autoexpunge) continue; + + vname = t_strconcat(ns->prefix, (*box_set)->name, NULL); expire_time = ioloop_time - (*box_set)->autoexpunge; - box = mailbox_alloc(ns->list, (*box_set)->name, 0); + box = mailbox_alloc(ns->list, vname, 0); if (mailbox_autoexpunge(box, expire_time) < 0) { i_error("Failed to autoexpunge mailbox '%s': %s", mailbox_get_vname(box),