dovecot-2.2: replication plugin: Use low priority for mail copyi...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 22 21:16:13 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/c373aa97644c
changeset: 17980:c373aa97644c
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 22 14:15:23 2014 -0700
description:
replication plugin: Use low priority for mail copying operations.
diffstat:
src/plugins/replication/replication-plugin.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 07c709075598 -r c373aa97644c src/plugins/replication/replication-plugin.c
--- a/src/plugins/replication/replication-plugin.c Wed Oct 22 05:40:44 2014 +0300
+++ b/src/plugins/replication/replication-plugin.c Wed Oct 22 14:15:23 2014 -0700
@@ -228,13 +228,20 @@
ctx->new_messages = TRUE;
}
-static void replication_mail_copy(void *txn, struct mail *src ATTR_UNUSED,
- struct mail *dst ATTR_UNUSED)
+static void replication_mail_copy(void *txn, struct mail *src,
+ struct mail *dst)
{
struct replication_mail_txn_context *ctx =
(struct replication_mail_txn_context *)txn;
- ctx->new_messages = TRUE;
+ if (src->box->storage != dst->box->storage) {
+ /* copy between storages, e.g. new mail delivery */
+ ctx->new_messages = TRUE;
+ } else {
+ /* copy within storage, which isn't as high priority since the
+ mail already exists. and especially copies to Trash or to
+ lazy-expunge namespace is pretty low priority. */
+ }
}
static void
More information about the dovecot-cvs
mailing list