procmail
[Top] [All Lists]

Re: Forward and Store recipe

2000-10-13 04:23:40
On  0, "David W. Tamkin" <dattier(_at_)ripco(_dot_)com> wrote:
Subba Rao asked,

| I am using the following recipe to forward and store an email.
| The recipe does work. I am wondering if this recipe is using redundant
| carbon copying.
| 
| :0c
| * ^Subject:.*\<mysubject\>
| {
|         :0 c
|         ! team(_at_)company(_dot_)com
| 
|         :0
|         $DEFAULT
| }
| 
| I want the email to be processed by the remaining recipes in the list.

No, you need both `c' flags, and unless $DEFAULT is a directory you should
have a local lockfile on the save to $DEFAULT.  However, your current setup
is slightly inefficient as it forks a clone procmail to do the forwarding
and saving, and the original procmail can do all three tasks:

 :0c
 * ^Subject:.*\<mysubject\>
 ! team(_at_)company(_dot_)com
  :0Ac:
  $DEFAULT

My question, though, is why you need a specific save of a copy to $DEFAULT
there if you want to process the original of the message through the rest of
the rcfile.  By default (that's why the location is called "$DEFAULT")
procmail will save a message to $DEFAULT if it gets to the end of the recipes
without final delivery.  (If saving to $DEFAULT fails and $ORGMAIL is diffe-
rent from $DEFAULT, it will try to save to $ORGMAIL before giving up.)
It might be enough to forward a copy to team(_at_)company(_dot_)com and then 
let the
later recipes save it to $DEFAULT.


Thank you for replying.

I am using maildir format (qmail), so I don't see any reason to use a lock
file. Some of the mail, has different destination directories. The mail with
"mysubject" could get buried in that directory. So I save it to $DEFAULT along
with a copy in the destination directory.

In your recipe, don't I need to use open and close braces { }, for the action
items?

-- 

Subba Rao
subb3(_at_)attglobal(_dot_)net
http://pws.prserv.net/truemax/

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>