Displaying 5 results from an estimated 5 matches for "sieve_instance".
2015 Aug 10
2
pigeonhole/lda accessing -m folder
...ELEMENTS(core_env_items);
@@ -233,7 +234,19 @@ const struct sieve_environment_item
version_env_item = {
.value = PIGEONHOLE_VERSION,
};
+/* "defaultfolder":
+ * the default folder where mail is stored when no rule matches
+ */
+static const char *envit_defaultfolder_get_value
+(struct sieve_instance *svinst,
+ const struct sieve_script_env *senv)
+{
+ return senv->default_mailbox;
+}
-
+const struct sieve_environment_item defaultfolder_env_item = {
+ .name = "defaultfolder",
+ .get_value = envit_defaultfolder_get_value,
+};
diff --git a/...
2012 Feb 29
1
dovecot-2.1-pigeonhole-0.3.0 identifier redeclared: sieve_multiscript_run (patch)
...33: warning: useless declaration
"/home/soft/dovecot/dovecot-2.1.1/src/lib-storage/mailbox-list.h", line
13: warning: useless declaration
"sieve.c", line 578: identifier redeclared: sieve_multiscript_run
current : function(pointer to struct sieve_multiscript {pointer to
struct sieve_instance {..} svinst, pointer to struct sieve_result {..}
result, pointer to const struct sieve_message_data {..} msgdata, pointer
to const struct sieve_script_env {..} scriptenv, int status, _Bool
active, _Bool keep, pointer to struct ostream {..} teststream}, pointer
to struct sieve_binary {}, pointer to...
2015 Aug 07
2
pigeonhole/lda accessing -m folder
hi jost thx for the reply,
by access I mean to read the variable
require ["fileinto", "variables", "?destfolder?" ];
if anyof ( destfolder :matches "*") {
fileinto "${1}/subfolder";
}else{
fileinto "INBOX/subfolder";
}
On 08/07/2015 12:26 PM, Jost Krieger wrote:
> On Fri Aug 7 12:19:22 2015, matthias lay wrote:
2015 Aug 10
0
PATCH for Stephan: Re: pigeonhole/lda accessing -m folder
...9 @@ const struct sieve_environment_item
> version_env_item = {
> .value = PIGEONHOLE_VERSION,
> };
>
> +/* "defaultfolder":
> + * the default folder where mail is stored when no rule matches
> + */
> +static const char *envit_defaultfolder_get_value
> +(struct sieve_instance *svinst,
> + const struct sieve_script_env *senv)
> +{
> + return senv->default_mailbox;
> +}
>
> -
> +const struct sieve_environment_item defaultfolder_env_item = {
> + .name = "defaultfolder",
> + .get_value = envit_...
2015 Aug 07
0
pigeonhole/lda accessing -m folder
fixed my problem.
if somebody is interested.
I added an variable to the environment extension, which is quite easy.
And the value of the folder is already there. so this is all:
src/lib-sieve/plugins/environment/ext-environment-common.c
static const char *envit_spfolder_get_value
(struct sieve_instance *svinst,
const struct sieve_script_env *senv)
{
return senv->default_mailbox;
}
const struct sieve_environment_item spfolder_env_item = {
.name = "spfolder",
.get_value = envit_spfolder_get_value,
};
after that the variable can easily be used in a scr...