dovecot-2.2-pigeonhole: doveadm-sieve: Adjusted to Dovecot API c...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Fri Apr 5 19:19:19 EEST 2013


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/3514cbec0e06
changeset: 1738:3514cbec0e06
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Fri Apr 05 18:08:19 2013 +0200
description:
doveadm-sieve: Adjusted to Dovecot API change.

diffstat:

 src/plugins/doveadm-sieve/doveadm-sieve-plugin.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 097d68a9dd32 -r 3514cbec0e06 src/plugins/doveadm-sieve/doveadm-sieve-plugin.c
--- a/src/plugins/doveadm-sieve/doveadm-sieve-plugin.c	Wed Apr 03 00:08:05 2013 +0200
+++ b/src/plugins/doveadm-sieve/doveadm-sieve-plugin.c	Fri Apr 05 18:08:19 2013 +0200
@@ -1,6 +1,7 @@
 /* Copyright (c) 2013 Dovecot authors, see the included COPYING file */
 
 #include "lib.h"
+#include "ioloop.h"
 #include "istream.h"
 #include "sieve-script.h"
 #include "sieve-script-file.h"
@@ -310,6 +311,7 @@
 		    const struct mail_attribute_value *value)
 {
 	union mailbox_module_context *sbox = SIEVE_MAIL_CONTEXT(t->box);
+	time_t ts = value->last_change != 0 ? value->last_change : ioloop_time;
 
 	if (t->box->storage->user->admin &&
 	    type == MAIL_ATTRIBUTE_TYPE_PRIVATE &&
@@ -317,10 +319,12 @@
 		    strlen(MAILBOX_ATTRIBUTE_PREFIX_SIEVE)) == 0) {
 		if (sieve_attribute_set_sieve(t->box->storage, key, value) < 0)
 			return -1;
+		/* FIXME: set value len to sieve script size / active name
+		   length */
 		if (value->value != NULL || value->value_stream != NULL)
-			mail_index_attribute_set(t->itrans, TRUE, key);
+			mail_index_attribute_set(t->itrans, TRUE, key, ts, 0);
 		else
-			mail_index_attribute_unset(t->itrans, TRUE, key);
+			mail_index_attribute_unset(t->itrans, TRUE, key, ts);
 		return 0;
 	}
 	return sbox->super.attribute_set(t, type, key, value);


More information about the dovecot-cvs mailing list