* Rob 'Feztaa' Park <[EMAIL PROTECTED]> [2002-04-04 03:42]:
> #!/bin/bash
> for i in ~/mail/*
> do
> i=$(basename $i)
> echo folder-hook =$i \"set record=\'=$i\'\"
> done
>
> then simply source the output of this script.
> It might even be simpler than that, though ;)

exactly - "basename" is not required !

  #!/bin/bash
  cd ~/mail
  for i in *
  do
  echo folder-hook =$i \"set record=\'=$i\'\"
  done

still - all this is completely superfluous.

you see, this folder-hook gets activated
once you switch to, say, folder "=foo".
then the message you save gets saved to =foo, too.

so when you exit from the folder then mutt will
ask you whether you want to move the read messages
from the current folder to the current folder?
that's a move of messages within the current folder.
what gives?

i understand that you want to save outbound mails -
and this is controlled by the variable "save_name".
like i said before, mails to "listname@domain"
will get saved to the folder "+listname".

so all you need to do is filter all mails that go
via listname@domain to +listname - and that's it.
there is *nothing* to set besides "save_name" -
no folder-hooks, no "record", no nothing.  ;-)
and you could still use "record" for moving those
read mails to another folder on exit from mutt.

and if you want to filter mails via listname@domain
to a folder named +IN.LIST then all it takes to
combine +IN.LIST with +listname is a symlink!

  $ cd ~/mail; ln -s IN.LIST listname

try it!

Sven

===
$ agrep -d '^$' MUTT ~/.procmailrc

:0 c
* ^[EMAIL PROTECTED]
IN.MUTT

# 000710 - added yahoogroups.com
:0
* ^TOmutt(-dev|-users)?@.*(cs.hmc.edu|mutt.org|yahoogroups.com)
IN.MUTT

Reply via email to