Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] DSPAM not writing signature to database
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Tue Nov 13, 2007 7:07 pm    Post subject: [SOLVED] DSPAM not writing signature to database Reply with quote

Greetings,

Please skip down to this post:
https://forums.gentoo.org/viewtopic-p-4505735.html#4505735

I'm trying to figure out why DSPAM is *not* piping my messages back to Postfix. Actually, with all my testing, it appears that sometimes mail is piped back but most of the time it does not (in which case I get my soft bounce)..

DSPAM is getting the message as can be seen by the DSPAM log below and by viewing the DSPAM data in the database. However, it is currently failing right after it determines whether the message is spam/not spam and does not pipe the message back to Postfix.

I've googled the error but the results returned don't seem to help me any....

Here is the relevant master.cf configuration (user dspam is listed as a "trusted user" in dspam.conf):
/etc/postfix/master.cf:
dspam           unix    -       n       n       -       10      pipe
 flags=DRhu user=dspam argv=/usr/bin/dspam
 --client --user ${recipient} --deliver=innocent,spam -i -f ${sender} -- ${recipient}


And the relevant dspam.conf configuration:
Code:
TrustedDeliveryAgent "/usr/sbin/sendmail"
Trust root
Trust dspam
Trust vmail
Trust postfix


Here are some logs:
/var/logs/postfix/postfix.log:
Nov 13 10:55:36 mail.mydomain.com postfix/pipe[23899]: E623A123AE: to=<user@mydomain.com>, orig_to=<alias@mydomain.com>, relay=dspam, delay=1.7, delays=1.7/0/0/0.01, dsn=4.3.0, status=SOFTBOUNCE (Command died with status 251: "/usr/bin/dspam")


/var/log/dspam/dspam.debug:
23300: [11/13/2007 10:36:15] Control: [10 10] [10 11] Delta: [0 1]
23300: [11/13/2007 10:36:15] total processing time: 0.00847s
23300: [11/13/2007 10:36:15] saving signature as 1,4739ee9f233002082988834
23300: [11/13/2007 10:36:15] libdspam returned probability of 0.002278
23300: [11/13/2007 10:36:15] message result: NOT SPAM


Any ideas would be appreciated. I'm not sure what else to look at.

Thanks


Last edited by Ateo on Tue Nov 20, 2007 12:05 am; edited 4 times in total
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Wed Nov 14, 2007 12:41 am    Post subject: Reply with quote

Are you running DSPAM in deamon mode?
Why using the pipe transport? Do you see any benefit using it? Why not switching to LMTP or SMTP?

// SteveB
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Wed Nov 14, 2007 1:01 am    Post subject: Reply with quote

steveb wrote:
Are you running DSPAM in deamon mode?

Yes.

steveb wrote:
Why using the pipe transport? Do you see any benefit using it? Why not switching to LMTP or SMTP?

To be honest, I can't answer the first two because I simply do not know. Shortly after posting here, I decided to try my luck with LMTP/SMTP mode in order to use socket connections to reduce tcp overhead but I'm still running into snags.

After restarting the services, as with pipe mode, DSPAM delivers the message back to Postfix. This works for a few messages but then DSPAM stops delivering back to Postfix (DSPAM continues to scan/score/etc) and the message ends up in the Postfix queue with errors. Here is the postfix log for 2 different delivery attempts with 2 different reasons for the [soft] bounce. Needless to say, I'm puzzled.

Code:
Nov 13 16:47:32 mail.mydomain.com postfix/lmtp[29667]: F2A9118A81: to=<user@mydomain.com>, orig_to=<alias@mydomain.com>, relay=mail.mydomain.com[/var/run/dspam/dspam.sock], delay=1.1, delays=1.1/0/0/0.01, dsn=4.4.2, status=deferred (lost connection with mail.mydomain.com[/var/run/dspam/dspam.sock] while sending end of data -- message may be sent more than once)


Code:
Nov 13 16:52:20 mail.mydomain.com postfix/lmtp[29733]: 9FB62142C2: to=<user@mydomain.com>, orig_to=<alias@mydomain.com>, relay=none, delay=1.6, delays=1.6/0/0/0, dsn=4.4.1, status=deferred (connect to mail.mydomain.net[/var/run/dspam/dspam.sock]: Connection refused)

Additionally, even with a successful delivery, DSPAM does not insert the signature into the sql database (dspam_signature_data) but *does* write the signature into the message header (as configured).

