procmail
[Top] [All Lists]

Re: procmail and mhonarc

1996-02-20 07:35:07
Nancy McGough said:
I'd like to use procmail to put incoming messages into an appropriate
incoming folder and also update my MHonArc archive of the list.  Since I'm
sure some of you on these lists are also doing this, I thought I'd get
your advice on the best procmail recipe to do this. 

This was asked several times on the procmail mailing list. Search

    <URL:http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/>

If you use mh as your MUA and procmail you could also look at:

    <URL:http://www.rosat.mpe-garching.mpg.de/mailing-lists/exmh/>
    <URL:http://www.rosat.mpe-garching.mpg.de/mailing-lists/mh-users/>

For exmh users I build also a glimpse index that combines the three lists
above:

    <URL:http://www.rosat.mpe-garching.mpg.de/~ach/exmh/archive/>

Here is the simple procmail rule I use in .procmailrc:

ARCDATE="`/usr/bin/date +%y%m`"

MHONARC_MBOX="/home/ach/lists/mhonarc/$ARCDATE.mbox"

:0: $MHONARC_MBOX$LOCKEXT
* ^Sender:.*owner-mhonarc@
{
        :0 c
        $MHONARC_MBOX

        :0 c
        | /home/ach/bin/mailarchive -add mhonarc "$ARCDATE"
}


The mailarchive script is a simple wrapper around mhonarc. Which adds
a message (-add) to the archive or rebuild a (monthly) archive.

The sender header is useful for lists managed by majordomo. For smartlist
served lists I use the X-loop header. If you have to use the the special
'TO' regexp of procmail I would suggest to use

* ^TO(the-list-name@)
* !From my-user-name
* !Return-path: my-user-name
{
        ...
}

instead (replace 'ach' with your username). This filters out the your carbon
copy of a message you send to the list and cc'ed also to you.

Hope this helps,
Achim

Thanks much,
Nancy

PS - I'd appreciate your feedback on the way I've formatted my MHonArc
archives.  You can see my work in progress at: 

 http://jasper.ora.com/faqs/discussion/faq-maintainers/1995/

Why a colon in the index page links at the botton of the messages?  E.g.,

   o Prev: Re: Internet.bcsmac.org duplicated FAQ server postings 
   o Threaded Index: 
   o Chronological Index: 

I realize that this is a very big archive and I plan to split it up as
soon as I get a format I'm happy with.  (Any tips for splitting an archive
are welcome! I'm thinking of doing Q1, Q2, Q3, and Q4.)

If you ever find an useful adaptive naming/direcotory structrue to archive
low and high volume mailing list let me know.

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