diff --git a/src/lib-sieve/plugins/enotify/ext-enotify-common.c b/src/lib-sieve/plugins/enotify/ext-enotify-common.c
index 9d9bcae9ee3efd1998c7acae9f1c25b7333acd8c..7e35e38d16e48fec0840462a95051d2bac9a87b4 100644
--- a/src/lib-sieve/plugins/enotify/ext-enotify-common.c
+++ b/src/lib-sieve/plugins/enotify/ext-enotify-common.c
@@ -74,12 +74,17 @@ void ext_enotify_methods_deinit(struct ext_enotify_context *ectx)
 }
 
 void sieve_enotify_method_register
-(struct sieve_extension *ntfy_ext, const struct sieve_enotify_method *method) 
+(struct sieve_instance *svinst, const struct sieve_enotify_method *method) 
 {
-	struct ext_enotify_context *ectx = 
-		(struct ext_enotify_context *) ntfy_ext->context;
+	const struct sieve_extension *ntfy_ext =
+		sieve_extension_get_by_name(svinst, "enotify");
 
-	ext_enotify_method_register(ectx, method);
+	if ( ntfy_ext != NULL ) {
+		struct ext_enotify_context *ectx = 
+			(struct ext_enotify_context *) ntfy_ext->context;
+
+		ext_enotify_method_register(ectx, method);
+	}
 }
 
 const struct sieve_enotify_method *ext_enotify_method_find
diff --git a/src/lib-sieve/plugins/enotify/sieve-ext-enotify.h b/src/lib-sieve/plugins/enotify/sieve-ext-enotify.h
index 44d2a3988b928769b6c520fcc325457ca7c21257..a70c422dbf2631df1b76b2270e28c1fe7a2ee02e 100644
--- a/src/lib-sieve/plugins/enotify/sieve-ext-enotify.h
+++ b/src/lib-sieve/plugins/enotify/sieve-ext-enotify.h
@@ -87,7 +87,7 @@ struct sieve_enotify_method {
 };
 
 void sieve_enotify_method_register
-(struct sieve_extension *ntfy_ext, const struct sieve_enotify_method *method); 
+(struct sieve_instance *svinst, const struct sieve_enotify_method *method); 
 
 /*
  * Notify method printing