changeset 19582:2ad8b38e55e7

lib-storage: Ignore ACLs when autoexpunging.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Mon, 18 Jan 2016 13:28:23 +0200
parents d622d8603290
children b0707e5a89cd
files src/lib-storage/mail-autoexpunge.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/mail-autoexpunge.c	Mon Jan 18 12:31:26 2016 +0200
+++ b/src/lib-storage/mail-autoexpunge.c	Mon Jan 18 13:28:23 2016 +0200
@@ -79,7 +79,10 @@
 		else
 			vname = t_strconcat(ns->prefix, (*box_set)->name, NULL);
 		expire_time = ioloop_time - (*box_set)->autoexpunge;
-		box = mailbox_alloc(ns->list, vname, 0);
+		/* autoexpunge is configured by admin, so we can safely ignore
+		   any ACLs the user might normally have against expunging in
+		   the mailbox. */
+		box = mailbox_alloc(ns->list, vname, MAILBOX_FLAG_IGNORE_ACLS);
 		if (mailbox_autoexpunge(box, expire_time) < 0) {
 			i_error("Failed to autoexpunge mailbox '%s': %s",
 				mailbox_get_vname(box),