Mercurial > dovecot > core-2.2
changeset 9587:3788f3b0f9b2 HEAD
expire plugin: If mail_debug=yes, log more debug information.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 07 Jul 2009 23:37:22 -0400 |
parents | aa6f96938626 |
children | a1dfbec72a6f |
files | src/plugins/expire/expire-plugin.c |
diffstat | 1 files changed, 22 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/expire/expire-plugin.c Tue Jul 07 23:33:19 2009 -0400 +++ b/src/plugins/expire/expire-plugin.c Tue Jul 07 23:37:22 2009 -0400 @@ -258,20 +258,33 @@ MODULE_CONTEXT_SET(box, expire_storage_module, xpr_box); } +static void expire_mailbox_allocate_init(struct mailbox *box, + struct expire_mail_user *euser) +{ + unsigned int secs; + bool altmove; + + secs = expire_box_find_min_secs(euser->env, box->vname, &altmove); + if (box->storage->user->mail_debug) { + if (secs == 0) { + i_info("expire: No expiring in mailbox: %s", + box->vname); + } else { + i_info("expire: Mails expire in %u secs in mailbox: %s", + secs, box->vname); + } + } + if (secs != 0) + mailbox_expire_hook(box, secs, altmove); +} + static void expire_mailbox_allocated(struct mailbox *box) { struct expire_mail_user *euser = EXPIRE_USER_CONTEXT(box->storage->user); - struct mail_namespace *ns = mailbox_list_get_namespace(box->list); - unsigned int secs; - bool altmove; - if (euser != NULL) { - secs = expire_box_find_min_secs(euser->env, box->vname, - &altmove); - if (secs != 0) - mailbox_expire_hook(box, secs, altmove); - } + if (euser != NULL) + expire_mailbox_allocate_init(box, euser); if (next_hook_mailbox_allocated != NULL) next_hook_mailbox_allocated(box);