Thanks everyone, a couple of nice scripts
Will also look at mounting that dir in RAM, should improve performance, my
server only has 1 x 2.5inch disk so not exactly the fastest but I have a
fair bit of RAM to spare

Thanks again


-----Original Message-----
From: Sahil Tandon [mailto:sa...@tandon.net] 
Sent: Wednesday, 2 September 2009 11:03 AM
To: amavis-user@lists.sourceforge.net
Subject: Re: [AMaViS-user] Amavis Directory getting clogged

On Tue, 01 Sep 2009, Michael Orlitzky wrote:

> Cory Hawkless wrote:
> > I did have to kill amavis 'unleanly' the other day which could explain
it.
> > Does this mean that these emails did not get sent?
> > I would have thought there would be some type of cleanup agent that
checks
> > for these type of issues? Is there anything I can turn on or use to stop
> > this from happening(Whils I don't expect it to be a regular thing it
would
> > be nice to know it cant happen)
> 
> We have /var/amavis/tmp mounted in RAM, so I don't like to leave those 
> directories laying around for too long. I run a cron job every night to 
> clean up. You should be frightened by "rm -rf" in cron jobs, but this 
> can be run as your amavis user.

[Michael's script snipped]

Another example (which I did not author):

 #!/bin/sh
 #
 #  Periodically clean up amavis/tmp and virusmails

 AMAVISD_TMP_DIR="/var/amavis/tmp"
 if [ -d $AMAVISD_TMP_DIR ]; then
         cd $AMAVISD_TMP_DIR
         find $AMAVISD_TMP_DIR -type d -atime +30 -exec rm -r {} \;
         find $AMAVISD_TMP_DIR -type f -atime +30 -exec rm -r {} \;
 fi

 AMAVISD_VIR_DIR="/var/virusmails"
 if [ -d $AMAVISD_VIR_DIR ]; then
         cd $AMAVISD_VIR_DIR
         find $AMAVISD_VIR_DIR -type d -atime +30 -exec rm -r {} \;
         find $AMAVISD_VIR_DIR -type f -atime +30 -exec rm -r {} \;
 fi

-- 
Sahil Tandon <sa...@tandon.net>

----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus
on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to