Regards


Last edited by Ateo on Fri Nov 16, 2007 12:10 am; edited 1 time in total
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Thu Nov 15, 2007 5:22 pm    Post subject: Reply with quote

Ok. My issue was the fact that I had set DSPAM's group file to "merged". Anyways, I set it to "shared" and everything delivers well.

However, one issue remains... For some reason, the signature is not written to the database (into dspam_signature_data). dspam_stats, dspam_token_data, dspam_virtual_uids are all written to as expected. What would cause this behavior?

Thanks
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Fri Nov 16, 2007 12:09 am    Post subject: Reply with quote

OK.. So I found forums.gentoo.org/viewtopic-t-580207.html very helpful. I followed it. Messages are scanned and delivered.

Still, the signature is not being written to the database. All other data is written to the database. To make things easy, I'm posting my config files:

Code:
boron ~ # dspam --version

DSPAM Anti-Spam Suite 3.8.0 (agent/library)

Copyright (c) 2002-2006 Jonathan A. Zdziarski
http://dspam.nuclearelephant.com

DSPAM may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the DSPAM distribution kit.

Configuration parameters:  '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--with-storage-driver=hash_drv,mysql_drv' '--with-dspam-home=/var/spool/dspam' '--sysconfdir=/etc/mail/dspam' '--enable-daemon' '--disable-ldap' '--enable-clamav' '--enable-large-scale' '--disable-domain-scale' '--disable-syslog' '--enable-debug' '--enable-bnr-debug' '--enable-long-usernames' '--with-dspam-group=dspam' '--with-dspam-home-group=dspam' '--with-dspam-mode=2511' '--with-logdir=/var/log/dspam' '--enable-virtual-users' '--enable-preferences-extension' '--disable-homedir' '--with-mysql-includes=/usr/include/mysql' '--with-mysql-libraries=/usr/lib/mysql' '--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=prescott -O2 -pipe -fomit-frame-pointer -Wl,-z,now' 'CXXFLAGS=-march=prescott -O2 -pipe -fomit-frame-pointer -Wl,-z,now'

/etc/postfix/main.cf:
smtpd_recipient_restrictions =
 permit_mynetworks,
 permit_sasl_authenticated,
 ...
 reject_invalid_hostname,
 check_policy_service inet:127.0.0.1:666,
 check_recipient_access pcre:/etc/postfix/maps/dspam_incoming,
 permit

/etc/postfix/master.cf:
dspam     unix  -       -       n       -       10      lmtp
127.0.0.1:667 inet    n       -       n       -       -       smtpd
 -o smtpd_authorized_xforward_hosts=127.0.0.0/8
 -o smtpd_client_restrictions=
 -o smtpd_helo_restrictions=
 -o smtpd_sender_restrictions=
 -o smtpd_recipient_restrictions=permit_mynetworks,reject
 -o mynetworks=127.0.0.0/8
 -o receive_override_options=no_unknown_recipient_checks

/etc/postfix/maps/dspam_incoming:
/./     FILTER dspam:unix:/var/run/dspam/dspam.sock

