diff --git a/src/lib-sieve/sieve-storage.c b/src/lib-sieve/sieve-storage.c
index 58c6643f2bb1b6806bf04a0e08dac487df680426..05b3595b86a387a1cd5b63162598fa74899fee07 100644
--- a/src/lib-sieve/sieve-storage.c
+++ b/src/lib-sieve/sieve-storage.c
@@ -881,10 +881,10 @@ unsigned int sieve_storage_hash(const struct sieve_storage *storage)
  * Script access
  */
 
-static int
-sieve_storage_get_script_direct(struct sieve_storage *storage, const char *name,
-				struct sieve_script **script_r,
-				enum sieve_error *error_code_r)
+int sieve_storage_get_script_direct(struct sieve_storage *storage,
+				    const char *name,
+				    struct sieve_script **script_r,
+				    enum sieve_error *error_code_r)
 {
 	int ret;
 
diff --git a/src/lib-sieve/sieve-storage.h b/src/lib-sieve/sieve-storage.h
index 4ffd280e308e26c95e17ca6356242ea54ab1fdc2..58ec5979e6a653f0872375b18bd6d3c4706baf14 100644
--- a/src/lib-sieve/sieve-storage.h
+++ b/src/lib-sieve/sieve-storage.h
@@ -47,9 +47,14 @@ void sieve_storage_unref(struct sieve_storage **_storage);
  * Script access
  */
 
+int sieve_storage_get_script_direct(struct sieve_storage *storage,
+				    const char *name,
+				    struct sieve_script **script_r,
+				    enum sieve_error *error_code_r);
 int sieve_storage_get_script(struct sieve_storage *storage, const char *name,
 			     struct sieve_script **script_r,
 			     enum sieve_error *error_code_r);
+
 int sieve_storage_open_script(struct sieve_storage *storage, const char *name,
 			      struct sieve_script **script_r,
 			      enum sieve_error *error_code_r);