On Tue, 08 Jul 1997 02:07:30 -0500,
Ben Escoto <benscott(_at_)mcs(_dot_)net> wrote:
"JW" == Jerry Werner <itsol(_at_)texas(_dot_)net>
JW> I subscribe to three mailing lists and would like procmail to
JW> sort mail from each list into separate MH-style mail folders.
JW> The problem is that some messages are sent to two (and, rarely,
JW> three) of the lists, and my current procmail setup only sends it
JW> to one of my list repositories. (If a message goes to two
JW> lists, I'd like to copy the message to both MH mail boxes.)
I have the same problem. I would like each message to be
linked into all appropriate folders. Those that do not belong in any
other folder should be linked to my inbox. I see how it would be
possible using copy (kind of - I still don't know how to make one the
"default"), but it seems pretty much impossible if I want to use hard
links instead of different copies. Someone please inform me if it can
be done, thanks.
I believe you can instead use the rc.files to assign to a variable and
then when you're finished, write out the message to all folders named
in that variable.
In rc.one:
:0
* condition
{ FOLDER="$FOLDER${FOLDER:+ }one" }
In rc.two
:0
* another condition
{ FOLDER="$FOLDER${FOLDER:+ }two" }
And in your main .procmailrc, after all the rc.files:
:0
* FOLDER ?? .
$FOLDER
If FOLDER is empty at this point, Procmail will not execute this
recipe, and thus fall through and write to your default inbox. (You
can of course have other recipes after this one if you still want to
check for other conditions.)
One problem is that Procmail doesn't really want you to drop out of an
rc.file back to the including .procmailrc in the middle of it, once
you've determined that you know which folder you want to save your
message to. You can fill the file with nested backslashes if you
really want to avoid unnecessary processing, but that's a horrible
kludge.
/* era */
--
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r. <http://www.iki.fi/~era/>
* Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>