On Wed, 14 Jul 1999, JT wrote:
If a message matches a recipe, how can I specify
two local folders to save it to? (I want to
archive the message, but also have it appear in
my incoming mail for me to read..)
Here's how I solved this problem. By adding "Filed-In:" to the header
of filed messages, I can usually do a quick skim of my main mail box,
and just delete the filed messages, because I can get back to them
later (were they were filed).
If I don't want to even see the filed messages in my main mailbox,
then I'll use the last rule to remove the messages, unless they are
explicitly sent to me. That's what I do for most mail-lists that I
subscribe to.
# BEGIN EXAMPLE -----------------
vMyName="(Bruce.Rafnel|bruce(_at_)(_dot_)*mayfield(_dot_)hp(_dot_)com|rafnelb)"
vFromMe="^From:.*$vMyName"
vToMe="^TO.*$vMyName"
# ----------------------
vRule=1
vFile=procmail.in
vPat="^TO(procmail|smartlist)|^Reply-To:.*procmail"
:0 cf
* $!^Filed-In: $vFile
* $$vPat
| /opt/procmail/bin/formail -bA "Filed-In: $vFile [$vRule]"
:0cA:
$vFile
# ----------------------
vRule=2
vFile=adept.in
vPat="^Subject:.*(arbortext|arbor.*text|adept)"
:0 cf
* $!^Filed-In: $vFile
* $$vPat
| /opt/procmail/bin/formail -bA "Filed-In: $vFile [$vRule]"
:0cA:
$vFile
# ----------------------
vRule=3
vFile=mud.in
vPat="^TOmoo-cows|^Reply-To:.*moo-cows|^TOmuq|^From:(_dot_)*(_at_)bioinformatics(_dot_)weizmann"
:0 cf
* $!^Filed-In: $vFile
* $$vPat
| /opt/procmail/bin/formail -bA "Filed-In: $vFile [$vRule]"
:0cA:
$vFile
# ----------------------
tRule=4
tFile=log.in
:0 cf
* $!^Filed-In: $tFile
* $$vFromMe
| /opt/procmail/bin/formail -bA "Filed-In: $tFile [$tRule]"
:0cA:
$tFile
# ----------------------
# Throw away messages, to my main mailbox, that have been copied to
# files in the $tMailList list. But, don't toss the ones directly to me!
vMailList="(procmail.in|adepters.in|log.in)"
:0:
* $^Filed-In: $vMailList
* $!$vToMe
/dev/null
# END EXAMPLE -----------------
Best regards,
Bruce Rafnel
_____________________________________________________________________________
Application design: "Simple things should be simple, complex things should be
possible." --Knuth
_____________________________________________________________________________