Re: Monthly archiving of incoming mails

---------

From: Daniel Stenberg (daniel@haxx.se)
Date: Mon Feb 19 2001 - 17:09:22 CST


On Mon, 19 Feb 2001, Peter C. McCluskey wrote:

> I suspect that a solution that builds on SmartList isn't going to be
> quite as easy to install as an ideal solution would be.

For the sake of discussion and comparison, I'll paste my tiny script that I
pipe incoming mails into (using procmail to prevent simultaneous accesses).

This works for low-volume lists. Use it at your own risk.

--- start ---
#!/bin/sh

# setup paths to the two binaries I need
hyper=$HOME/bin/hypermail
date=$HOME/bin/gnudate

# directory where the magic takes place in
dir=$HOME/html

# year and month right now
month=`$date +"%Y-%m"`

# get file (mbox) name
file=$dir/mail-$month

# output directory name
outdir=$dir/archive-$month

# pipe input to the file (generated mbox)
cat >> $file

# change to the target directory (where the config and stuff is)
cd $dir

# run hypermail on the newly appended mailbox
$hyper -m $file -d $outdir -c config -l "mailing list"
--- stop ---

-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol

---------

This archive was generated by hypermail 2.1.5.