<<< Date Index >>>     <<< Thread Index >>>

Re: ad hoc mail filtering?



On Fri, Sep 26, 2003 at 02:30:48PM -0500, christopher j bottaro wrote:
> my school disallows use of procmail (for god knows what
> reason) and so all my email gets dumped to $HOME/mailbox.  is

If you are allowed to run 'prcmail' you implicitely are
allowed to run any user-startable Program on the Mailserver.
May be this is what the school does not want :-)

> there any good/convenient way to have mutt split up my mail
> into different mailboxes?

I never risked an 'really completely automatic way'
but it would be possible to create macros for it...

> for instance, i'm on a few mailing lists.  when mutt detects
> new mail in $HOME/mailbox, can it move messages from the
> mailing lists to say Mail/list1 and Mail/list2, while leaving
> everything else in $HOME/mailbox?

If you write macros which 'type everything in antomatically', it
'might' work, but it may be very complex.

> also, given this setup, i'll have mail in $HOME/mailbox as
> well as Mail/list1 and Mail/list2.  if there a way with mutt
> to see an overview of all those mailboxes?  i.e. quickly let
> me know how many unread and total messages are in each one?

ONLY THIS is fairly easy!

You can write 'macros' to type in the 'limit-expressions'.

So you put something like the following in your .mutttrc
(I use 'X' for the firs character, because it seemed unused)

macro index X1 "l ~f listaddress1^M"
macro index X2 "l ~f listaddress2^M"

(of course you have to put in the correct
 addresses or some other expression to limit
 the view to exactly one list)

Then you can just type 'X1' - you see ohnly list1
and 'X2' to see only list2 and so on.

With (a lot) more complicated macros you can even make
ONE key toggle through a number of different views!

Or you can use 'tag' instead of 'limit' and then
automagically 'save teh tagged mails'. This way
you CAN automate writing the mails to other boxes.

Then you can put all the macros-starts after another
into a last line of f your muttrc like

 push X1X2X3X4

And startin mutt will always start the macros, hence
it might work to automate the whole process...

All I ever used I found in:
        http://www.mutt.org/doc/manual/

Stucki  (postmaster using mutt all the time)