Re: how to get archives organized by month

2003-08-05 01:38:51
On August 4, 2003 at 20:33, "Christopher P. Lindsey" wrote:

   Note that this is based on the date that the file is received at your
   system.  You could use procmail to extract the date from your envelope
   from 'header' instead, pipe the message through a quick perl script
   to extract the date (at a performance hit, ick), etc.

The performance hit is not that bad.  Mharc does this since it is
more reliable to extract the date from the message itself.  This protects
you from system delays or failures that could cause a message to
be processed at a much later time than when it was actually received.

Plus, mharc processes mail via cron vs as-messages-are-delivered,
since the later does not scale well.

Mharc was a special utility script called extract-mesg-date to
do this.  It is designed to work within procmail recipies since it
returns the date to stdout so procmail can capture it and use it
in a pathname.  For example:

  * (^TO_mharc-users(_at_)mhonarc\(_dot_)org ...

    { CMDEXC_=`mkdir -m 755 -p $MBOXROOT/mharc-users` }

    :0 Wih
    * MESGDATE ?? ^^^^
    MESGDATE=| extract-mesg-date -fmt '%Y-%m'

    :0 c:


To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the

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