]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.c
Keep track of envelope from and to headers
[citadel.git] / citadel / msgbase.c
index 978b19e9d1499bc169cfa0d3725b9acc71bc994f..a098a5cb879c90a5ae9b9e4d82e70bf882427cf3 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;
 
@@ -1580,6 +1584,12 @@ int CtdlOutputPreLoadedMsg(
                                else if (i == 'Y') {
                                        cprintf("CC: %s%s", mptr, nl);
                                }
+                               else if (i == 'P') {
+                                       cprintf("Return-Path: %s%s", mptr, nl);
+                               }
+                               else if (i == 'V') {
+                                       cprintf("Envelope-To: %s%s", mptr, nl);
+                               }
                                else if (i == 'U') {
                                        cprintf("Subject: %s%s", mptr, nl);
                                        subject_found = 1;
@@ -2036,6 +2046,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);