diff --git a/src/lib-sieve/sieve.c b/src/lib-sieve/sieve.c
index e2ce4b46487df3ab95ba1ff7d56a034cf2f936da..3ab118fa49047e76b2fde787fe3de2ce45505290 100644
--- a/src/lib-sieve/sieve.c
+++ b/src/lib-sieve/sieve.c
@@ -83,7 +83,7 @@ static struct sieve_binary *sieve_generate
 	return sbin;
 }
 
-static struct sieve_binary *sieve_compile_script
+struct sieve_binary *sieve_compile_script
 (struct sieve_script *script, struct sieve_error_handler *ehandler) 
 {
 	struct sieve_ast *ast;
diff --git a/src/lib-sieve/sieve.h b/src/lib-sieve/sieve.h
index e64940fca176c781815289d8b33113fbe2622cf4..df23aac5b544299d504405749263e86fc80b5930 100644
--- a/src/lib-sieve/sieve.h
+++ b/src/lib-sieve/sieve.h
@@ -10,6 +10,7 @@
 #define SIEVE_VERSION "0.0.1"
 #define SIEVE_IMPLEMENTATION "Dovecot Sieve " SIEVE_VERSION
 
+struct sieve_script;
 struct sieve_binary;
 
 /* The mail message + envelope data */
@@ -50,26 +51,31 @@ struct sieve_script_env {
 bool sieve_init(const char *plugins);
 void sieve_deinit(void);
 
+/* sieve_compile_script:
+ */
+struct sieve_binary *sieve_compile_script
+	(struct sieve_script *script, struct sieve_error_handler *ehandler);
+
 /* sieve_compile:
  *
- *   Compiles the script into a binary. 
+ *   Compiles the script into a binary.
  */
 struct sieve_binary *sieve_compile
 	(const char *scriptpath, struct sieve_error_handler *ehandler);
 
 /* sieve_open:
- * 
+ *
  *   First tries to open the binary version of the specified script and
- *   if it does not exist or if it contains errors, the script is 
- *   (re-)compiled. The binary is updated if the script is recompiled. 
+ *   if it does not exist or if it contains errors, the script is
+ *   (re-)compiled. The binary is updated if the script is recompiled.
  *   Note that errors in the bytecode are not caught here.
- *   
+ *
  */
 struct sieve_binary *sieve_open
 	(const char *scriptpath, struct sieve_error_handler *ehandler);
 
 /* sieve_dump:
- * 
+ *
  *   Dumps the byte code in human-readable form to the specified ostream.
  */
 void sieve_dump(struct sieve_binary *sbin, struct ostream *stream);