/etc/mail/dspam/dspam.conf:
Home /var/spool/dspam
StorageDriver /usr/lib/dspam/libmysql_drv.so
TrustedDeliveryAgent "/usr/sbin/sendmail"
UntrustedDeliveryAgent "/usr/sbin/sendmail"
DeliveryHost        127.0.0.1
DeliveryPort        667
DeliveryIdent       dspam.mydomain.net
DeliveryProto       SMTP
OnFail error
Trust root
Trust dspam
Trust apache
Trust mail
Trust smmsp
Trust daemon
Trust filter
Trust postfix
Debug *
TrainingMode toe
TestConditionalTraining on
Feature noise
Feature whitelist
Feature tb=5
Algorithm burton graham naive
Tokenizer osb
PValue bcr
WebStats on
ImprobabilityDrive on
Preference "trainingMode=TOE"      # TEFT, TUM, TOE
Preference "spamAction=tag"      # tag, quarantine, deliver
Preference "signatureLocation=headers"   # 'message' or 'headers'
Preference "spamSubject="
Preference "statisticalSedation=5"   # 0 to 9
Preference "enableBNR=on"      # on, off
Preference "showFactors=off"      # on, off
Preference "enableWhitelist=on"      # on, off
Preference "whitelistThreshold=5"
AllowOverride trainingMode
AllowOverride spamAction spamSubject
AllowOverride statisticalSedation
AllowOverride enableBNR
AllowOverride enableWhitelist
AllowOverride signatureLocation
AllowOverride showFactors
AllowOverride optIn optOut
AllowOverride whitelistThreshold
MySQLServer     /var/run/mysqld/mysqld.sock
MySQLUser __db_username__
MySQLPass __db_password__
MySQLDb dspamdb
MySQLCompress true
MySQLConnectionCache    10
MySQLVirtualTable          dspam_virtual_uids
MySQLVirtualUIDField       uid
MySQLVirtualUsernameField  username
MySQLUIDInSignature    on
HashRecMax              98317
HashAutoExtend          on
HashMaxExtents          0
HashExtentSize          49157
HashPctIncrease 10
HashMaxSeek             10
HashConnectionCache     10
Notifications   off
PurgeSignature  off # Specified in purge.sql
PurgeNeutral   90
PurgeUnused    off # Specified in purge.sql
PurgeHapaxes   off # Specified in purge.sql
PurgeHits1S    off # Specified in purge.sql
PurgeHits1I    off # Specified in purge.sql
LocalMX 127.0.0.1 192.168.4.245
SystemLog on
UserLog   on
TrainPristine on
Opt out
TrackSources spam nonspam
ParseToHeaders on
ChangeModeOnParse on
ChangeUserOnParse off
Broken case
Broken lineStripping
MaxMessageSize 102400
ServerQueueSize         32
ServerPID              /var/run/dspam/dspam.pid
ServerMode auto
ServerParameters        "--deliver=innocent,spam"
ServerIdent             "dspam.mydomain.net"
ServerDomainSocketPath  "/var/run/dspam/dspam.sock"
ClientHost      "/var/run/dspam/dspam.sock"
ProcessorURLContext on
ProcessorBias on

/var/spool/dspam/group:
global:shared:*

DB Table: dspam_virtual_uids:
uid   username
===================
10   global
## END OF LIST

DB Table: dspam_preferences:
uid   preference      value
=======================================
10   trainingMode      TOE
10   statisticalSedation   5
10   spamSubject
10   spamAction      tag
10   signatureLocation   header
10   showFactors      off
10   optOut         on
10   optIn         off
10   enableWhitelist      on
10   enableBNR      on
## END OF LIST

Please note that I am letting DSPAM learn as mail comes in. I'm not doing any mass training as policyd-weight rejects spam very nicely.

//edit I've changed the title to reflect the current issue
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Fri Nov 16, 2007 11:45 pm    Post subject: Reply with quote

Try this:
Code:
dspam_admin change preference global optOut off
dspam_admin change preference global optIn on
sed -i -e "s:^Opt[\t ]*out[\t ]*$:Opt in:gI" /etc/mail/dspam/dspam.conf


Did that solved the problem?

// SteveB
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Sat Nov 17, 2007 12:56 am    Post subject: Reply with quote

One step ahead of you. I tried playing with opt in/out but that doesn't seem to help any...

Thanks
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Sat Nov 17, 2007 9:34 am    Post subject: Reply with quote

You wrote:
Ateo wrote:
All other data is written to the database.

What do you mean with all other data? Does anything get written into the database? What does get written into the database?

Could you try to remove the shared group? Does it work without the shared group?

// SteveB
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Sat Nov 17, 2007 4:52 pm    Post subject: Reply with quote

steveb wrote:
You wrote:
Ateo wrote:
All other data is written to the database.

What do you mean with all other data? Does anything get written into the database? What does get written into the database?


DSPAM has 5 tables in the database. dspam_preferences, dspam_signature_data, dspam_stats, dspam_token_data and dspam_virtual_uids. When I say all other data is written, I mean, stats are accounted for for the user, tokens are written and, if no user exists, the user mail is being delivered for AND the user from the group file are created. So, all data except the signature is being saved to the database.

steveb wrote:
Could you try to remove the shared group? Does it work without the shared group?


I have removed the shared group. In fact, I have removed the file and the issue remains (signature not being stored to database).

FYI: I started with a clean database (dropped DB and recreated). A new user (the user mail is being delivered for) was added to dspam_virtual_uids, tokens were saved to dspam_token_data and stats were started for the user in dspam_stats.
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Sat Nov 17, 2007 8:01 pm    Post subject: Reply with quote

