Hello all,

I'm no active developer, nowadays I'm not using DSPAM any more because of 
instability and lazyness of our users to train, but recently somebody asked me 
for sending my "Resend To:" micropatch, may be others could be interested (see
attachement).

Marek

Byl  3.prosinec 2007 (Pondělí), když v 16:47:28 (CET) , Steve napsal(a):
> Hello all
> 
> The last weeks here almost every one was talking about forking DSPAM. Well... 
> Sensory Networks replied and now every thing is quite again.
> 
> But I want to take the opportunity to remind those one wanting to fork DSPAM 
> that DSPAM is a community project and that we all work together to get DSPAM 
> ahead.
> 
> But if I look at http://dspam.nuclearelephant.com/features.shtml I see a list 
> of feature requests and almost no one is posting patches to get those 
> features or working on implementing them.
> 
> Where are all of those people willing to fork DSPAM? Where are the 
> developers? Where is the progress from the community?
> 
> I took my time and have implemented #000032 and #000033. I am still testing 
> it but it looks okay so far.
> 
> I as well took several days to fix the mysql_drv. Fixing that beast was not 
> so hard but testing it is another issue. I have so far processed around 
> 250'000 mails without one single crash and without one singe dspam_clean run. 
> And while processing all the 250'000 mails the DSPAM deamon plus all dspam 
> client instances together never went over 15MB memory usage in total. And all 
> of this with 16M max_allowed_packet in MySQL and 12MB on DSPAM MaxMessageSize 
> and in client/server mode DSPAM with local domain sockets. With the old 
> driver I was not able to do that. The old driver had in some areas 50% over 
> allocation of really needed memory. And on my setup I had some time over 70MB 
> memory usage inside DSPAM. And I had crashing DSPAM client and server: can 
> not initialize agent context, permission denied for accessing socket, gone 
> MySQL server, etc. This is now all gone. Fixed :)
> 
> I am still running my test and will wait until it is finished with the 
> corpus. After that I will run another test with just 4M max_allowed_packet.
> 
> Okay. Why this long mail? Well... I would love to see other people on the 
> list implement stuff. I am sure that others are developers or can develop. 
> What is holding you back to do things? I miss the time when DSPAM was getting 
> better and better with each release and where you did not had to wait almost 
> 1 year to get a new DSPAM release.
> 
> So please all you out there using DSPAM and able to code: fire up your dev 
> environment and start coding on DSPAM. Add new features. Fix old known bugs 
> (if you don't know them, then ask here and I am sure you will get responses). 
> Enhance DSPAM. Make it faster. Make it use less memory. Add new storage 
> engines. Etc...
> 
> // SteveB
> -- 
> Psssst! Schon vom neuen GMX MultiMessenger gehört?
> Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

-- 
Marek Drápal - http://marek.drapal.org/
diff -Naur dspam-3.6.8/src/agent_shared.c dspam-3.6.8-patched/src/agent_shared.c
--- dspam-3.6.8/src/agent_shared.c	2006-05-13 14:17:30.000000000 +0200
+++ dspam-3.6.8-patched/src/agent_shared.c	2006-06-13 21:28:31.000000000 +0200
@@ -718,7 +718,7 @@
  */
 
 buffer * read_stdin(AGENT_CTX *ATX) {
-  int body = 0, line = 1;
+  int body = 0, line = 1, to = 0;
   char buf[1024];
   buffer *msg;
 
@@ -774,8 +774,16 @@
         if (buf[0] == 0)
           body = 1;
 
-        if (!body && !strncasecmp(buf, "To: ", 4))
+        if (!body && !strncasecmp(buf, "To: ", 4) && !to)
           process_parseto(ATX, buf);
+	if (!body && !strncasecmp(buf, "Resent-To: ", 11))
+	{
+          process_parseto(ATX, buf);
+	  /* If To: header comes later than Resent-To: we don't want to
+	   * overwrite 
+	   */
+	  to = 1;
+	}
       }
 
       if (buffer_cat (msg, buf))
diff -Naur dspam-3.6.8/src/daemon.c dspam-3.6.8-patched/src/daemon.c
--- dspam-3.6.8/src/daemon.c	2006-05-13 14:17:30.000000000 +0200
+++ dspam-3.6.8-patched/src/daemon.c	2006-06-13 21:28:20.000000000 +0200
@@ -859,7 +859,7 @@
 
 buffer * read_sock(THREAD_CTX *TTX, AGENT_CTX *ATX) {
   buffer *message;
-  int body = 0, line = 1;
+  int body = 0, line = 1, to = 0;
   char *buf;
 
   message = buffer_create(NULL);
@@ -896,8 +896,14 @@
       if (_ds_match_attribute(agent_config, "ParseToHeaders", "on")) {
         if (buf[0] == 0)
           body = 1;
-        if (!body && !strncasecmp(buf, "To: ", 4))
+        if (!body && !strncasecmp(buf, "To: ", 4) && !to)
           process_parseto(ATX, buf);
+	/* Overwrite To: parsing if Resent-To: is set */
+	if (!body && !strncasecmp(buf, "Resent-To: ", 11))
+	{
+	  process_parseto(ATX, buf);
+	  to = 1;
+	}
       }
 
       if (buffer_cat (message, buf) || buffer_cat(message, "\n"))
diff -Naur dspam-3.6.8/src/dspam.c dspam-3.6.8-patched/src/dspam.c
--- dspam-3.6.8/src/dspam.c	2006-05-30 17:03:55.000000000 +0200
+++ dspam-3.6.8-patched/src/dspam.c	2006-12-15 13:30:02.000000000 +0100
@@ -2142,7 +2142,7 @@
           while(node_header != NULL) {
             head = (ds_header_t) node_header->ptr;
             if (head->heading && 
-                !strcmp(head->heading, "X-DSPAM-Signature")) {
+               (!strcmp(head->heading, "X-DSPAM-Signature") || !strcmp(head->heading, "x-dspam-signature"))) { 
               if (!strncmp(head->data, SIGNATURE_BEGIN, 
                            strlen(SIGNATURE_BEGIN))) 
               {

Reply via email to