Completed a new queue (sieve_list) which will instantly
[citadel.git] / citadel / msgbase.c
index 978b19e9d1499bc169cfa0d3725b9acc71bc994f..b6d6a0bc36168cfcd6e1cb440cc7af15d5add2ea 100644 (file)
 #include "citadel_dirs.h"
 #include "serv_network.h"
 
+#ifdef HAVE_LIBSIEVE
+# include "serv_sieve.h"
+#endif /* HAVE_LIBSIEVE */
+
 long config_msgnum;
 struct addresses_to_be_filed *atbf = NULL;
 
@@ -2036,6 +2040,13 @@ int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms
        /* Submit this room for net processing */
        network_queue_room(&CC->room, NULL);
 
+#ifdef HAVE_LIBSIEVE
+       /* If this is someone's inbox, submit the room for sieve processing */
+       if (!strcasecmp(&CC->room.QRname[11], MAILROOM)) {
+               sieve_queue_room(&CC->room);
+       }
+#endif /* HAVE_LIBSIEVE */
+
        /* Go back to the room we were in before we wandered here... */
        getroom(&CC->room, hold_rm);