Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th August 2009, 10:03
sergio.arnaldo sergio.arnaldo is offline
Junior Member
 
Join Date: Aug 2006
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Question MailScanner trouble with DBD-MYSQL

Dear all

I am recently installed MailScanner+MailWatch following the "The Perfect SpamSkane Ubuntu Jaunty Jackalope".
I notice in logs that MailScanner keeps restarting all the time.
I set debug = yes in MailScaner.conf and when I restart it the error I see is "Undefined subroutine &MailScanner::CustomConfig::SQLWhitelist called at /opt/MailScanner/lib/MailScanner/Config.pm line 171.

I have reinstalled MailScanner 3 times because I couldn't get rid of the above error.
I googled so many times because of it and it seems it is as issue with DBD-MySQL not being installed correctly. I tried to install is via apt-get but the error continues. I also tried to install it via CPAN but still I get errors.

Below is part of mail.log:
MailScanner E-Mail Virus Scanner version 4.75.11 starting...
Aug 19 06:26:24 spamsnake MailScanner[11277]: Read 855 hostnames from the phishing whitelist
Aug 19 06:26:24 spamsnake MailScanner[11277]: Read 5874 hostnames from the phishing blacklist
Aug 19 06:26:24 spamsnake MailScanner[11277]: Config: calling custom init function SQLBlacklist
Aug 19 06:26:24 spamsnake MailScanner[11277]: Config: calling custom init function MailWatchLogging
Aug 19 06:26:24 spamsnake MailScanner[11277]: Config: calling custom init function SQLWhitelist
Aug 19 06:26:24 spamsnake MailScanner[11277]: Using SpamAssassin results cache
Aug 19 06:26:24 spamsnake MailScanner[11277]: Connected to SpamAssassin cache database
Aug 19 06:26:24 spamsnake MailScanner[11277]: Enabling SpamAssassin auto-whitelist functionality...
Aug 19 06:26:29 spamsnake MailScanner[11279]: MailScanner E-Mail Virus Scanner version 4.75.11 starting...
Aug 19 06:26:29 spamsnake MailScanner[11279]: Read 855 hostnames from the phishing whitelist
Aug 19 06:26:29 spamsnake MailScanner[11279]: Read 5874 hostnames from the phishing blacklist
Aug 19 06:26:29 spamsnake MailScanner[11279]: Config: calling custom init function SQLBlacklist
Aug 19 06:26:29 spamsnake MailScanner[11279]: Config: calling custom init function MailWatchLogging
Aug 19 06:26:29 spamsnake MailScanner[11279]: Config: calling custom init function SQLWhitelist
Aug 19 06:26:29 spamsnake MailScanner[11279]: Using SpamAssassin results cache
Aug 19 06:26:29 spamsnake MailScanner[11279]: Connected to SpamAssassin cache database
Aug 19 06:26:29 spamsnake MailScanner[11279]: Enabling SpamAssassin auto-whitelist functionality...
Aug 19 06:26:29 spamsnake MailScanner[11277]: Connected to processing-messages database
Aug 19 06:26:29 spamsnake MailScanner[11277]: Found 377577 messages in the processing-messages database
Aug 19 06:26:29 spamsnake MailScanner[11277]: Using locktype = flock
Aug 19 06:26:30 spamsnake MailScanner[11277]: Making attempt 2 at processing message 57C52B1C475.99C72
Aug 19 06:26:30 spamsnake MailScanner[11277]: New Batch: Scanning 26 messages, 7565410 bytes
Aug 19 06:26:31 spamsnake MailScanner[11279]: Connected to processing-messages database
Aug 19 06:26:31 spamsnake MailScanner[11279]: Found 377602 messages in the processing-messages database
Aug 19 06:26:31 spamsnake MailScanner[11279]: Using locktype = flock
Aug 19 06:26:32 spamsnake MailScanner[11279]: New Batch: Scanning 26 messages, 7565410 bytes
Aug 19 06:26:34 spamsnake MailScanner[11283]: MailScanner E-Mail Virus Scanner version 4.75.11 starting...
Aug 19 06:26:34 spamsnake MailScanner[11283]: Read 855 hostnames from the phishing whitelist
Aug 19 06:26:34 spamsnake MailScanner[11283]: Read 5874 hostnames from the phishing blacklist
Aug 19 06:26:34 spamsnake MailScanner[11283]: Config: calling custom init function SQLBlacklist
Aug 19 06:26:34 spamsnake MailScanner[11283]: Config: calling custom init function MailWatchLogging
Aug 19 06:26:34 spamsnake MailScanner[11283]: Config: calling custom init function SQLWhitelist
Aug 19 06:26:34 spamsnake MailScanner[11283]: Using SpamAssassin results cache
Aug 19 06:26:34 spamsnake MailScanner[11283]: Connected to SpamAssassin cache database
Aug 19 06:26:34 spamsnake MailScanner[11283]: Enabling SpamAssassin auto-whitelist functionality...
Aug 19 06:26:36 spamsnake MailScanner[11283]: Connected to processing-messages database
Aug 19 06:26:36 spamsnake MailScanner[11283]: Found 377628 messages in the processing-messages database
Aug 19 06:26:36 spamsnake MailScanner[11283]: Using locktype = flock
Aug 19 06:26:37 spamsnake MailScanner[11283]: Making attempt 2 at processing message 86FD6B1C487.584DC
Aug 19 06:26:37 spamsnake MailScanner[11283]: New Batch: Scanning 26 messages, 7565410 bytes
Aug 19 06:26:39 spamsnake MailScanner[11286]: MailScanner E-Mail Virus Scanner version 4.75.11 starting...
Aug 19 06:26:39 spamsnake MailScanner[11286]: Read 855 hostnames from the phishing whitelist
Aug 19 06:26:39 spamsnake MailScanner[11286]: Read 5874 hostnames from the phishing blacklist
Aug 19 06:26:39 spamsnake MailScanner[11286]: Config: calling custom init function SQLBlacklist
Aug 19 06:26:39 spamsnake MailScanner[11286]: Config: calling custom init function MailWatchLogging
Aug 19 06:26:39 spamsnake MailScanner[11286]: Config: calling custom init function SQLWhitelist
Aug 19 06:26:39 spamsnake MailScanner[11286]: Using SpamAssassin results cache
Aug 19 06:26:39 spamsnake MailScanner[11286]: Connected to SpamAssassin cache database
Aug 19 06:26:39 spamsnake MailScanner[11286]: Enabling SpamAssassin auto-whitelist functionality...
Aug 19 06:26:41 spamsnake MailScanner[11286]: Connected to processing-messages database
Aug 19 06:26:41 spamsnake MailScanner[11286]: Found 377653 messages in the processing-messages database
Aug 19 06:26:41 spamsnake MailScanner[11286]: Using locktype = flock
Aug 19 06:26:42 spamsnake MailScanner[11286]: New Batch: Scanning 26 messages, 7565410 bytes
Aug 19 06:26:44 spamsnake MailScanner[11289]: MailScanner E-Mail Virus Scanner version 4.75.11 starting...
Aug 19 06:26:44 spamsnake MailScanner[11289]: Read 855 hostnames from the phishing whitelist
Aug 19 06:26:44 spamsnake MailScanner[11289]: Read 5874 hostnames from the phishing blacklist
Aug 19 06:26:44 spamsnake MailScanner[11289]: Config: calling custom init function SQLBlacklist
Aug 19 06:26:44 spamsnake MailScanner[11289]: Config: calling custom init function MailWatchLogging
Aug 19 06:26:44 spamsnake MailScanner[11289]: Config: calling custom init function SQLWhitelist
Aug 19 06:26:44 spamsnake MailScanner[11289]: Using SpamAssassin results cache

