From f5e9b9ce49b413de55e3dff4223c1e08343461df Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan@rename-it.nl>
Date: Sat, 23 Feb 2008 00:24:08 +0100
Subject: [PATCH] Variables: made variable identifiers case insensitive.

---
 src/lib-sieve/plugins/variables/ext-variables-common.c | 2 +-
 src/lib-sieve/plugins/variables/variables.sieve        | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/lib-sieve/plugins/variables/ext-variables-common.c b/src/lib-sieve/plugins/variables/ext-variables-common.c
index 4014e1d0b..c2a7a625a 100644
--- a/src/lib-sieve/plugins/variables/ext-variables-common.c
+++ b/src/lib-sieve/plugins/variables/ext-variables-common.c
@@ -71,7 +71,7 @@ struct sieve_variable_scope *sieve_variable_scope_create(pool_t pool)
 	scope = p_new(pool, struct sieve_variable_scope, 1);
 	scope->pool = pool;
 	scope->variables = hash_create
-		(pool, pool, 0, str_hash, (hash_cmp_callback_t *)strcmp);
+		(pool, pool, 0, strcase_hash, (hash_cmp_callback_t *)strcasecmp);
 		
 	return scope;
 }
diff --git a/src/lib-sieve/plugins/variables/variables.sieve b/src/lib-sieve/plugins/variables/variables.sieve
index 8e443232a..0355e5452 100644
--- a/src/lib-sieve/plugins/variables/variables.sieve
+++ b/src/lib-sieve/plugins/variables/variables.sieve
@@ -3,9 +3,8 @@ require "fileinto";
 
 set :lower :upperfirst "foo" "FOOSOME";
 set :upperfirst :lower "bar" "BARABLE";
-set :upper :lowerfirst "hutse" "hutsefluts";
-set :lowerfirst :upper "piep" "piepsnot";
-
+set :upper :lowerfirst "HutsE" "hutsefluts";
+set :lowerfirst :upper "pIEp" "piepsnot";
 
 #fileinto "${foo}.${bar}";
 
-- 
GitLab