Discussion:
Clean up script for tmp files
Remco Barendse
2014-02-12 10:55:59 UTC
Permalink
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
Paul A Sand
2014-02-12 12:11:43 UTC
Permalink
Post by Remco Barendse
/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.
Whoa, you?re right that there?s a lot of them.

Using ?tmpwatch? is probably the answer if you?re using a Linux-based
system. (http://linux.die.net/man/8/tmpwatch)

On (for example) Red Hat, you can tweak the /tmp cleaning options
(and add directories like /var/spool/MailScanner/incoming/SpamAssassin-Temp)
by editing /etc/cron.daily/tmpwatch.

I?m going to do that last part myself right now?
--
-- Paul A Sand <pas at unh.edu>
-- Information Technology / University of New Hampshire
-- http://pubpages.unh.edu/~pas
-- Do not remove tag under penalty of federal law.
Jethro R Binks
2014-02-12 12:21:46 UTC
Permalink
I've run this nightly for years which may help:


#!/bin/sh
##
## MailScanner, SpamAssassin and so on tend to leave files around, so this
## will clean up any more than $days old
##
## v2.1

# Defined in MailScanner.conf, "Incoming Work Dir":
MSWORK=/mail/scanner/incoming
# Defined in MailScanner.conf, "SpamAssassin Temporary Dir":
#SATMP=/tmp
SATMP=$MSWORK/SpamAssassin-Temp
# Defined in clamd.conf, "TemporaryDirectory":
CLAMAVTMP=/var/tmp

days="2"

opts="-mtime +$days -maxdepth 1"

find $SATMP -name '.spamassassin*' $opts | xargs rm -rf
find $SATMP -name 'update_spamassassin*' $opts | xargs rm -rf
find $MSWORK -name '[0-9]*' -type d $opts | xargs rm -rf
find $CLAMAVTMP -name 'packlist.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'checkholddir.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'clamav-*' $opts | xargs rm -rf
Post by Remco Barendse
I know the subject was discussed on the mailing list several times but i
didn't find the ultimate solution.
/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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK

The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.
Remco Barendse
2014-02-14 13:47:52 UTC
Permalink
Hi Jethro,

When i run the script i get this message :

---
find: warning: you have specified the -maxdepth option after a non-option
argument -mtime, but options are not positional (-maxdepth affects tests
specified before it as well as those specified after it). Please specify
options before other arguments.
---

I tried moving the $opts to the front but that didn't help.

Where am i going wrong?

Cheers!
Post by Jethro R Binks
#!/bin/sh
##
## MailScanner, SpamAssassin and so on tend to leave files around, so this
## will clean up any more than $days old
##
## v2.1
MSWORK=/mail/scanner/incoming
#SATMP=/tmp
SATMP=$MSWORK/SpamAssassin-Temp
CLAMAVTMP=/var/tmp
days="2"
opts="-mtime +$days -maxdepth 1"
find $SATMP -name '.spamassassin*' $opts | xargs rm -rf
find $SATMP -name 'update_spamassassin*' $opts | xargs rm -rf
find $MSWORK -name '[0-9]*' -type d $opts | xargs rm -rf
find $CLAMAVTMP -name 'packlist.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'checkholddir.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'clamav-*' $opts | xargs rm -rf
Post by Remco Barendse
I know the subject was discussed on the mailing list several times but i
didn't find the ultimate solution.
/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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK
The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.
Remco Barendse
2014-02-15 09:08:52 UTC
Permalink
I slightly modified the script, if i remove "-maxdepth 1" from opts the
script completes without errors and i included /tmp.
However, the find command doesn't find the files. Even when i set days to
1, i still find files that are 3-4 days old.

When i do :
find /var/spool/MailScanner/incoming/SpamAssassin-Temp/ -name 'tmp.*'
it finds all the files, when i add "-mtime +1" it doesn't find anything
anymore.

Clues anyone? Could it be that mtime doesn't work on zero byte files?

Thanks!
Post by Jethro R Binks
#!/bin/sh
##
## MailScanner, SpamAssassin and so on tend to leave files around, so this
## will clean up any more than $days old
##
## v2.1
MSWORK=/mail/scanner/incoming
#SATMP=/tmp
SATMP=$MSWORK/SpamAssassin-Temp
CLAMAVTMP=/var/tmp
days="2"
opts="-mtime +$days -maxdepth 1"
find $SATMP -name '.spamassassin*' $opts | xargs rm -rf
find $SATMP -name 'update_spamassassin*' $opts | xargs rm -rf
find $MSWORK -name '[0-9]*' -type d $opts | xargs rm -rf
find $CLAMAVTMP -name 'packlist.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'checkholddir.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'clamav-*' $opts | xargs rm -rf
Post by Remco Barendse
I know the subject was discussed on the mailing list several times but i
didn't find the ultimate solution.
/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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK
The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.
Jethro R Binks
2014-02-15 12:17:30 UTC
Permalink
My script was written for FreeBSD. If you're using a different operating system, you'll need to read the manual page for your 'find' command and modify it accordingly.
Post by Remco Barendse
I slightly modified the script, if i remove "-maxdepth 1" from opts the
script completes without errors and i included /tmp.
However, the find command doesn't find the files. Even when i set days to
1, i still find files that are 3-4 days old.
find /var/spool/MailScanner/incoming/SpamAssassin-Temp/ -name 'tmp.*'
it finds all the files, when i add "-mtime +1" it doesn't find anything
anymore.
Clues anyone? Could it be that mtime doesn't work on zero byte files?
Thanks!
Post by Jethro R Binks
#!/bin/sh
##
## MailScanner, SpamAssassin and so on tend to leave files around, so this
## will clean up any more than $days old
##
## v2.1
MSWORK=/mail/scanner/incoming
#SATMP=/tmp
SATMP=$MSWORK/SpamAssassin-Temp
CLAMAVTMP=/var/tmp
days="2"
opts="-mtime +$days -maxdepth 1"
find $SATMP -name '.spamassassin*' $opts | xargs rm -rf
find $SATMP -name 'update_spamassassin*' $opts | xargs rm -rf
find $MSWORK -name '[0-9]*' -type d $opts | xargs rm -rf
find $CLAMAVTMP -name 'packlist.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'checkholddir.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'clamav-*' $opts | xargs rm -rf
Post by Remco Barendse
I know the subject was discussed on the mailing list several times but i
didn't find the ultimate solution.
/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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK
The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
Kevin Kobb
2014-02-19 13:28:57 UTC
Permalink
Hello,

It would probably be more efficient to use the find "-delete" action
rather than "xargs rm -rf", but either should work.

On a side note, does anybody have plans to carve out an "old style"
MailScanner tarball with the fixes from GitHub? i.e. a new 4.8xx release?

Thanks
Post by Jethro R Binks
My script was written for FreeBSD. If you're using a different operating system, you'll need to read the manual page for your 'find' command and modify it accordingly.
Post by Remco Barendse
I slightly modified the script, if i remove "-maxdepth 1" from opts the
script completes without errors and i included /tmp.
However, the find command doesn't find the files. Even when i set days to
1, i still find files that are 3-4 days old.
find /var/spool/MailScanner/incoming/SpamAssassin-Temp/ -name 'tmp.*'
it finds all the files, when i add "-mtime +1" it doesn't find anything
anymore.
Clues anyone? Could it be that mtime doesn't work on zero byte files?
Thanks!
Post by Jethro R Binks
#!/bin/sh
##
## MailScanner, SpamAssassin and so on tend to leave files around, so this
## will clean up any more than $days old
##
## v2.1
MSWORK=/mail/scanner/incoming
#SATMP=/tmp
SATMP=$MSWORK/SpamAssassin-Temp
CLAMAVTMP=/var/tmp
days="2"
opts="-mtime +$days -maxdepth 1"
find $SATMP -name '.spamassassin*' $opts | xargs rm -rf
find $SATMP -name 'update_spamassassin*' $opts | xargs rm -rf
find $MSWORK -name '[0-9]*' -type d $opts | xargs rm -rf
find $CLAMAVTMP -name 'packlist.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'checkholddir.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'clamav-*' $opts | xargs rm -rf
Post by Remco Barendse
I know the subject was discussed on the mailing list several times but i
didn't find the ultimate solution.
/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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK
The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
Alex Neuman
2014-02-19 15:15:19 UTC
Permalink
find -delete may not be present in all platforms. It may be replaced with
find -exec rm \{}; IIRC
Post by Kevin Kobb
Hello,
It would probably be more efficient to use the find "-delete" action
rather than "xargs rm -rf", but either should work.
On a side note, does anybody have plans to carve out an "old style"
MailScanner tarball with the fixes from GitHub? i.e. a new 4.8xx release?
Thanks
Post by Jethro R Binks
My script was written for FreeBSD. If you're using a different
operating system, you'll need to read the manual page for your 'find'
command and modify it accordingly.
Post by Jethro R Binks
On 15 Feb 2014, at 09:08, Remco Barendse <mailscanner at barendse.to>
I slightly modified the script, if i remove "-maxdepth 1" from opts the
script completes without errors and i included /tmp.
However, the find command doesn't find the files. Even when i set days
to
Post by Jethro R Binks
1, i still find files that are 3-4 days old.
find /var/spool/MailScanner/incoming/SpamAssassin-Temp/ -name 'tmp.*'
it finds all the files, when i add "-mtime +1" it doesn't find anything
anymore.
Clues anyone? Could it be that mtime doesn't work on zero byte files?
Thanks!
Post by Jethro R Binks
#!/bin/sh
##
## MailScanner, SpamAssassin and so on tend to leave files around, so
this
Post by Jethro R Binks
Post by Jethro R Binks
## will clean up any more than $days old
##
## v2.1
MSWORK=/mail/scanner/incoming
#SATMP=/tmp
SATMP=$MSWORK/SpamAssassin-Temp
CLAMAVTMP=/var/tmp
days="2"
opts="-mtime +$days -maxdepth 1"
find $SATMP -name '.spamassassin*' $opts | xargs rm -rf
find $SATMP -name 'update_spamassassin*' $opts | xargs rm -rf
find $MSWORK -name '[0-9]*' -type d $opts | xargs rm -rf
find $CLAMAVTMP -name 'packlist.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'checkholddir.*' -type f $opts | xargs rm -rf
find $CLAMAVTMP -name 'clamav-*' $opts | xargs rm -rf
Post by Remco Barendse
I know the subject was discussed on the mailing list several times
but i
Post by Jethro R Binks
Post by Jethro R Binks
Post by Remco Barendse
didn't find the ultimate solution.
/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.
Post by Jethro R Binks
Post by Jethro R Binks
Post by Remco Barendse
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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
. . . . . . . . . . . . . . . . . . . . . . . .
.
Post by Jethro R Binks
Post by Jethro R Binks
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow,
UK
Post by Jethro R Binks
Post by Jethro R Binks
The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20140219/af7d2497/attachment.html
Remco Barendse
2014-02-25 00:07:04 UTC
Permalink
Post by Kevin Kobb
Hello,
It would probably be more efficient to use the find "-delete" action
rather than "xargs rm -rf", but either should work.
On a side note, does anybody have plans to carve out an "old style"
MailScanner tarball with the fixes from GitHub? i.e. a new 4.8xx release?
Awesome! Would love to see that
Randal, Phil
2014-02-12 12:22:48 UTC
Permalink
The latest version, 4.86.4 seems to clean up most of these.

If you do install that version, also get the latest TNEF.pm 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 lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] 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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

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."
Remco Barendse
2014-02-14 13:24:27 UTC
Permalink
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!

