maillog.myi Cannot Insert row

Pete pete at EATATHOME.COM.AU
Tue Jul 20 09:38:34 IST 2004


Jan-Peter Koopmann wrote:

>Hi Ugo,
>
>
>
>>See MailWatch's archives for a script to clean MailWatch's DB.
>>
>>
>
>I just browsed the archives but did not find the script. You would not by any chance have a copy of it and could send this to me?
>
>Regards,
>  JP
>
>-------------------------- MailScanner list ----------------------
>To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
>Before posting, please see the Most Asked Questions at
>http://www.mailscanner.biz/maq/     and the archives at
>http://www.jiscmail.ac.uk/lists/mailscanner.html
>
>
>
>
>


-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html
-------------- next part --------------
delete low_priority quick from maillog
  where timestamp < (now() - interval 60 day);
optimize table maillog;

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html
-------------- next part --------------
#!/usr/local/bin/bash
# For Cleaning the sql DB used by MailWatch
/usr/local/bin/mysql -u mailwatch -pnotoll mailscanner < /root/.scripts/clean_maillog.sql > /dev/null

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html
-------------- next part --------------
#!/usr/bin/perl


#
# IMPORTANT NOTE:
#
# Change the next line to 0 instead of 1 to enable this script.
# By default it will be disabled and will not do anything.
#

$disabled = 0;



$quarantine_dir = '/usr/var/spool/MailScanner/quarantine';
$days_to_keep   = 60;

exit if $disabled;

# Standardise the format of the directory name
die 'Path for quarantine_dir must be absolute' unless $quarantine_dir =~ /^\//;
$quarantine_dir =~ s/\/$//; # Delete trailing slash

# Now get the content list for the directory.
opendir(QDIR, $quarantine_dir) or die "Couldn't read directory $quarantine_dir";

# Loop through this list looking for any *directory* which hasn't been
# modified in the last $days_to_keep days.
# Unfortunately this will do nothing if the filesystem is backed up using tar.
while($entry = readdir(QDIR)) {
        next if $entry =~ /^\./;
        $entry = $quarantine_dir . '/' . $entry;
        system("rm -rf $entry") if -d $entry &&
                                   -M $entry > $days_to_keep;
}
closedir(QDIR);

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html


More information about the MailScanner mailing list