Do you get a signature if you try to pipe a mail to dspam from the command line?

// SteveB
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Sat Nov 17, 2007 9:42 pm    Post subject: Reply with quote

No. I do not. Same behavior. Starting with an empty database, the user is created on the fly, stats and tokens saved. Yet no signature...

debug does claim a signature is created/saved:

/var/log/dspam/dspam.debug:
.....
20002: [11/17/2007 13:38:48] Control: [10 10] [10 11] Delta: [0 1]
20002: [11/17/2007 13:38:48] total processing time: 0.02426s
20002: [11/17/2007 13:38:48] saving signature as 4,473f5f68200022095112453
20002: [11/17/2007 13:38:48] libdspam returned probability of 0.000000
20002: [11/17/2007 13:38:48] message result: NOT SPAM
20002: [11/17/2007 13:38:48] DSPAM Instance Shutdown.  Exit Code: 0
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Sun Nov 18, 2007 8:38 am    Post subject: Reply with quote

Could you post the structure of your tables inside dspamdb? And how are the rights to the database/tables for the DSPAM user? Could you post that info as well?

// SteveB
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Sun Nov 18, 2007 9:11 am    Post subject: Reply with quote

The following is created (user database user and database) with from running:
Code:
emerge --config =dspam-3.8.0-r7