Cheers,
Remco
Post by Randal, Phil
The latest version, 4.86.4 seems to clean up most of these.
If you do install that version, also get the latest TNEF.pm 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 lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] 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.
/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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
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."
Randal, Phil
2014-02-14 16:31:20 UTC
Permalink
Yes, my typo. Apologies.

The Updated TNEF.pm from git is still needed to stop a load of temp files being created and not deleted:

https://github.com/MailScanner/MailScanner/blob/master/mailscanner/bin/MailScanner/TNEF.pm

Cheers,

Phil

-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Remco Barendse
Sent: 14 February 2014 13:24
To: MailScanner discussion
Subject: RE: Clean up script for tmp files

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!

Cheers,
Remco
Post by Randal, Phil
The latest version, 4.86.4 seems to clean up most of these.
If you do install that version, also get the latest TNEF.pm 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 lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] 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.
/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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
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."
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!
Kevin Miller
2014-02-14 18:06:00 UTC
Permalink
Is this just a drop in replacement, i.e., can I just copy over the old /usr/lib/MailScanner/MailScanner/TNEF.pm with the new one? Or do I have to install it somehow? Will it conflict with anything in perl-Convert-TNEF?

I presume "TNEF Expander" should be set to internal.

...Kevin
--
Kevin Miller
Network/email Administrator, CBJ MIS Dept.
155 South Seward Street
Juneau, Alaska 99801
Phone: (907) 586-0242, Fax: (907) 586-4500
Registered Linux User No: 307357

-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Randal, Phil
Sent: Friday, February 14, 2014 7:31 AM
To: MailScanner discussion
Subject: RE: Clean up script for tmp files

Yes, my typo. Apologies.

The Updated TNEF.pm from git is still needed to stop a load of temp files being created and not deleted:

https://github.com/MailScanner/MailScanner/blob/master/mailscanner/bin/MailScanner/TNEF.pm

Cheers,

Phil

-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Remco Barendse
Sent: 14 February 2014 13:24
To: MailScanner discussion
Subject: RE: Clean up script for tmp files

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!

Cheers,
Remco
Post by Randal, Phil
The latest version, 4.86.4 seems to clean up most of these.
If you do install that version, also get the latest TNEF.pm 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 lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] 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.
/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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
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."
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!
Mark Sapiro
2014-02-14 18:49:00 UTC
Permalink
Post by Kevin Miller
Is this just a drop in replacement, i.e., can I just copy over the old /usr/lib/MailScanner/MailScanner/TNEF.pm with the new one?
Yes.
Post by Kevin Miller
I presume "TNEF Expander" should be set to internal.
Yes.
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
Armando Montiel
2014-02-12 13:00:02 UTC
Permalink
use the "tmpwatch HOURS_OLDER_THAN_THIS /tmp" command.

