On 05/07/07, Gary V <[EMAIL PROTECTED]> wrote: > > MrC wrote: > > > vwf wrote: > >> Hello, > >> > >> I'm a newby on amavis. I run amavis to block virus-email. It seems to > >> work fine: no virusses came through so far, and no email got lost (I > >> think). > >> > >> The problem is that my quarantine directory is filling up, and I don't > >> know how to clean it. When I cleared /var/lib/amavis/tmp/, amavis > >> stopped working. > >> > >> How do I safely remove old quarantine files (e.g. >30 days)? > >> > >> I run amavisd-new 2.4.2-6.1 on Debian Etch. > >> > >> Thanks > > > It is safe to remove the old temporary and quarantine files - amavis > > will not be using them. > > > find /var/lib/amavis/tmp/ -type f -mtime +30 -print | xargs /bin/rm > -f > > > MrC > > On Debian you can remove temporary amavis-* directories simply by > restarting amavis with '/etc/init.d/amavis restart'. The init script > has code to remove temp directories (this is performed after > amavisd-new is stopped): > > cleanup() { > [ -d /var/lib/amavis ] && > find /var/lib/amavis -maxdepth 1 -name 'amavis-*' -type d \ > -exec rm -rf "{}" \; >/dev/null 2>&1 || true > [ -d /var/lib/amavis/tmp ] && > find /var/lib/amavis/tmp -maxdepth 1 -name 'amavis-*' -type d \ > -exec rm -rf "{}" \; >/dev/null 2>&1 || true > : > } > > You should only have one amavis-* temp directory for each running > amavisd-new > process. If there are many more than this, you likely have some sort of > problem. > See http://www.ijs.si/software/amavisd/#faq-gen > > As MrC shows, you can use the find command to delete files older than > a given number of days. The command I use is similar: > find /var/lib/amavis/virusmails -name 'virus-*' -mtime +29 -type f -exec > rm -f {} \; > > Gary V >
tmpwatch is yet another alternative, and depending on your distro's package install could be an easier way to automate-and-forget this maintenance. Riaan ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ 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/