Attached is the crontab that I would use, fixing #694819. This will
also fix #673386 and #610322.
>From my tests it's good but I would like to have somebody else
reviewing it too :-)
Best regards,
Nelson
#!/bin/sh
if [ -f /etc/tumgreyspf/default.conf ] ; then
GREYLISTEXPIREDAYS=`grep -E -m 1 "^\s*GREYLISTEXPIREDAYS"
/etc/tumgreyspf/default.conf | cut -d'=' -f2 | awk '{print $1}' | cut -d'.' -f1`
fi
if [ -z "${GREYLISTEXPIREDAYS}" ] ; then
GREYLISTEXPIREDAYS=10
fi
greylistDir=`grep -E -m 1 "^\s*greylistDir" /etc/tumgreyspf/tumgreyspf.conf |
cut -d'=' -f2 | awk -F \' '{print $2}'`
if [ ! -d "${greylistDir}" -o -z "${greylistDir}" ] ; then
exit 0
fi
find ${greylistDir} -type f -mtime +${GREYLISTEXPIREDAYS} -delete
find ${greylistDir} -mindepth 1 -type d -empty -delete