#!/bin/sh
# Some defaults:
AMAVIS_QUARANTINE="1440"
OPTIONS="-fq"
if [ -f /etc/sysconfig/tmpwatch ]; then
	. /etc/sysconfig/tmpwatch
fi

/usr/sbin/tmpwatch ${OPTIONS} -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix \
-x /tmp/.ICE-unix -x /tmp/.Test-unix 240 /tmp

# Cleanup amavis quarantine:
if [ -d /var/spool/amavis/virusmails ]; then
	if [ ${AMAVIS_QUARANTINE} -ne 0 ]; then
		/usr/sbin/tmpwatch ${OPTIONS} ${AMAVIS_QUARANTINE} /var/spool/amavis/virusmails
	fi
fi
