procmail
[Top] [All Lists]

Re: Lost messsages ?

1997-01-20 18:20:10
On Mon, 20 Jan 1997, Bart Haezeleer wrote:
The problem is the following :
If someone send a message to user1(_at_)pobox(_dot_)com and 
user2(_at_)pobox(_dot_)com
e.g. The message comes only in the file for user1.
     It depends on the contents of ~/.procmail/rc.testing

That is because once procmail makes a delivery, it stops there. You
can make all of the delivering recipes into copying recipes by using
the 'c' flag: ( :0c: ) Then after all messages are delivered you will
still have a copy that must be delivered somewhere. If you don't want
it in your mailbox, then send that extra copy to /dev/null.  Using
your sample, I've made the modifications below. Also, when using the
"^TO" macro, the ".*"  actually degrades the regular expression that
"^TO" stands for. At the least, they're redundant. 

~/.procmail/rc.testing :
------------------------
:0c:
* ^TOuser1*
IN.user1
:0c:
* ^TOuser2*
IN.user2
:0c:
* ^TOuser3*
IN.user3
  :0
  * ^TO(use1|user2|user3)
  /dev/null

The 'c' flag really isn't needed on the user3 recipe, and user3
doesn't have to be in the last recipe. I just did it that way for
symmetry. Makes adding users easier. ;-) 

David



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