Re: mbox-hook: broken or useless?
* Haakon Riiser <haakon.riiser@xxxxxxxxxx> [2005-05-22 12:13 +0200]:
> addresses it was sent to. That way, after I have read the email,
> I can move it to an appropriate read mail folder for archiving.
> I want this last step to go automatically when I quit mutt, and
> I assume this is a very common desire, hence there should be a
> way to make mutt do it.
>
> Any tips?
I do that partly on entering folders. But in fact I move all mails
from one folder to one specific folder.
The main functional difference for me to an mbox-hook is, that I only
move old, non-flagged mails and I try not to break threads.
push
"<tag-pattern>~r>10d\n<untag-pattern>~F|~D|~O|~N\n<untag-pattern>~(!~T)\n<tag-prefix-cond><save-message>\n\n<sync-mailbox><first-entry><next-new><redraw-screen>"
And I do this only once a day for performance reasons (on my previous
machine).
Nicolas
------
print "folder-hook ="$1"$ '`~/.mutt/clean_hook "$1"`'"
------
if [ -e ~/Mail/.cleaned/$1 ]; then
echo push \"\"
else
touch ~/Mail/.cleaned/$1
echo -n $1 will clean>/dev/tty
sleep 1
cat <<EOF
push
"<tag-pattern>~r>10d\n<untag-pattern>~F|~D|~O|~N\n<untag-pattern>~(!~T)\n<tag-prefix-cond><save-message>\n\n<sync-mailbox><first-entry><next-new><redraw-screen>"
EOF
fi
-----