Subject: Re: applying recipes to each recipient

From: Roman Czyborra <[email-masked]>
Date: Wed, 24 Aug 1994 13:32:59 +0200

> If I have a message from bert cc'ed to joe mary and iggy, I would
> like a copy in each recipients folder.  However I would not like a
> message that matches someone, to simply fall through the same way
> that a person that does not match someone.

> :0 c:
> (^TO|^From)joe@chem
> joe

> :0:        # oops "everyone" goes here (including joe, mary, bert & iggy)
> default

A clean way to prevent this would involve adding two lines to every
filing recipe:

	FILED=!

	:c:
	(^TO|^From)bert@chem
	bert
	:a
	{ FILED }

	...

	:
	$$FILED
	{ HOST=done }

---

From: [email-masked] (David W. Tamkin)
Date: Wed, 24 Aug 1994 11:22:50 -0500 (CDT)

Roman Czyborra suggested (to a person whose name I no longer remember,
sorry):

| A clean way to prevent this would involve adding two lines to every
| filing recipe:
| 
| 	FILED=!
| 
| 	:c:
| 	(^TO|^From)bert@chem
| 	bert
| 	:a
| 	{ FILED }
| 
| 	...
| 
| 	:
| 	$$FILED
| 	{ HOST=done }

Well, that still requires a separate recipe for everyone in the company who
might be another recipient or the sender of in-house mail.  I haven't been
able to think of a way to do it without listing names, as was requested,
since there could be any number of local names among the sender and
recipients.

So without trying to do that, I wonder whether this variation on Roman's idea
would work without needing to add an :a clause to every recipe:

     LASTFOLDER

     :c:
     (^TO|^From.* )bert($| |@chem)
     bert

     :c:
     (^TO|^From.* )joan($| |@chem)
     joan

     ... et cetera ...

     :
     $${LASTFOLDER+!}!
     { HOST=done }

David W. Tamkin  P. O. Box 3284  Skokie IL  60076-6284
[email-masked]   MCI Mail: 426-1818   +1 312 714 5610

---

From: Roman Czyborra <[email-masked]>
Date: Wed, 24 Aug 1994 18:48:27 +0200

> So without trying to do that, I wonder whether this variation on
> Roman's idea would work without needing to add an :a clause to every
> recipe:

That's the dirtier way I had in mind.  As procmail assigns LASTFOLDER
before the folder is even opened, relying on it would be a bit more
risky, but you could probably tell from the log if problems ever
occured who to ask for a resend.