Via CPAN I follow the steps:
perl -MCPAN -e shell
look DBD::mysql
perl Makefile.PL --testdb=test --testuser=root --testpassword=supersecret --testhost=localhost
make
make test
make install

But in make test there are errors like these:
t/40blobs.t 255 65280 ?? ?? ??
33 tests skipped.
Failed 1/35 test scripts. 0/6 subtests failed.
Files=35, Tests=6, 3 wallclock secs ( 1.93 cusr + 0.26 csys = 2.19 CPU)
Failed 1/35 test programs. 0/6 subtests failed.
make: *** [test_dynamic] Error 255

And If I insist on make install the output is following:
root@spamsnake:~/.cpan/build/DBD-mysql-4.012-aIxLSX# make install
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /usr/local/lib/perl/5.10.0/auto/DBD/mysql/mysql.so
Writing /usr/local/lib/perl/5.10.0/auto/DBD/mysql/.packlist
Appending installation info to /usr/local/lib/perl/5.10.0/perllocal.pod


It seems installation goes ok.... but I am not sure.
I still get the "Undefined subroutine &MailScanner::CustomConfig::SQLWhitelist called at /opt/MailScanner/lib/MailScanner/Config.pm line 171" whet I run MailScanner on debug mode.

Whould anyone please help me to correct this?
Reply With Quote
Sponsored Links
  #2  
