dovecot-1.2: Expire plugin works now with multiple struct mail_u...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Nov 21 19:56:45 EET 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/f82ba0d5ed30
changeset: 8471:f82ba0d5ed30
user: Timo Sirainen <tss at iki.fi>
date: Fri Nov 21 19:56:42 2008 +0200
description:
Expire plugin works now with multiple struct mail_users.
diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
src/plugins/expire/expire-plugin.c | 10 +++++-----
diffs (35 lines):
diff -r e4f319453cb2 -r f82ba0d5ed30 src/plugins/expire/expire-plugin.c
--- a/src/plugins/expire/expire-plugin.c Fri Nov 21 19:45:57 2008 +0200
+++ b/src/plugins/expire/expire-plugin.c Fri Nov 21 19:56:42 2008 +0200
@@ -21,7 +21,6 @@ struct expire {
struct expire {
struct dict *db;
struct expire_env *env;
- const char *username;
void (*next_hook_mail_storage_created)(struct mail_storage *storage);
};
@@ -124,7 +123,8 @@ expire_mailbox_transaction_commit(struct
if (xt->first_expunged || xt->saves) T_BEGIN {
const char *key, *value;
- key = t_strconcat(DICT_EXPIRE_PREFIX, expire.username, "/",
+ key = t_strconcat(DICT_EXPIRE_PREFIX,
+ box->storage->ns->user->username, "/",
box->storage->ns->prefix, box->name, NULL);
if (!xt->first_expunged && xt->saves) {
/* saved new mails. dict needs to be updated only if
@@ -296,10 +296,10 @@ void expire_plugin_init(void)
if (dict_uri == NULL)
i_fatal("expire plugin: expire_dict setting missing");
- // FIXME: user should be per-mail_user?...
- expire.username = getenv("USER");
expire.env = expire_env_init(expunge_env, altmove_env);
- expire.db = dict_init(dict_uri, DICT_DATA_TYPE_UINT32, expire.username);
+ /* we're using only shared dictionary, the username
+ doesn't matter. */
+ expire.db = dict_init(dict_uri, DICT_DATA_TYPE_UINT32, "");
if (expire.db == NULL)
i_fatal("expire plugin: dict_init() failed");
More information about the dovecot-cvs
mailing list