Hi,

On Thu, 29 Nov 2001 Jun <[EMAIL PROTECTED]> spewed into the ether:
> Hi, all,
> 
> This probably sounds stupid but I really get stuck here. I don't know
> how to setup filters to organize different mailing list into different
> folder, just like pine does.

As everyone else seems to have pointed out, this is procmail's job, and
not really that of an MUA. (I don't know how Pine organizes it, as I've
never used Pine :-)

Here is the filter in my procmailrc (careful with the line-breaks, if
any) :

<procmailrc>

MAILDIR=$HOME/Email
ARCHIVEDIR=$MAILDIR/archive
:0
* ^(X-list: |X-Mailing-List-Name: |Sender: owner-|X-BeenThere: |Delivered-To: mailing 
list |X-Mailing-List: <|X-Loop: |X-List-ID: <)\/[^@\.]+
{
    LISTNAME=`echo $MATCH | sed -e 's/[\/]/_/g'`
    LISTARCHIVEDIR=$ARCHIVEDIR/$LISTNAME
 
    :0 Wic
    * ? test ! -d $LISTARCHIVEDIR
    | mkdir $LISTARCHIVEDIR

    :0 c
    | gzip >> $LISTARCHIVEDIR/`date +%m-%Y`.$LISTNAME.gz
     
    :0
    $MAILDIR/$LISTNAME
}

</procmailrc>

Hope this helps.

pv.

PS: Of course, you need to ensure that procmail is called from your
    MTA's config file.

-- 
Prahlad Vaidyanathan <[EMAIL PROTECTED]>                What, me worry ?
http://www.symonds.net/~prahladv/                    Don't Panic !
--

Attachment: msg20842/pgp00002.pgp
Description: PGP signature

Reply via email to