summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mailutils/sieve.h4
-rw-r--r--libmu_sieve/runtime.c15
2 files changed, 19 insertions, 0 deletions
diff --git a/include/mailutils/sieve.h b/include/mailutils/sieve.h
index 4e07497f1..fbe545d1f 100644
--- a/include/mailutils/sieve.h
+++ b/include/mailutils/sieve.h
@@ -279,9 +279,13 @@ void mu_sieve_set_data (mu_sieve_machine_t mach, void *);
mu_message_t mu_sieve_get_message (mu_sieve_machine_t mach);
size_t mu_sieve_get_message_num (mu_sieve_machine_t mach);
+mu_mailbox_t mu_sieve_get_mailbox (mu_sieve_machine_t mach);
+
int mu_sieve_is_dry_run (mu_sieve_machine_t mach);
int mu_sieve_set_dry_run (mu_sieve_machine_t mach, int val);
+void mu_sieve_get_argc (mu_sieve_machine_t mach, size_t *args, size_t *tags);
+
mu_mailer_t mu_sieve_get_mailer (mu_sieve_machine_t mach);
int mu_sieve_get_locus (mu_sieve_machine_t mach, struct mu_locus *);
char *mu_sieve_get_daemon_email (mu_sieve_machine_t mach);
diff --git a/libmu_sieve/runtime.c b/libmu_sieve/runtime.c
index 264fa5fc3..b5739e003 100644
--- a/libmu_sieve/runtime.c
+++ b/libmu_sieve/runtime.c
@@ -183,6 +183,12 @@ mu_sieve_get_locus (mu_sieve_machine_t mach, struct mu_locus *loc)
return 1;
}
+mu_mailbox_t
+mu_sieve_get_mailbox (mu_sieve_machine_t mach)
+{
+ return mach->mailbox;
+}
+
mu_message_t
mu_sieve_get_message (mu_sieve_machine_t mach)
{
@@ -203,6 +209,15 @@ mu_sieve_get_identifier (mu_sieve_machine_t mach)
return mach->identifier;
}
+void
+mu_sieve_get_argc (mu_sieve_machine_t mach, size_t *args, size_t *tags)
+{
+ if (args)
+ *args = mach->argcount;
+ if (tags)
+ *tags = mach->tagcount;
+}
+
int
mu_sieve_is_dry_run (mu_sieve_machine_t mach)
{

Return to:

Send suggestions and report system problems to the System administrator.