store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Wed May 22, 2013 9:29 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: bayes_db not recreated after deletion...
Unread postPosted: Fri Feb 10, 2006 6:03 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Dec 06, 2004 10:43 pm
Posts: 449
Ok, after deleting my bayes db from the following location, it still hasn't been recreated and I know I'm missing something. I've removed and reinstalled spamassassin, psa-spamassassin, qmail-scanner. I have rules_du_Jour installed. I've looked all over for what should be in the local.cf file and I'm stuck....

[root@gz .spamassassin]# pwd
/var/qmail/.spamassassin
[root@gz .spamassassin]#

Here is my local.cf:

[root@gz sbin]# more /etc/mail/spamassassin/local.cf
user_scores_dsn DBI:mysql:horde:localhost
user_scores_sql_username XXXXXXXXXX
user_scores_sql_table userpref
user_scores_sql_password XXXXXXXXXX
bayes_auto_learn 1
bayes_auto_learn_threshold_nonspam 0.1
bayes_auto_learn_threshold_spam 12.0


I added the bayes part..

what should be in this file or what should it look like please.

_________________
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net


Top
 Profile  
 
 Post subject:
Unread postPosted: Fri Feb 17, 2006 7:49 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Dec 06, 2004 10:43 pm
Posts: 449
Scott, I read someplace that you set some configurations in the mySql db.. where would those be set please..

Using your latest spamassassin rpm's.

_________________
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net


Top
 Profile  
 
 Post subject:
Unread postPosted: Sat Feb 18, 2006 12:24 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7425
Location: earth
Check out the spamassassin site (used to be called readme.mysql I think), or if you use the squirrelmail rpm it will create the mysql tables and settings for you.


Top
 Profile  
 
 Post subject:
Unread postPosted: Sat Feb 18, 2006 8:05 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Dec 06, 2004 10:43 pm
Posts: 449
Will these instructions work for your RPM's?

http://forum.ev1servers.net/showthread.php?t=50247

I installed the squirrelmail rpm from you but not sure if it created these two tables, sa_conf and sa_list.

I'm also looking at the spamassassin site..

_________________
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net


Top
 Profile  
 
 Post subject:
Unread postPosted: Sat Feb 18, 2006 11:21 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Dec 06, 2004 10:43 pm
Posts: 449
I'm trying to setup the MySQL connection and this is what I got from: http://spamassassin.apache.org/doc.html about setting up the db. :

In order for SpamAssassin to work with your SQL database, you must have the perl DBI module installed, AS WELL AS the DBD driver/module for your specific database. For example, if using MySQL as your RDBMS, you must have the Msql-Mysql module installed. Check CPAN for the latest versions of DBI and your database driver/module.

We are currently using:

DBI-1.20
Msql-Mysql-modules-1.2219
perl v5.6.1

the site says to get the Msql-Mysql-modules from cpan but I've read that your rpms are not compatible with cpan? I might be confused here.

This is the error message I'm getting which prompted me to look at the msql-mysql-modules ...

[29375] dbg: replacetags: replacing tags
[29375] dbg: replacetags: done replacing tags
[29375] dbg: bayes: using username: root
[29375] dbg: bayes: database connection established
[29375] dbg: bayes: found bayes db version 3
[29375] dbg: bayes: unable to initialize database for root user, aborting!
[29375] dbg: config: score set 1 chosen.
[29375] dbg: bayes: database connection established
[29375] dbg: bayes: found bayes db version 3
[29375] dbg: bayes: unable to initialize database for root user, aborting!
ERROR: Bayes dump returned an error, please re-run with -D for more information
[root@gz spamassassin]# cd /

This is my MySQL install:

[root@gz spamassassin]# rpm -qa |grep Mysql
[root@gz spamassassin]# rpm -qa |grep mysql
mysql-server-(none)-4.1.14-1.rhel3.art
mysql-debuginfo-(none)-4.0.20-art.2
mysql-devel-(none)-4.1.14-1.rhel3.art
php-mysql-(none)-4.4.0-3.rhel3.art
libdbi-dbd-mysql-(none)-0.6.5-5
mysql-(none)-4.1.14-1.rhel3.art
mysql-compat-(none)-4.1.14-1.rhel3.art
[root@gz spamassassin]#


any help would be appreciated,
Thanks.

_________________
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Feb 19, 2006 12:42 am 
Offline
Forum Regular
Forum Regular

Joined: Mon Dec 06, 2004 10:43 pm
Posts: 449
I am also getting this error msg when I do a spamassassin --lint -D

[1305] dbg: replacetags: replacing tags
[1305] dbg: replacetags: done replacing tags
[1305] dbg: bayes: using username: root
[1305] dbg: bayes: database connection established
[1305] dbg: bayes: found bayes db version 3
[1305] dbg: bayes: unable to initialize database for root user, aborting!

_________________
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Feb 19, 2006 11:09 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7425
Location: earth
Are you trying to store Bayes in mysql or in the file system? The way I debug things is to run spamd in the foreground so I can see the raw debug messages (-D). The squirrelmail package doesnt set up the bayes or awl mysql DB's. Or at least I think so, I haven't looked at it in over a year.


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Feb 19, 2006 1:14 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Dec 06, 2004 10:43 pm
Posts: 449
I was trying to setup Bayes/spamassassin to use a mysql spamassassin db. The reason I did this, is because I thought I read that you recommended that kind of a setup. So.. After reading the spamassassin site and someone at ev1 forums saying why don't you set it up this way.. I endevored to do that. Still being a novice I try and read as much and google as much as I can for self help. However this one is stumping me.

