summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libsieve/runtime.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libsieve/runtime.c b/libsieve/runtime.c
index 993e02957..07febbc2d 100644
--- a/libsieve/runtime.c
+++ b/libsieve/runtime.c
@@ -323,3 +323,20 @@ sieve_mailbox (sieve_machine_t mach, mailbox_t mbox)
return rc;
}
+
+int
+sieve_message (sieve_machine_t mach, message_t msg)
+{
+ int rc;
+
+ if (!mach || !msg)
+ return EINVAL;
+
+ mach->msgno = 1;
+ mach->msg = msg;
+ mach->mailbox = NULL;
+ rc = sieve_run (mach);
+ mach->msg = NULL;
+
+ return rc;
+}

Return to:

Send suggestions and report system problems to the System administrator.