dovecot-2.0: expire plugin: If a transaction expunges all messag...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 8 06:53:25 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/aa6f96938626
changeset: 9586:aa6f96938626
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 07 23:33:19 2009 -0400
description:
expire plugin: If a transaction expunges all messages and saves a new one, don't delete expire row.

diffstat:

1 file changed, 5 insertions(+), 1 deletion(-)
src/plugins/expire/expire-plugin.c |    6 +++++-

diffs (16 lines):

diff -r b64aa73a34dc -r aa6f96938626 src/plugins/expire/expire-plugin.c
--- a/src/plugins/expire/expire-plugin.c	Tue Jul 07 22:52:01 2009 -0400
+++ b/src/plugins/expire/expire-plugin.c	Tue Jul 07 23:33:19 2009 -0400
@@ -136,7 +136,11 @@ expire_mailbox_transaction_commit(struct
 				  box->storage->user->username, "/",
 				  mailbox_get_namespace(box)->prefix,
 				  box->name, NULL);
-		if (!xt->first_expunged && xt->saves) {
+		if (xt->first_expunged) {
+			if (new_stamp == 0 && xt->saves)
+				new_stamp = ioloop_time;
+		} else {
+			i_assert(xt->saves);
 			/* saved new mails. dict needs to be updated only if
 			   this is the first mail in the database */
 			ret = dict_lookup(euser->db, pool_datastack_create(),


More information about the dovecot-cvs mailing list