System is PSA 7.5, RHE3, latest spamassassin rpm from you with qmail-scanner and clamd.

I setup the DB and when I look at bayes_vars table, I'm seeing it get populated with each mail user on the server and the spam_count / ham_count's going up. I just want to be sure everything is working as it should.

So, how do I run spamd in the forground? Do I just issue the spamd -D and let it run? should it take me back to a prompt?

Thanks.

_________________
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Feb 19, 2006 1:23 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7425
Location: earth
yep exactly, run spamd -D <whatever other options you'd use>.

Also keep in mind that bayes wont kick in until you've got 200 spam/200 ham messages for the user its looking at.


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Feb 19, 2006 1:32 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Dec 06, 2004 10:43 pm
Posts: 449
Ok, getting this atm:
Code:
[32291] dbg: prefork: new lowest idle kid: 32297
[32291] dbg: prefork: child reports idle
[32291] info: prefork: child states: II
[32297] dbg: prefork: periodic ping from spamd parent
[32297] dbg: prefork: sysread(7) not ready, wait max 300 secs
[32298] dbg: prefork: periodic ping from spamd parent
[32298] dbg: prefork: sysread(8) not ready, wait max 300 secs
[32297] dbg: prefork: periodic ping from spamd parent
[32297] dbg: prefork: sysread(7) not ready, wait max 300 secs
[32298] dbg: prefork: periodic ping from spamd parent
[32298] dbg: prefork: sysread(8) not ready, wait max 300 secs
[32297] dbg: prefork: periodic ping from spamd parent
[32297] dbg: prefork: sysread(7) not ready, wait max 300 secs
[32298] dbg: prefork: periodic ping from spamd parent
[32298] dbg: prefork: sysread(8) not ready, wait max 300 secs
[32297] dbg: prefork: periodic ping from spamd parent
[32297] dbg: prefork: sysread(7) not ready, wait max 300 secs
[32298] dbg: prefork: periodic ping from spamd parent
[32298] dbg: prefork: sysread(8) not ready, wait max 300 secs
[32297] dbg: prefork: periodic ping from spamd parent
[32297] dbg: prefork: sysread(7) not ready, wait max 300 secs
[32298] dbg: prefork: periodic ping from spamd parent
[32298] dbg: prefork: sysread(8) not ready, wait max 300 secs
[32297] dbg: prefork: periodic ping from spamd parent
[32297] dbg: prefork: sysread(7) not ready, wait max 300 secs
[32298] dbg: prefork: periodic ping from spamd parent
[32298] dbg: prefork: sysread(8) not ready, wait max 300 secs


Killed the spamd -D and just started spamasssin service, then did:
Code:
[root@gz /]# ps -aux |grep spamd
root      1299  0.4  2.9 35924 30104 ?       S    11:44   0:01 /usr/bin/spamd -d -u qmailq -q -x -c -H /var/qmail                   
qmailq    1326  0.0  2.9 35924 30012 ?       S    11:44   0:00 spamd child                                                           
qmailq    1327  0.0  2.9 35924 30012 ?       S    11:44   0:00 spamd child                                                           
root      1567  0.0  0.0  3692  668 pts/0    S    11:52   0:00 grep spamd
[root@gz /]#


Should I pass to spamd these switchs also? -d -u qmailq -q -x -c -H /var/qmail/ ?

_________________
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Feb 19, 2006 2:05 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7425
Location: earth
Yep, except replace -d with -D


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Feb 19, 2006 2:08 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Dec 06, 2004 10:43 pm
Posts: 449
Ok, thanks for that claification. I was running both -d and -D on that last command.. now I'm at the [2121] info: prefork: child states: II and it is waiting for something now I guess. When I ran both it took me back to a command prompt.

_________________
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Feb 19, 2006 2:13 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Dec 06, 2004 10:43 pm
Posts: 449
Humm, gettting this again..

Code:
[2121] info: prefork: child states: II
[2125] dbg: prefork: periodic ping from spamd parent
[2125] dbg: prefork: sysread(7) not ready, wait max 300 secs
[2126] dbg: prefork: periodic ping from spamd parent
[2126] dbg: prefork: sysread(8) not ready, wait max 300 secs
[2125] dbg: prefork: periodic ping from spamd parent
[2125] dbg: prefork: sysread(7) not ready, wait max 300 secs
[2126] dbg: prefork: periodic ping from spamd parent
[2126] dbg: prefork: sysread(8) not ready, wait max 300 secs

_________________
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Feb 19, 2006 3:59 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7425
Location: earth
I dont suppose you've got any file systems out of drive space do you? If you're on a 1and1 box they have this annoying habit of sticking /var on its own partition.


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Feb 19, 2006 4:03 pm 
Offline
Forum Regular
Forum Regular

Joined: Mon Dec 06, 2004 10:43 pm
Posts: 449
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 270 2064352+ 82 Linux swap
/dev/hda3 271 9729 75979417+ 83 Linux

EV1 server...

contents of fstab:

/dev/hda3 / ext3 defaults,usrquota 1 1
/dev/hda1 /boot ext3 defaults 1 2
/dev/hda2 swap swap defaults 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0

[root@gz /]# df var
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 74786624 16341532 54646124 24% /
[root@gz /]#

_________________
Franklyn Halamka
Still learning my way around Linux Security.
http://www.galacticzero.net


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 23 posts ]  Go to page 1, 2  Next

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group