Re: Cyrus IMAPd 2.3.12 Released

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Attached patch add to log information about moving messages between folders. I am using this information from logs for relaunch dspam.
Any chances for add this patch to project tree?

It's useful schema and I think it can be helpful not only for me.

Some details:
dspam watch all incoming messages and add tag spam|innocent and unique signature to message headers. sieve use this tag for moving|not-moving incoming message to USER/spam folder (every user have personal folder "spam"). If dspam miss, user can manually move message from|to "spam" folder. This fact fixed in cyrus log file. simple script parsing log and relaunch dspam.

WBR.
Dmitriy
--- index.c.orig	Mon Mar  3 16:21:13 2008
+++ index.c	Mon Mar  3 17:01:48 2008
@@ -1313,6 +1313,7 @@
     *copyuidp = NULL;
 
     copyargs.nummsg = 0;
+    copyargs.name = name;
     index_forsequence(mailbox, sequence, usinguid, index_copysetup,
 		      (char *)&copyargs, NULL);
 
@@ -3409,6 +3410,9 @@
 	  xrealloc((char *)copyargs->copymsg,
 		   copyargs->msgalloc * sizeof(struct copymsg));
     }
+
+    syslog(LOG_ERR, "DSPAM-Hack index_copysetup(): %s -> %s, hdr %s", mailbox->name,
+	   copyargs->name, index_getheader(mailbox, msgno, "X-DSPAM-Signature"));
 
     copyargs->copymsg[copyargs->nummsg].uid = UID(msgno);
     copyargs->copymsg[copyargs->nummsg].internaldate = INTERNALDATE(msgno);
--- index.h.orig	Mon Mar  3 16:57:35 2008
+++ index.h	Mon Mar  3 16:57:53 2008
@@ -126,6 +126,7 @@
     struct copymsg *copymsg;
     int nummsg;
     int msgalloc;
+    char *name;
 };
 
 struct mapfile {
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux