mqueue and mqueue.in have more files than necessary ... should I worry?

Greg Matthews gmatt at nerc.ac.uk
Mon Apr 3 13:06:48 IST 2006


I often get "orphaned" data files lying around. ie those df files
without a corresponding qf envelope file. I use the following script to
clean them up:

#!/bin/bash
# clean up orphaned df* files in mqueue.in
# no known cause for these files yet.

/etc/init.d/MailScanner stop

sleep 2
dir="/var/spool/mqueue.in"

file=`find $dir -mtime +1`
for i in ${file}
    do m=`basename ${i}`
    j=${m:2}
    if [ ! -e "${dir}/qf${j}" ]; then
        mv ${i} /var/tmp/
        fi
    done
echo
df -hl

/etc/init.d/MailScanner start

exit 0

-- 
Greg Matthews           01491 692445
Head of UNIX/Linux, iTSS Wallingford


-- 
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.



More information about the MailScanner mailing list