On Thu, Sep 09, 2010 at 06:53:07AM -0700, Michael Elkins wrote:
> On Tue, Sep 07, 2010 at 12:57:51PM +0200, j...@telefonica.net wrote:
> >I'm searching about a hook that will save to its mailbox all mails with
> >To: list_...@server.com after had read them, I think when changing
> >mailboxes.
> >
> >Now, I received all mails to +spoolfile but I would like to move with a
> >hook the ones coming To: list_...@server.com after had read them.
> >
> >I have tried with save-hook, fcc-hook, but I can't find which one will
> >do that move or copy.
> 
> Mutt does not really have any automatic filtering built in.  What
> most people do in this situation is to use something like procmail
> to filter incoming mail into separate mailboxes per email list, then
> put "mailboxes +list1 +list2" in their ~/.muttrc to be informed when
> each mailbox has new mail.

Mutt has a wonderful regular expression language that makes it easy to
write small, powerful search expressions.  Searches are filters, really
(see gmail).  It seems like a pity that mutt doesn't have a first-class
filter.  Procmail is not easy to use by comparison to mutt.  Sure, sure,
if you're using a text-based MUA you can write procmail filters.  True.

But for some use cases external programs like getmail, fetchmail and
procmail all fall short.  For example, I've given up on fetchmail
because it dropped 30K messages once (from a 100K msg folder).  I've
given up on getmail because it doesn't preserve message flags, so if
I've an IMAP Inbox that I want to leave a few days' worth of messages at
a time for accessing from multiple MUAs (say, mobiles), then I can't use
getmail to later move those off the IMAP server.  (No, the getmail
maintainer was not interested in patches to preserve message
status/flags.)  If I use IMAP, can't or don't leave mail on the server,
but can use neither getmail nor fetchmail then how am I to use procmail?

So I use mutt as a mail fetcher.  It's easy: I've a simple macro that
tags all un-deleted messages and the tag-saves them to their destination
(I've posted this macro before).  It'd be easy to add multiple steps,
with each step tagging messages matching a given filter, then tag-saving
to specific folders.  Well, 'easy' is relative -- easy for me, but then,
I don't file e-mail (I depend on searches).  Mutt could provide this off
the shelf, and then it would be really easy.

Seems like a shame to have a great search language that cannot also be
used for writing filters.  Mutt has everything it needs to replace that
getmail/fetchmail/procmail mix -- only the finishing touches are
missing.

Nico
-- 

Reply via email to