mailwatch error
Greg Matthews
gmatt at nerc.ac.uk
Tue May 24 10:42:33 IST 2005
slightly off-topic I know, I'm getting an error in mailwatch:
Error executing query:
Can't open file: 'maillog.MYD'. (errno: 144)
I've located the file and it is almost 2GB in size. It is bigger on my
other relays so presumably it is not the size causing the problem. Is my
DB stuffed? Is there a way to correct it or should I start again with an
empty DB? if so how?
might this have been caused by me manually stripping qf and df queue
files out of mqueue.in whilst mailscanner was still running?
GREG
the SQL that barfed:
SELECT
COUNT(*) AS processed,
SUM(CASE WHEN virusinfected>0 THEN 1 ELSE 0 END) AS viruses,
ROUND((SUM(CASE WHEN virusinfected>0 THEN 1 ELSE 0 END)/COUNT(*))*100,1) AS viruspercent,
SUM(CASE WHEN nameinfected>0 THEN 1 ELSE 0 END) AS blockedfiles,
ROUND((SUM(CASE WHEN nameinfected>0 THEN 1 ELSE 0 END)/COUNT(*))*100,1) AS blockedfilespercent,
SUM(CASE WHEN otherinfected>0 THEN 1 ELSE 0 END) AS otherinfected,
ROUND((SUM(CASE WHEN otherinfected>0 THEN 1 ELSE 0 END)/COUNT(*))*100,1) AS otherinfectedpercent,
SUM(CASE WHEN isspam>0 THEN 1 ELSE 0 END) AS spam,
ROUND((SUM(CASE WHEN isspam>0 THEN 1 ELSE 0 END)/COUNT(*))*100,1) AS spampercent,
SUM(CASE WHEN ishighspam>0 THEN 1 ELSE 0 END) AS highspam,
ROUND((SUM(CASE WHEN ishighspam>0 THEN 1 ELSE 0 END)/COUNT(*))*100,1) AS highspampercent,
SUM(size) AS size
FROM
maillog
WHERE
1=1
AND
date = CURRENT_DATE()
--
Greg Matthews 01491 692445
Head of UNIX/Linux, iTSS Wallingford
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list