I get things setup and then send a simple test message. Next I tried to retrain that message as spam. (Note I'm working with lab systems, so I have to simulate somethings.) Below I have various configs, debug output, etc..
Using dspam_stats c...@balius.com it shows before the training c...@balius.com TP: 0 TN: 1 FP: 0 FN: 0 SC: 0 NC: 0 Then I simulate the forwarding of the message and put the contents into /tmp/spam.msg and then try and retrain, unfortunately dspam is not reading the UID from signature. cat /tmp/spam.msg | /usr/local/bin/dspam --debug --user root --class=spam --source=error root@avs1 log# cat dspam.debug 31185: [02/17/2012 05:16:47] No QuarantineAgent option found. Using standard quarantine. 31185: [02/17/2012 05:16:47] DSPAM Instance Startup 31185: [02/17/2012 05:16:47] input args: /usr/local/bin/dspam --debug --user root --class=spam --source=error 31185: [02/17/2012 05:16:47] pass-thru args: 31185: [02/17/2012 05:16:47] processing user root 31185: [02/17/2012 05:16:47] uid = 0, euid = 0, gid = 0, egid = 0 31185: [02/17/2012 05:16:47] loading preferences for user root 31185: [02/17/2012 05:16:47] _mysql_drv_getpwnam: returning NULL for query on name: root 31185: [02/17/2012 05:16:47] _ds_pref_load: unable to _mysql_drv_getpwnam(root) 31185: [02/17/2012 05:16:47] Loading preferences for uid 0 31185: [02/17/2012 05:16:47] Loading preferences for uid 0 31185: [02/17/2012 05:16:47] loaded default preferences externally 31185: [02/17/2012 05:16:47] using /var/dspam/opt-in/local/root.dspam as path 31185: [02/17/2012 05:16:47] using /var/dspam/opt-out/local/root.nodspam as path 31185: [02/17/2012 05:16:47] sedation level set to: 0 31185: [02/17/2012 05:16:47] _mysql_drv_getpwnam: returning NULL for query on name: root 31185: [02/17/2012 05:16:47] _mysql_drv_get_spamtotals: unable to _mysql_drv_getpwnam(root) 31185: [02/17/2012 05:16:47] _ds_init_storage: unable to load totals. Using zero values. 31185: [02/17/2012 05:16:47] found signature '1,4f3de250284914664215502' 31185: [02/17/2012 05:16:47] _mysql_drv_getpwnam: returning NULL for query on name: root 31185: [02/17/2012 05:16:47] _ds_get_signature: unable to _mysql_drv_getpwnam(root) 31185: [02/17/2012 05:16:47] _mysql_drv_getpwnam: returning NULL for query on name: root 31185: [02/17/2012 05:16:47] _mysql_drv_set_spamtotals: unable to _mysql_drv_getpwnam(root) 31185: [02/17/2012 05:16:47] DSPAM Instance Shutdown. Exit Code: 0 If I run the above but instead of "root" I use value "c...@balius.com" for the user parameter it retrains as expected. From the debug output I see that it found the signature but dspam insists on using the value of the user parameter instead of getting it from the signature. I'm trying to follow the readme which says > Now all you'll need is a single system-wide alias, and DSPAM will train > the appropriate user when it sees the signature. An example of an alias > might look like: > > spam:"|/usr/local/bin/dspam --user root --class=spam --source=error" > > Hopefully I've missed something fairly simple, though I've tried to be really through in looking into this. root@avs1 log# cat /tmp/spam.msg Return-Path: <c...@balius.com> X-Original-To: c...@balius.com Delivered-To: c...@balius.com Received: from localhost (localhost [127.0.0.1]) by in.mx.balius.com (Postfix) with ESMTP id 2D8E778890 for <c...@balius.com>; Fri, 17 Feb 2012 08:43:41 +0000 (GMT) Received: from in.mx.balius.com ([127.0.0.1]) by localhost (jamesmadison.balius.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AZVyOksa5h57 for <c...@balius.com>; Fri, 17 Feb 2012 08:43:39 +0000 (GMT) Received: from [10.0.0.78] (68-189-209-142.static.ftwo.tx.charter.com [68.189.209.142]) by in.mx.balius.com (Postfix) with ESMTPSA id D84F57888F for <c...@balius.com>; Fri, 17 Feb 2012 08:43:39 +0000 (GMT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1251.1) Subject: Fwd: Test Message From: Chad M Stewart <c...@balius.com> X-Mac: It Just Works! Date: Fri, 17 Feb 2012 02:43:39 -0600 Content-Transfer-Encoding: 7bit Message-Id: <af19e076-0e84-492c-b9e8-ae41a1564...@balius.com> References: <20120217051456.C2633338D7B@avs1.localdomain> To: <s...@balius.com> X-Mailer: Apple Mail (2.1251.1) Begin forwarded message: > From: Chad <openbsdro...@gmail.com> > Subject: Test Message > Date: April 16, 2012 3:21:26 PM CDT > To: <c...@balius.com> > > Hi there! This is supposed to be a real email... > > Have a good day! > Alice > > > !DSPAM:1,4f3de250284914664215502! > > >From the database mysql> select * from dspam_virtual_uids; +-----+-----------------+ | uid | username | +-----+-----------------+ | 1 | c...@balius.com | +-----+-----------------+ 1 row in set (0.00 sec) mysql> select * from dspam_preferences; +-----+-----------------+------------+ | uid | preference | value | +-----+-----------------+------------+ | 1 | enableWhitelist | off | | 0 | trainingMode | TEFT | | 0 | spamAction | quarantine | | 0 | spamSubject | [SPAM] | | 0 | enableWhitelist | on | | 0 | showFactors | off | +-----+-----------------+------------+ 6 rows in set (0.00 sec) dspam configuration root@avs1 log# grep -v '^#' /etc/dspam/dspam.conf |sed '/^$/d'|grep -v IgnoreHead Home /var/dspam StorageDriver /usr/local/lib/dspam/libmysql_drv.so TrustedDeliveryAgent "/usr/bin/procmail" DeliveryHost 127.0.0.1 DeliveryPort 10025 DeliveryIdent localhost DeliveryProto SMTP FallbackDomains on EnablePlusedDetail on PlusedCharacter + OnFail error Trust root Trust dspam Trust apache Trust mail Trust mailnull Trust smmsp Trust daemon Debug * TrainingMode teft TestConditionalTraining on Feature whitelist Algorithm graham burton Tokenizer osb PValue bcr WebStats on Preference "trainingMode=TEFT" # { TOE | TUM | TEFT | NOTRAIN } -> default:teft Preference "spamAction=quarantine" # { quarantine | tag | deliver } -> default:quarantine Preference "spamSubject=[SPAM]" # { string } -> default:[SPAM] Preference "statisticalSedation=5" # { 0 - 10 } -> default:0 Preference "enableBNR=on" # { on | off } -> default:off Preference "enableWhitelist=on" # { on | off } -> default:on Preference "signatureLocation=headers" # { message | headers } -> default:message Preference "tagSpam=off" # { on | off } Preference "tagNonspam=off" # { on | off } Preference "showFactors=off" # { on | off } -> default:off Preference "optIn=off" # { on | off } Preference "optOut=off" # { on | off } Preference "whitelistThreshold=10" # { Integer } -> default:10 Preference "makeCorpus=off" # { on | off } -> default:off Preference "storeFragments=off" # { on | off } -> default:off Preference "localStore=" # { on | off } -> default:username Preference "processorBias=on" # { on | off } -> default:on Preference "fallbackDomain=off" # { on | off } -> default:off Preference "trainPristine=off" # { on | off } -> default:off Preference "optOutClamAV=off" # { on | off } -> default:off Preference "ignoreRBLLookups=off" # { on | off } -> default:off Preference "RBLInoculate=off" # { on | off } -> default:off Preference "notifications=off" # { on | off } -> default:off AllowOverride enableBNR AllowOverride enableWhitelist AllowOverride fallbackDomain AllowOverride ignoreGroups AllowOverride ignoreRBLLookups AllowOverride localStore AllowOverride makeCorpus AllowOverride optIn AllowOverride optOut AllowOverride optOutClamAV AllowOverride processorBias AllowOverride RBLInoculate AllowOverride showFactors AllowOverride signatureLocation AllowOverride spamAction AllowOverride spamSubject AllowOverride statisticalSedation AllowOverride tagNonspam AllowOverride tagSpam AllowOverride trainPristine AllowOverride trainingMode AllowOverride whitelistThreshold AllowOverride dailyQuarantineSummary AllowOverride notifications MySQLServer 127.0.0.1 MySQLPort 3306 MySQLUser dspam MySQLPass ****** MySQLDb dspam MySQLCompress true MySQLReconnect true MySQLUIDInSignature on HashRecMax 98317 HashAutoExtend on HashMaxExtents 0 HashExtentSize 49157 HashPctIncrease 10 HashMaxSeek 10 HashConnectionCache 10 Notifications off PurgeSignatures 14 # Stale signatures PurgeNeutral 90 # Tokens with neutralish probabilities PurgeUnused 90 # Unused tokens PurgeHapaxes 30 # Tokens with less than 5 hits (hapaxes) PurgeHits1S 15 # Tokens with only 1 spam hit PurgeHits1I 15 # Tokens with only 1 innocent hit LocalMX 127.0.0.1 SystemLog on UserLog on Opt out ClamAVPort 25263 ClamAVHost 127.0.0.1 ClamAVResponse spam ServerHost 127.0.0.1 ServerPort 37726 ServerQueueSize 32 ServerPID /var/run/dspam/dspam.pid ServerParameters "--deliver=innocent,spam" ServerIdent "dspam.balius.tld" ServerMode standard ProcessorURLContext on ProcessorBias on StripRcptDomain off root@avs1 log# Thank you, Chad ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Dspam-user mailing list Dspam-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspam-user