I am having an interesting problem and I am wondering if anyone else has had this problem. Sometimes dspam tags my spam message with the tag "[SPAM]" instead of what the user has set within that user's preferences. The messages are not coming in with that "[SPAM]" tag on it, as you can see from my attached logs. It also seems that everytime dspam tags a message incorrectly, dspam logs "unable to initialize tools context" three times, followed by "Unable to attach DSPAM context. Retrying.", dspam then report finding that message as spam.

My setup is Exim, dspam 3.8.0 server/client, opt-out, mysql 5 (DB over TCP on seperate machine), "spamSubject="{SPAM}" is set in dspam.conf, and no user has spamSubject set to "[SPAM]" in the DB.

I think it has something to do with lines 1057 to 1063 in src/ dspam.c. I am not much of a C programmer but it appers to me that _ds_pref_val is failing so spam_subject stays set to "[SPAM]" as it is on line 1057. here is the bit of code that I am refering to:

--------

strcpy(spam_subject, "[SPAM]");
if (_ds_pref_val(ATX->PTX, "spamSubject")[0] != '\n' &&
    _ds_pref_val(ATX->PTX, "spamSubject")[0] != 0)
{
  strlcpy(spam_subject, _ds_pref_val(ATX->PTX, "spamSubject"),
          sizeof(spam_subject));
}

--------

also here are the logs and the header that coraspond to a message that was missed tagged. In this instance "Scorpius" is an inbound mail server that routes dspam users mail to my dspam server, "Puddleglum". You also can note that I am logging subjects, "3 for 4 Class Special" in this instance, and dspam is reporting that "unable to initialize tools context" message.

----- logs -----

Jan 8 14:15:06 Scorpius exim[9939]: 2008-01-08 14:15:06 1JCKqo-0002aJ-75 <= [EMAIL PROTECTED] H=mail179.e2ma.net [66.179.147.179] P=esmtp S=14190 id=5e2c07cc16f22a988620b38af34dd98c. [EMAIL PROTECTED] T="3 for 4 Class Special" Jan 8 14:16:28 Scorpius exim[10484]: 2008-01-08 14:16:28 1JCKqo-0002aJ-75 => [EMAIL PROTECTED] R=dspam_router T=dspam_server H=dspam.local [192.168.42.71] Jan 8 14:16:28 Scorpius exim[10484]: 2008-01-08 14:16:28 1JCKqo-0002aJ-75 Completed

Jan 8 14:16:27 Puddleglum exim[21298]: 2008-01-08 14:16:27 1JCKs7-0005XW-SC <= [EMAIL PROTECTED] H=scorpius.local (mail.esu10.org) [192.168.42.35] P=esmtp S=14831 [EMAIL PROTECTED] T="3 for 4 Class Special" Jan 8 14:16:28 Puddleglum exim[21305]: 2008-01-08 14:16:28 1JCKs7-0005XW-SC => xxxxxxxx <[EMAIL PROTECTED]> R=dspam_local_p42_scan T=dspam_spam_check Jan 8 14:16:28 Puddleglum exim[21305]: 2008-01-08 14:16:28 1JCKs7-0005XW-SC Completed

Jan 8 14:16:27 Puddleglum dspam[16674]: unable to initialize tools context Jan 8 14:16:27 Puddleglum dspam[16674]: unable to initialize tools context Jan 8 14:16:27 Puddleglum dspam[16674]: unable to initialize tools context Jan 8 14:16:27 Puddleglum dspam[16674]: Unable to attach DSPAM context. Retrying.

Jan 8 14:16:28 Puddleglum dspam[16674]: spam detected from 66.179.147.179

Jan 8 14:16:28 Puddleglum exim[21313]: 2008-01-08 14:16:28 1JCKs8-0005Xl-RS <= [EMAIL PROTECTED] U=root P=spam-scanned S=15777 [EMAIL PROTECTED] T="[SPAM] 3 for 4 Class Special" Jan 8 14:16:28 Puddleglum exim[21314]: 2008-01-08 14:16:28 1JCKs8-0005Xl-RS => xxxxxxxx <[EMAIL PROTECTED]> R=local_project42_user T=local_project42_delivery Jan 8 14:16:28 Puddleglum exim[21314]: 2008-01-08 14:16:28 1JCKs8-0005Xl-RS Completed

----- message headers ------

From:   [EMAIL PROTECTED]
Subject: [SPAM] 3 for 4 Class Special
Date: January 8, 2008 2:15:34 PM CST
To:   [EMAIL PROTECTED]
Return-Path: <[EMAIL PROTECTED]>
Envelope-To: [EMAIL PROTECTED]
Received: from root by project42.k12.ne.us with spam-scanned (Exim 4.68) (envelope-from <[EMAIL PROTECTED]>) id 1JCKs8-0005Xl-RS for [EMAIL PROTECTED]; Tue, 08 Jan 2008 14:16:28 -0600 Received: from scorpius.local ([192.168.42.35] helo=mail.esu10.org) by project42.k12.ne.us with esmtp (Exim 4.68) (envelope-from <[EMAIL PROTECTED]>) id 1JCKs7-0005XW-SC for [EMAIL PROTECTED]; Tue, 08 Jan 2008 14:16:27 -0600 Received: from mail179.e2ma.net ([66.179.147.179]) by mail.esu10.org with esmtp (Exim 4.54) id 1JCKqo-0002aJ-75 for [EMAIL PROTECTED]; Tue, 08 Jan 2008 14:15:06 -0600
Mime-Version: 1.0
Precedence: bulk
Message-Id: <[EMAIL PROTECTED]>
Content-Type: multipart/alternative; boundary="-- =F10D60AFF8CC4A9EAEA1_4EBE_4AF4_6810"
X-Dspam-Result: Spam
X-Dspam-Processed: Tue Jan  8 14:16:28 2008
X-Dspam-Confidence: 0.6389
X-Dspam-Probability: 1.0000
X-Dspam-Signature: 17,4783da1c166741444318844
X-Dspam-Factors: 15, (, 0.00442, color=#ff0000+size=4><FONT, 0.99000, alt="info+1Staff, 0.99000, that+are, 0.01000, width="131"+height="25">, 0.99000, Development"+width="650", 0.99000, width="117"+height="25", 0.99000, Training+&, 0.99000, <FONT +color=#000000>for, 0.99000, From*<info, 0.99000, Subject*Class, 0.99000, target=_blank+>Ethical, 0.99000, align="left"+alt="">, 0.99000, Url*net/map/view=CampaignPublic/id=315, 0.99000, "+alt="info, 0.99000

Reply via email to