9 #include <sieve2_error.h>
12 struct sdm_script *next;
13 char script_name[256];
19 struct sdm_vacation *next;
25 sieve2_context_t *sieve2_context; /**< for libsieve's use */
26 long config_msgnum; /**< confirms that a sieve config was located */
27 char config_roomname[ROOMNAMELEN];
28 long lastproc; /**< last message processed */
29 struct sdm_script *first_script;
30 struct sdm_vacation *first_vacation;
35 int cancel_implicit_keep; /* Set to 1 if the message was successfully acted upon */
36 int keep; /* Set to 1 to suppress message deletion from the inbox */
37 long usernum; /* Owner of the mailbox we're processing */
38 long msgnum; /* Message base ID of the message being processed */
39 struct sdm_userdata *u; /* Info related to the current session */
43 char sender[256]; /* To whom shall we send reject bounces or vacation messages? */
44 char subject[1024]; /* Retain msg subject so we can use it in vacation messages */
45 char envelope_from[1024];
46 char envelope_to[1024];
50 /* If you change this string you will break all of your Sieve configs. */
51 #define CTDLSIEVECONFIGSEPARATOR "\n-=<CtdlSieveConfigSeparator>=-\n"
53 /* Maximum time we keep vacation fromaddr records online. This implies that a vacation
54 * rule cannot exceed this amount of time. (Any more than 30 days is a ridiculously
55 * long vacation which the person probably doesn't deserve.)
57 #define MAX_VACATION 30
59 extern struct RoomProcList *sieve_list;
61 void sieve_queue_room(struct ctdlroom *);
62 void perform_sieve_processing(void);
64 void msiv_load(struct sdm_userdata *u);
65 void msiv_store(struct sdm_userdata *u);
66 int msiv_setactive(struct sdm_userdata *u, char *script_name);
67 char *msiv_getscript(struct sdm_userdata *u, char *script_name);
68 int msiv_deletescript(struct sdm_userdata *u, char *script_name);
69 void msiv_putscript(struct sdm_userdata *u, char *script_name, char *script_content);
70 extern char *msiv_extensions;
72 #endif /* HAVE_LIBSIEVE */