MailWatch Broken

Discuss the ConfigServer MailScanner Front-End script
Post Reply
gabrielle
Junior Member
Posts: 21
Joined: 20 Jun 2008, 15:36

MailWatch Broken

Post by gabrielle »

Hi there. When we open MailWatch, we see this error:

Error executing query:
Table 'maillog' is marked as crashed and last (automatic?) repair failed

...followed by a bunch of SQL code.

All related scripts (MailScanner, ClamAV, etc.) appear to be up-to-date. Is there a recommended way to fix this issue?

Thanks so much for your help!

Kathryn
Sarah
Moderator
Posts: 934
Joined: 09 Dec 2006, 22:49

Post by Sarah »

Try repairing the database in WHM (SQL Services - Repair a Database). If that doesn't work, you may need to remove the mailscanner database and re-create it:

Code: Select all

mysql -e "drop database mailscanner"
perl /usr/local/cpanel/whostmgr/docroot/3rdparty/mailwatch/install/mwadd.pl
gabrielle
Junior Member
Posts: 21
Joined: 20 Jun 2008, 15:36

Post by gabrielle »

Hi Sarah, thanks so much. In the end, the problem we were having is now moot as we had a server disaster (hardware failure) over the last 48 hrs. and Jonathan just re-installed MailScanner as well as the complete cPanel service package. But good to know there may be a fix if we ever encounter that MailWatch problem again!

Kathryn
ctbhost
Junior Member
Posts: 2
Joined: 08 Nov 2007, 16:23

Post by ctbhost »

thanks sarah, just had this issue couldnt repair the database but have recreated it and all is working again

handy post
vicos
Junior Member
Posts: 16
Joined: 21 Dec 2008, 22:47

Re: MailWatch Broken

Post by vicos »

For some reason mailscanner did not show up as one of the database under the WHM mysql Repair a database option.

If you need to repair it from the command line, this worked for me:

1) Shell into the server as root

2) See what mysql says about the database (just a look-see, no data changed):

/usr/bin/mysqlcheck -v mailscanner

the -v just tells it to be verbose

3) Actually repair any broken/crashed tables

/usr/bin/mysqlcheck -rv mailscanner

the -r tells it to do the repair. You could also use -orv to repair and optimize the tables, but why confuse things when there is a problem.
Post Reply