1
/* Copyright (c) 2002-2009 Dovecot Sieve authors, see the included COPYING file
7
* Authors: Stephan Bosch
8
* Specification: RFC 5490
9
* Implementation: almost full; acl support is missing for mailboxexists
10
* Status: experimental, largely untested
16
#include "sieve-common.h"
18
#include "sieve-code.h"
19
#include "sieve-extensions.h"
20
#include "sieve-actions.h"
21
#include "sieve-commands.h"
22
#include "sieve-validator.h"
23
#include "sieve-generator.h"
24
#include "sieve-interpreter.h"
25
#include "sieve-result.h"
27
#include "ext-mailbox-common.h"
33
static bool ext_mailbox_validator_load(struct sieve_validator *valdtr);
35
static int ext_my_id = -1;
37
const struct sieve_extension mailbox_extension = {
41
ext_mailbox_validator_load,
42
NULL, NULL, NULL, NULL, NULL,
43
SIEVE_EXT_DEFINE_OPERATION(mailboxexists_operation),
44
SIEVE_EXT_DEFINE_OPERAND(mailbox_create_operand)
47
static bool ext_mailbox_validator_load(struct sieve_validator *valdtr)
49
/* Register :create tag with fileinto command and we don't care whether this
50
* command is registered or even whether it will be registered at all. The
51
* validator handles either situation gracefully
53
sieve_validator_register_external_tag
54
(valdtr, &mailbox_create_tag, "fileinto", SIEVE_OPT_SIDE_EFFECT);
56
/* Register new test */
57
sieve_validator_register_command(valdtr, &mailboxexists_test);