On Thu, Jun 03, 1999 at 02:36:51PM -0500, Jeff Rankin wrote:
> Is there anyway to have mutt provide some sort of filtering of mail
> messages in my inbox to a separate folder based on user-defined
> criteria?  I am using mutt via IMAP and am evaluating it's ability to
> let users filter or sort mail into folders when they open their IMAP
> mailbox. Thanks for the help!

Use procmail.  A good rule to start is

    # ~/.procmailrc

    PATH=/usr/local/bin:/usr/bin:/bin
    MAILDIR=$HOME/Mail
    DEFAULT=$MAILDIR/inbox
    LOGFILE=$HOME/log/procmail.log

    :0:
    * ^TOmutt-users
    inbox.mutt-users

    :0
    * ^X-Mailing-List: .*\/[a-z0-9][^ ]*@
    {
         LIST=`echo $MATCH | sed 's/@.*//;s/-list$//'`
         :0
         inbox.$LIST
    }

This saves each mail coming from mailbox foo to inbox.foo.  Note that
not all mailing list generate the X-Mailing-List header, therefore the
special rule for mutt-users.

  -- Holger

-- 
+ PGP || GnuPG key -> finger [EMAIL PROTECTED] +
+++ Debian/GNU Linux <[EMAIL PROTECTED]> +++ ICQ: 2882018 +++

Reply via email to