Package: dspam
Severity: normal
Tags: patch

When dspam is configured with a global shared user in addition to
individual dspam learners, it occasionally classifies the message one
way but writes the headers the other.

I brought this up on the dspam development list a while back in hopes
of getting feedback from upstream, but nothing has been forthcoming.
Meanwhile, i'm using this patch in production now, and shared users
doesn't work as expected without it.

For detailed analysis of why i think it's necessary code-wise, see my
initial post to the dev list:

  http://article.gmane.org/gmane.mail.spam.dspam.devel/2480

And there's more discussion about the need for such a patch on
dspam-users:

  http://thread.gmane.org/gmane.mail.spam.dspam.user/10941

I'll commit this patch to pkg-dspam svn shortly, unless there are
objections.

        --dkg


diff -urNad dspam-3.6.8/src/dspam.c /tmp/dpep.a28IM6/dspam-3.6.8/src/dspam.c
--- dspam-3.6.8/src/dspam.c     2006-06-23 02:37:49.000000000 -0400
+++ /tmp/dpep.a28IM6/dspam-3.6.8/src/dspam.c    2006-06-23 02:43:39.734556401 
-0400
@@ -2698,6 +2698,8 @@
       memcpy(&CTX->totals, &CTC->totals, sizeof(struct _ds_spam_totals));
       free(CTC);
       CTX->totals.spam_misclassified--;
+      strncpy(CTX->class, LANG_CLASS_SPAM, sizeof(CTX->class));
+      /* should we be resetting CTX->probability and CTX->confidence here as 
well? */
       CTX->result = result;
     }
 
@@ -2722,6 +2724,8 @@
       memcpy(&CTX->totals, &CTC->totals, sizeof(struct _ds_spam_totals));
       free(CTC);
       CTX->totals.innocent_misclassified--;
+      strncpy(CTX->class, LANG_CLASS_INNOCENT, sizeof(CTX->class));
+      /* should we be resetting CTX->probability and CTX->confidence here as 
well? */
       CTX->result = result;
     }
   }


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-2-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to