Old 19th August 2009, 19:48
sergio.arnaldo sergio.arnaldo is offline
Junior Member
 
Join Date: Aug 2006
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default

Some updates....

I fixed the problem with DBD-MYSQL installation by removing all DBD and DBI files and directories and reinstalling them again via CPAN.

But I still get the error: "Undefined subroutine MailScanner::CustomConfig::SQLWhitelist called at /opt/MailScanner/lib/MailScanner/Config.pm line 171" when I try to run MislScanner on debug mode.

MailScanner is not working at all,

Please help!!
Reply With Quote
  #3  
Old 19th August 2009, 20:00
sergio.arnaldo sergio.arnaldo is offline
Junior Member
 
Join Date: Aug 2006
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default

More updates...

I notice that the problem is associated with the lines
Is Definitely Not Spam = &SQLWhitelist
Is Definitely Spam = &SQLBlacklist
in MailScanner.conf
When I comment these 2 line everythig seems to work ok.

Any help????
Reply With Quote
  #4  
Old 19th August 2009, 20:43
sergio.arnaldo sergio.arnaldo is offline
Junior Member
 
Join Date: Aug 2006
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default

Well I guess I won't have any help with this, so I rolled back to the original setting in MailScanner.com ie:

Is Definitely Not Spam = %rules-dir%/spam.whitelist.rules
Is Definitely Spam = no

Afterall The &SQLBlacklist and &SQLWhitelist settings were intended to integrate SQL Blacklist /Whitelist within MailWath for Administrative purposes.... I guess...

So as I mentioned I did a rollback to the original setttings and everything seems to work fine now.

Should anyone come up with any ideas I would appreciate.
I am very novice to all these stuff.
Thank you.
/Sergio Arnaldo
Reply With Quote
  #5  
Old 21st August 2009, 04:12
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hey,
I'll try to figure out what's happening as I've come across that before.

rocky
__________________
Home of the SpamSnake
Reply With Quote
  #6  
Old 21st August 2009, 08:22
sergio.arnaldo sergio.arnaldo is offline
Junior Member
 
Join Date: Aug 2006
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hey Rocky

Thanks for you reply.

You know, yesterday I tried to reinstall mailwatch. I dropped and recreated the databases (mailscanner and sa_bayes), and now I notice that I have an error. when I run " spamassassin -x -D -p /opt/MailScanner/etc/spam.assassin.prefs.conf --lint" I get an error with bayes database:
dbg: bayes: database connection established
dbg: bayes: _get_db_version: SQL error: Table 'sa_bayes.bayes_global_vars' doesn't exist
dbg: bayes: found bayes db version 0
warn: bayes: database version 0 is different than we understand (3), aborting! at /usr/share/perl5/Mail/SpamAssassin/BayesStore/SQL.pm line 136

And now Iam really stuck!!...
The reason I did this is that I couldn't see any records withi MailWatch....
Please help!!
Reply With Quote
  #7  
Old 23rd August 2009, 07:03
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hey,

Well, I think if you recreate sa_bayes.bayes_global_vars table, you should be fine.
__________________
Home of the SpamSnake
Reply With Quote
  #8  
Old 24th August 2009, 14:35
sergio.arnaldo sergio.arnaldo is offline
Junior Member
 
Join Date: Aug 2006
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default

Rocky,

Please forgive my ignorance...
You're definitely right.

I am back to business now.
But I still don't see any messages with MailWatch, only the queues.
On Recent Messages I get: No rows retrieved
And I get erros like "Error: no rows retrieved from database " when I try to access Reports...

From What I have read this could be an issue with permissions, is that correct?
How can I over come this?
Reply With Quote
  #9  
Old 25th August 2009, 04:50
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hey,

You are correct about the problems being permission related. Redo sections 17.11 and 17.13. You should be fine after that.

Rocky
__________________
Home of the SpamSnake
Reply With Quote
  #10  
Old 25th August 2009, 16:21
sergio.arnaldo sergio.arnaldo is offline
Junior Member
 
Join Date: Aug 2006
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Rocky,

I went through sections 17.11 and 17.13 again but I still see no records.
You know, I am really not sure if Mailscanner is logging to MySQL...

How would I test that?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix problem and few questions Gimly Installation/Configuration 12 7th July 2009 16:27
Problem installing MySQL on suse 10.3 Txchaser Installation/Configuration 20 18th April 2008 01:05
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 09:11
Messed up ISPConfig-2.2.8 Upgrade Morons Installation/Configuration 4 29th November 2006 12:17
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 16:04


All times are GMT +2. The time now is 02:46.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.