Completed API functions to load and store
[citadel.git] / citadel / serv_sieve.h
1 /*
2  * $Id: $
3  */
4
5
6 #ifdef HAVE_LIBSIEVE
7
8 #include <sieve2.h>
9 #include <sieve2_error.h>
10
11 struct sdm_script {
12         struct sdm_script *next;
13         char script_name[256];
14         int script_active;
15         char *script_content;
16 };
17
18 struct sdm_userdata {
19         sieve2_context_t *sieve2_context;       /**< for libsieve's use */
20         long config_msgnum;                     /**< confirms that a sieve config was located */
21         char config_roomname[ROOMNAMELEN];
22         long lastproc;                          /**< last message processed */
23         struct sdm_script *first_script;
24 };
25
26 struct ctdl_sieve {
27         char *rfc822headers;
28         int actiontaken;                /* Set to 1 if the message was successfully acted upon */
29         int keep;                       /* Set to 1 to suppress message deletion from the inbox */
30         long usernum;                   /* Owner of the mailbox we're processing */
31         long msgnum;                    /* Message base ID of the message being processed */
32         struct sdm_userdata *u;         /* Info related to the current session */
33 };
34
35 #endif /* HAVE_LIBSIEVE */
36
37
38
39 extern struct RoomProcList *sieve_list;
40
41 void sieve_queue_room(struct ctdlroom *);
42 void perform_sieve_processing(void);
43
44 /* If you change this string you will break all of your Sieve configs. */
45 #define CTDLSIEVECONFIGSEPARATOR        "\n-=<CtdlSieveConfigSeparator>=-\n"