Randal, Phil prandal at
Thu Jan 15 15:44:52 GMT 2009

I use this bash script to clean up orphsned files


# clean up orphaned df* files in
# no known cause for these files yet.
/etc/init.d/MailScanner stop
sleep 30
file=`find $dir -mtime +1`
for i in ${file}
do m=`basename ${i}`
if [ ! -e "${dir}/qf${j}" ]; then
mv ${i} /var/tmp/
df -hl
/etc/init.d/MailScanner restart
exit 0



Phil Randal | Networks Engineer 
Herefordshire Council | Deputy Chief Executive's Office | I.C.T.
Services Division 
Thorn Office Centre, Rotherwas, Hereford, HR2 6JT 
Tel: 01432 260160 
email: prandal at 

Any opinion expressed in this e-mail or any attached files are those of
the individual and not necessarily those of Herefordshire Council.

This e-mail and any attached files are confidential and intended solely
for the use of the addressee. This communication may contain material
protected by law from being passed on. If you are not the intended
recipient and have received this e-mail in error, you are advised that
any use, dissemination, forwarding, printing or copying of this e-mail
is strictly prohibited. If you have received this e-mail in error please
contact the sender immediately and destroy all copies of it.



From: mailscanner-bounces at
[mailto:mailscanner-bounces at] On Behalf Of Jan
Sent: 15 January 2009 15:23
To: MailScanner discussion
Subject: cleanup


I have a problem on my server in that fills with old files
that are never removed - files back one year - I think its safe to say
they will not get delivered. 

Is there som "find" command that can remove all files older than 14
dayes if its safe to do so or should I clean up in some other way? 






More information about the MailScanner mailing list