procmail
[Top] [All Lists]

RE: rotate mailbox based on size?

2003-12-28 20:46:35


-----Original Message-----
From: David W. Tamkin
Sent: Sunday, December 28, 2003 6:57 PM
[...]
If you consider any fork of any other program to be doing it indirectly,
then it's impossible to do "directly" by that interpretation.  But it
can be triggered by procmail without use of cron.

If $SHELL is something sh-compatible and not csh-ish,

TRAP='case "$LASTFOLDER" in
*freebsd*) if test `wc -c < "$LASTFOLDER"` -ge 1048576
  then lockfile "$LASTFOLDER$LOCKEXT"
   mv -f "$LASTFOLDER" "$LASTFOLDER.old"
   rm -f "$LASTFOLDER$LOCKEXT"
  fi ;;
esac'
[...]

David, thanks for demonstrating the masterful use of procmail. I learned a
lot from
that short example.



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>