Re: Processing months of archives

2000-02-08 04:48:34
to archive on a monthly basis i filter my mails in a .forward
file and then call a pl script.  pls note our email is not 
sendmail but exim ( so i dont know if sendmail 
supports the same commands.

# .forward
#Exim filter
if error_message then finish endif

# Get todays month and year and pipe content off
if $tod_log matches "^(....-..)"
        pipe "/path-to-scripts/ ${local_part} ${1}"

# Script to create dated mhonarc forums for Eduserv Exploder
# Usage "cat message | <rcfile-prefix> <date>"
# e.g.  " niss 1999-12"

# Designed for use with exim and specifically to allow the creation
# of directories on the fly.

# Static Vars
my $docdir = '/path-to-htdocs/exploder';
my $confdir = '/path-to-config/exploder';

# Get Runtime Args
my $local_part = shift;
my $month = shift;

# Set output directory and the config file accordingly
my $outdir = "$docdir/$local_part/$month";
my $config = "$confdir/$local_part" . "-exploder.rc";

# Include MhOnarc code
require '';

# Create Date directory if it doesn't exist
unless ( -d "$outdir" )

  mkdir "$outdir",0755 or die "$0: failed to create dir: $outdir: $!\n";

# Initialise Mhonarc


# Process Message
                '-rcfile', "$config",
                '-outdir', "$outdir",

Email Archive wrote:

Hiya all,

I am working on getting mhonarc setup. Anyone have any pretty
rc files that i can use as examples? I also have the problem
that I have been archiving email for months and months
in one large file per email list. Does anyone know of a way
to split up this file so mhonarc can process it on a month
by month basis? How can I automate this month by month processing
for the future? I would like to archive it as email comes in
but once a month.. generate new web pages and link them to
a main index page so users can just view a specific month
of a mailing list.

Thanks.. Mike

Andrew McGregor, EduServ (NISS), PO BOX 2674, BATH, BA2 7XY.
T: 01225 826 826 ext. 3419; F: 01225 826 177; E: am(_at_)niss(_dot_)ac(_dot_)uk
e-mail to mobile < 140 chars: 

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