dovecot-2.0: expire-tool: Make sure expire plugin won't get used.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jun 1 03:10:10 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/a7cb99756199
changeset: 9414:a7cb99756199
user: Timo Sirainen <tss at iki.fi>
date: Sun May 31 20:10:04 2009 -0400
description:
expire-tool: Make sure expire plugin won't get used.
diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
src/plugins/expire/expire-plugin.c | 10 +++++++---
diffs (30 lines):
diff -r 84f96a722fcc -r a7cb99756199 src/plugins/expire/expire-plugin.c
--- a/src/plugins/expire/expire-plugin.c Sun May 31 20:07:52 2009 -0400
+++ b/src/plugins/expire/expire-plugin.c Sun May 31 20:10:04 2009 -0400
@@ -4,6 +4,7 @@
#include "ioloop.h"
#include "array.h"
#include "str.h"
+#include "master-service.h"
#include "dict.h"
#include "mail-namespace.h"
#include "index-mail.h"
@@ -309,12 +310,15 @@ static void expire_mail_user_created(str
static void expire_mail_user_created(struct mail_user *user)
{
struct expire_mail_user *euser;
- const char *expunge_env, *altmove_env, *dict_uri;
-
+ const char *expunge_env, *altmove_env, *dict_uri, *service_name;
+
+ service_name = master_service_get_name(master_service);
expunge_env = mail_user_plugin_getenv(user, "expire");
altmove_env = mail_user_plugin_getenv(user, "expire_altmove");
dict_uri = mail_user_plugin_getenv(user, "expire_dict");
- if (expunge_env == NULL && altmove_env == NULL) {
+ if (strcmp(service_name, "expire-tool") == 0) {
+ /* expire-tool handles all of this internally */
+ } else if (expunge_env == NULL && altmove_env == NULL) {
if (user->mail_debug) {
i_info("expire: No expire or expire_altmove settings - "
"plugin disabled");
More information about the dovecot-cvs
mailing list