Clean up script for tmp files

Remco Barendse mailscanner at
Fri Feb 14 13:24:27 GMT 2014

Hi Phil,

I am running the latest version of MailScanner since it came out, sadly, 
it didn't solve my problem  (assuming you made a typo and meant 4.84.6-1, 
i couldn't find 4.86.4).

I will try the script that Jethro R Binks posted, looks like this will 
solve my problem (that script should be included in MailScanner!). :)
If not i will try to fiddle with tmpwatch.

Thanks all for the suggestions!


On Wed, 12 Feb 2014, Randal, Phil wrote:

> The latest version, 4.86.4 seems to clean up most of these.
> If you do install that version, also get the latest from the MailScanner git repository to solve the issue of loads of tnef* files being created and not deleted.
> Cheers,
> Phil
> -----Original Message-----
> From: mailscanner-bounces at [mailto:mailscanner-bounces at] On Behalf Of Remco Barendse
> Sent: 12 February 2014 10:56
> To: MailScanner mailing list
> Subject: Clean up script for tmp files
> I know the subject was discussed on the mailing list several times but i didn't find the ultimate solution.
> Does anyone have a super duper cleanup script for all the files in :
> /tmp
> for files like  tmp.DPhoj31724
> /var/spool/MailScanner/incoming/SpamAssassin-Temp
> for files like  .spamassassin3805xUDKuUtmp
>                 MailScanner.0aOrDx
>                 tmp.IKiiOy6683
> They are seriously clogging up my filesystem and slowing down the system.
> I tried to script something based on the age of the file but it didn't work (maybe because most are zero byte files).
> Thanks!
> Remco
> --
> MailScanner mailing list
> mailscanner at
> Before posting, read
> Support MailScanner development - buy the book off the website!
> Hoople Ltd, Registered in England and Wales No. 7556595
> Registered office: Plough Lane, Hereford, HR4 0LE
> "Any opinion expressed in this e-mail or any attached files are those of the individual and not necessarily those of Hoople Ltd. You should be aware that Hoople Ltd. monitors its email service. 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."

More information about the MailScanner mailing list