The dspam user has the following rights (I've even set permissions to all):
Code:

Databases    User    Hosts    Permissions
======================================================
dspamdb      dspam   Any      Select | Insert | Update | Delete

Here is the DB structure:
Code:
CREATE TABLE `dspam_preferences` (
  `uid` smallint(5) unsigned NOT NULL,
  `preference` varchar(32) NOT NULL,
  `value` varchar(64) NOT NULL,
  UNIQUE KEY `id_preferences_01` (`uid`,`preference`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `dspam_signature_data` (
  `uid` smallint(5) unsigned NOT NULL,
  `signature` char(32) NOT NULL,
  `data` blob NOT NULL,
  `length` smallint(6) NOT NULL,
  `created_on` date NOT NULL,
  UNIQUE KEY `id_signature_data_01` (`uid`,`signature`),
  KEY `id_signature_data_02` (`created_on`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=2500000 AVG_ROW_LENGTH=8096;

CREATE TABLE `dspam_stats` (
  `uid` smallint(5) unsigned NOT NULL,
  `spam_learned` int(11) NOT NULL,
  `innocent_learned` int(11) NOT NULL,
  `spam_misclassified` int(11) NOT NULL,
  `innocent_misclassified` int(11) NOT NULL,
  `spam_corpusfed` int(11) NOT NULL,
  `innocent_corpusfed` int(11) NOT NULL,
  `spam_classified` int(11) NOT NULL,
  `innocent_classified` int(11) NOT NULL,
  PRIMARY KEY  (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `dspam_token_data` (
  `uid` smallint(5) unsigned NOT NULL,
  `token` bigint(20) unsigned NOT NULL,
  `spam_hits` int(11) NOT NULL,
  `innocent_hits` int(11) NOT NULL,
  `last_hit` date NOT NULL,
  UNIQUE KEY `id_token_data_01` (`uid`,`token`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PACK_KEYS=1;

CREATE TABLE `dspam_virtual_uids` (
  `uid` smallint(5) unsigned NOT NULL auto_increment,
  `username` varchar(128) default NULL,
  PRIMARY KEY  (`uid`),
  UNIQUE KEY `id_virtual_uids_01` (`username`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;


Thanks
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Sun Nov 18, 2007 3:29 pm    Post subject: Reply with quote

Are you open to new stuff? Would it be possible to drop the tables and recreate them?

// SteveB
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Sun Nov 18, 2007 6:55 pm    Post subject: Reply with quote

Absolutely. I'm open to about anything right now. This issue is over a week old.. =)
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Sun Nov 18, 2007 8:40 pm    Post subject: Reply with quote

Okay. First stop DSPAM:
Code:
/etc/init.d/dspam stop


Then drop the database and the DSPAM user from your MySQL instance:
Code:
DROP DATABASE dspamdb;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM dspam;


Then clear all the stuff in /var/spool/dspam/data:
Code:
rm -rf /var/spool/dspam/data/*


Now use the ebuild to create the database and the other stuff:
Code:
emerge --config =dspam-3.8.0-r7


Now create the user with uid 0 (used for default preferences). Connect to your MySQL and execute:
Code:
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";INSERT INTO dspamdb.dspam_virtual_uids VALUES ('0', 'default_prefs');


Now fill in the default parameters:
Code:
dspam_admin change preference default_prefs enableBNR "on"
dspam_admin change preference default_prefs enableWhitelist "on"
dspam_admin change preference default_prefs ignoreGroups "off"
dspam_admin change preference default_prefs optIn "on"
dspam_admin change preference default_prefs optOut "off"
dspam_admin change preference default_prefs optOutClamAV "off"
dspam_admin change preference default_prefs processorBias "on"
dspam_admin change preference default_prefs showFactors "off"
dspam_admin change preference default_prefs signatureLocation "header"
dspam_admin change preference default_prefs spamAction "tag"
dspam_admin change preference default_prefs spamSubject "[SPAM]"
dspam_admin change preference default_prefs statisticalSedation "5"
dspam_admin change preference default_prefs storeFragments "off"
dspam_admin change preference default_prefs trainingMode "TOE"
dspam_admin change preference default_prefs whitelistThreshold "10"


If you go with shared groups, then you don't need to add the part blow with the preferences for the user "global". If you go with merged groups, then add this:
Code:
dspam_admin change preference global enableBNR "on"
dspam_admin change preference global enableWhitelist "off"
dspam_admin change preference global ignoreGroups "on"
dspam_admin change preference global optIn "on"
dspam_admin change preference global optOut "off"
dspam_admin change preference global optOutClamAV "on"
dspam_admin change preference global processorBias "off"
dspam_admin change preference global showFactors "off"
dspam_admin change preference global signatureLocation "header"
dspam_admin change preference global spamAction "tag"
dspam_admin change preference global spamSubject ""
dspam_admin change preference global statisticalSedation "5"
dspam_admin change preference global storeFragments "off"
dspam_admin change preference global trainingMode "TOE"
dspam_admin change preference global whitelistThreshold "999999"


Now create the shared group (I personally would use merged group but you have probably your reasons to use shared):
Code:
echo "global:shared:*">/var/spool/dspam/group


Now restart DSPAM and try to classify. Is the signature now showing up in the database?


// SteveB
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Sun Nov 18, 2007 10:00 pm    Post subject: Reply with quote

GADS! It's still not writing the signature....

But the log says different...
Code:
22472: [11/18/2007 13:47:18] DSPAM Instance Startup
22472: [11/18/2007 13:47:18] input args: dspam --deliver=innocent,spam
22472: [11/18/2007 13:47:18] pass-thru args: /usr/sbin/sendmail
22472: [11/18/2007 13:47:18] processing user user@domain.com
22472: [11/18/2007 13:47:18] uid = 0, euid = 0, gid = 0, egid = 1002
22472: [11/18/2007 13:47:18] loading preferences for user user@domain.com
22472: [11/18/2007 13:47:18] Loading preferences for uid 2
22472: [11/18/2007 13:47:18] Loading preferences for uid 0
22472: [11/18/2007 13:47:18] Loading preferences for uid 0
22472: [11/18/2007 13:47:18] loaded default preferences externally
22472: [11/18/2007 13:47:18] using /var/spool/dspam/opt-in/user@domain.com.dspam as path
22472: [11/18/2007 13:47:18] using /var/spool/dspam/opt-out/user@domain.com.nodspam as path
22472: [11/18/2007 13:47:18] adding user to merged group global
22472: [11/18/2007 13:47:18] sedation level set to: 5
22472: [11/18/2007 13:47:18] Loading 4 BNR patterns
22472: [11/18/2007 13:47:18] Whitelist threshold: 10
....... tests .......
22472: [11/18/2007 13:47:18] Naive-Bayesian Probability: 0.000000 Samples: 195
22472: [11/18/2007 13:47:18] Graham-Bayesian Probability: 0.002278 Samples: 15
22472: [11/18/2007 13:47:18] Burton-Bayesian Probability: 0.000018 Samples: 27
22472: [11/18/2007 13:47:18] Result Confidence: 1.00
22472: [11/18/2007 13:47:18] BNR Decision Concurs
22472: [11/18/2007 13:47:18] Control: [10 10] [10 11] Delta: [0 1]
22472: [11/18/2007 13:47:18] total processing time: 0.02083s
22472: [11/18/2007 13:47:18] saving signature as 2,4740b2e6224721560216709
22472: [11/18/2007 13:47:18] libdspam returned probability of 0.000000
22472: [11/18/2007 13:47:18] message result: NOT SPAM
22472: [11/18/2007 13:47:18] delivering message
22472: [11/18/2007 13:47:18] Establishing connection to 127.0.0.1:11025
22472: [11/18/2007 13:47:18] Connection established
22472: [11/18/2007 13:47:19] DSPAM Instance Shutdown.  Exit Code: 0
22472: [11/18/2007 13:47:19] checking trusted user list for root(0)


dspam_preferences populated... CHECK
dspam_stats saved... CHECK
dspam_token_data saved... CHECK
dspam_virtual_uids saved... CHECK

Frustrating... No signature... I followed your instructions 3 times.

I appreciate your help...
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Sun Nov 18, 2007 10:09 pm    Post subject: Reply with quote

Strange! Do you see an entry in /var/spool/dspam/system.log referencing the mail?
To me this all looks like you are using the hash driver and not mysql driver. What output do you get from:
Code:
find /var/spool/dspam/data/


// SteveB
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Sun Nov 18, 2007 10:14 pm    Post subject: Reply with quote

Yes I do...

Code:
1195422438      I       "Agent J" <amoeba.x@gmail.com>  2,4740b2e6224721560216709       DSPAM + error 251       0.022397        user@domain.com      Delivered    <d24d28bc0711181347l49240a07yaaa932a8be558539@mail.gmail.com>
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Sun Nov 18, 2007 10:39 pm    Post subject: Reply with quote

What output do you get from this command:
Code:
echo -ne "Date: $(date)\nFrom: Agent J <amoeba.x@gmail.com>\nTo: user@domain.com\nSubject: Link\n\nhttp://www.linux-magazin.de\n" | dspam --user user@domain.com --deliver=summary --stdout


Please replace "user@domain.com" with your user name you use in DSPAM.

If that works, then you probably have a connectivity issue. Either with connecting to the DSPAM socket or to MySQL. What version of MySQL are you using?

Do you have the file /var/log/dspam/sql.errors? If so, what is the content?


// SteveB
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Sun Nov 18, 2007 11:45 pm    Post subject: Reply with quote

The output of the above command:
Code:
$ echo -ne "Date: $(date)\nFrom: Agent J <amoeba.x@gmail.com>\nTo: user@domain.com\nSubject: Link\n\nhttp://www.linux-magazin.de\n" | dspam --user user@domain.com --deliver=summary --stdout                             
X-DSPAM-Result: user@domain.com; result="Innocent"; class="Innocent"; probability=0.0000; confidence=1.00; signature=2,4740cd70247925939618124


I am using dev-db/mysql-5.0.44-r2...

/var/log/dspam/sql.errors does not currently exist. In my time debugging, the only time I've seen this log file created is when DSPAM attempts to load a preference with an empty value. In my case, I had the preference "spamSubject" set to an empty value. Other than that, I've not had any other SQL errors written.
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Mon Nov 19, 2007 12:28 am    Post subject: Reply with quote

Have you tuned your MySQL server for DSPAM? The whole stuff sounds like DSPAM is loosing connectivity to MySQL. Have you tried to apply the patches from Bugzilla Bug 199428?

Especially the dspam-3.8.0-mysql_reconnect.patch?

// SteveB
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Mon Nov 19, 2007 6:44 pm    Post subject: Reply with quote

I applied the reconnect patch (actually, I applied all patches). The signature is still not being written. Also, dspam_stats is no longer written to.

I am going to try with PgSQL...
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Mon Nov 19, 2007 8:10 pm    Post subject: Reply with quote

Ateo wrote:
I applied the reconnect patch (actually, I applied all patches). The signature is still not being written. Also, dspam_stats is no longer written to.

I am going to try with PgSQL...
This is ultra fishy. PostgreSQL could be a solution but I would be very much be interested in seeing what the problem is with MySQL.

// SteveB
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Mon Nov 19, 2007 8:50 pm    Post subject: Reply with quote

Is it normal to have the comma in the signature?

Quote:

signature=2,4740cd70247925939618124


Only none of mine do.

Code:

X-DSPAM-Result: user; result="Innocent"; class="Innocent"; probability=0.0000; confidence=0.42; signature=4741f5b9174681804284693
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum