#!/bin/sh cd / SPOOLDIR="$(/usr/bin/exim -bP spool_directory | /bin/sed 's/.*=[[:space:]]\(.*\)/\1/')" [ ! -d "$SPOOLDIR" ] && echo "Spooldir [$SPOOLDIR] is not a directory" && exit 1 /usr/bin/find $SPOOLDIR/db -maxdepth 1 -name '*.lockfile' -or -type f -printf '%f\0' | xargs -0r -n 1 /usr/bin/exim_tidydb $SPOOLDIR > /dev/null exit 0