#!/bin/sh

# This script can be used for removing staled files from MQUEUE,
# it requires tmpwatch package

# Mail queue
MQUEUE=/var/spool/mqueue
# Time in hours. Files in MQUEUE that have not been accessed for longer
# than PURGE_TIMEOUT will be removed (default is 720 hours, e.g. 1 month)
PURGE_TIMEOUT=720

/usr/sbin/tmpwatch -f "$PURGE_TIMEOUT" "$MQUEUE"