"tmpwatch 24 /tmp"
will erase every file or subfolder under /tmp not used in the last 24 hours
or oldest ones.
El feb 12, 2014 5:24 AM, "Remco Barendse" <mailscanner at barendse.to>
Post by Remco Barendse
I know the subject was discussed on the mailing list several times but i
didn't find the ultimate solution.
/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 lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20140212/0b03f384/attachment.html
Brad Smith
2014-02-20 04:10:56 UTC
Permalink
Reading this thread makes me want to cringe at the workarounds
mentioned so far. Fixes for most of the temp file issues have existed
for some time now in the github repo; plus an unpatched issue I
pointed out once the rest were resolved it became obvious where
it was... https://github.com/MailScanner/MailScanner/issues/31

If you really want to fix things properly instead of using
gross workarounds upgrade to 4.84.6-1 and lift the patches
I commited to the OpenBSD port/package..

http://www.openbsd.org/cgi-bin/cvsweb/ports/mail/mailscanner/patches/?sortby=date#dirlist

It is a little bit easier to see the patches there than digging
through the github repo.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Richard Mealing
2014-02-25 17:04:46 UTC
Permalink
Hi Brad,

I have contacted the FreeBSD maintainer and they are working on a new port --> http://www.freebsd.org/cgi/query-pr.cgi?pr=187005

Thanks,
Rich

-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Brad Smith
Sent: 20 February 2014 04:11
To: mailscanner at lists.mailscanner.info
Subject: Clean up script for tmp files

Reading this thread makes me want to cringe at the workarounds mentioned so far. Fixes for most of the temp file issues have existed for some time now in the github repo; plus an unpatched issue I pointed out once the rest were resolved it became obvious where it was... https://github.com/MailScanner/MailScanner/issues/31

If you really want to fix things properly instead of using gross workarounds upgrade to 4.84.6-1 and lift the patches I commited to the OpenBSD port/package..

http://www.openbsd.org/cgi-bin/cvsweb/ports/mail/mailscanner/patches/?sortby=date#dirlist

It is a little bit easier to see the patches there than digging through the github repo.

--
This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!

Continue reading on narkive:
Loading...