]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_sieve.h
initial prep for VACATION extension
[citadel.git] / citadel / serv_sieve.h
index e8eba73f1c9e378cd0b91ca91fd9dea428e176a0..944370bdfa202212ace522eca4e4e11db068f84e 100644 (file)
@@ -15,12 +15,19 @@ struct sdm_script {
        char *script_content;
 };
 
+struct sdm_vacation {
+       struct sdm_vacation *next;
+       char hash[256];
+       time_t timestamp;
+}
+
 struct sdm_userdata {
        sieve2_context_t *sieve2_context;       /**< for libsieve's use */
        long config_msgnum;                     /**< confirms that a sieve config was located */
        char config_roomname[ROOMNAMELEN];
        long lastproc;                          /**< last message processed */
        struct sdm_script *first_script;
+       struct sdm_vacation *first_vacation;
 };
 
 struct ctdl_sieve {
@@ -34,12 +41,19 @@ struct ctdl_sieve {
        char recp_node[256];
        char recp_name[256];
        char sender[256];               /* To whom shall we send reject bounces or vacation messages? */
+       char subject[1024];             /* Retain msg subject so we can use it in vacation messages */
 };
 
 
 /* If you change this string you will break all of your Sieve configs. */
 #define CTDLSIEVECONFIGSEPARATOR       "\n-=<CtdlSieveConfigSeparator>=-\n"
 
+/* Maximum time we keep vacation hash records online.  This implies that a vacation
+ * rule cannot exceed this amount of time.  5184000 seconds == 60 days, which is
+ * way too long for anyone to be on vacation.
+ */
+#define MAX_VACATION                   5184000
+
 extern struct RoomProcList *sieve_list;
 
 void sieve_queue_room(struct ctdlroom *);