The downside to this is that old logs
will
stay there forever, and you'll have to delete them by hand.
how about an additional first recipe:
:0c
| rm -f procmaillog-$(date -d '4 months ago' +"%Y%m")
oops, the $(command) syntax does not work in .procmailrc
i now use this (tested):
DATE = `date +%Y%m`
OLDDATE = `date -d "4 months ago" +%Y%m`
LOGFILE = $HOME/procmail-$DATE.log
:0c
| rm -f $HOME/procmail-$OLDDATE.log > /dev/null 2>&1
attention tho:
the 'date -d "4 months ago"' will work in the GNU date programm from
sh-utils - in BSD you will most likely have to use a different syntax - so
test it before you rely on it.
DATE=`date +"%Y%m"`
LOGFILE=procmaillog-$DATE
regards,
wolfgang
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail