dovecot-2.2-pigeonhole: doveadm-sieve: Fixed handling of non-lin...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Sun Apr 7 01:33:49 EEST 2013


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/1a06d4b9483c
changeset: 1739:1a06d4b9483c
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Sun Apr 07 00:33:41 2013 +0200
description:
doveadm-sieve: Fixed handling of non-link active script.
Unsetting the normal active script attribute would 'rescue' the non-link script and turn it into a symlink.

diffstat:

 src/plugins/doveadm-sieve/doveadm-sieve-plugin.c |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r 3514cbec0e06 -r 1a06d4b9483c src/plugins/doveadm-sieve/doveadm-sieve-plugin.c
--- a/src/plugins/doveadm-sieve/doveadm-sieve-plugin.c	Fri Apr 05 18:08:19 2013 +0200
+++ b/src/plugins/doveadm-sieve/doveadm-sieve-plugin.c	Sun Apr 07 00:33:41 2013 +0200
@@ -153,6 +153,15 @@
 	if (mailbox_attribute_value_to_string(storage, value, &scriptname) < 0)
 		return -1;
 	if (scriptname == NULL) {
+		/* don't affect non-link active script */
+		if ((ret=sieve_storage_active_script_is_no_link(svstorage)) != 0) {
+			if (ret < 0) {
+				mail_storage_set_internal_error(storage);
+				return -1;
+			}
+			return 0;
+		}
+
 		/* deactivate current script */
 		if (sieve_storage_deactivate(svstorage) < 0) {
 			mail_storage_set_critical(storage,


More information about the dovecot-cvs mailing list