procmail
[Top] [All Lists]

Problem solved! Need streamlining advice

2001-02-15 11:38:46
Thanks to all of you who helped me figure this out.

I'm including the solution, the problem is listed below it.

Is there any streamlining that you can recommend
to keep procmail from processing more than it has to?
For instance, if I have 1000 users, will all of the 
tests at the top be executed?

Thanks!

Barton

:0
* ! .*for <UserA(_at_)(_dot_)*>;
* ! ^TO_UserA@
* ! .*for <UserB(_at_)(_dot_)*>;
* ! ^TO_UserB@
{
  :0
  unsorted
}
 
:0E
{
  :0c
  * ! .*for <UserA(_at_)(_dot_)*>;
  * ! ^TO_UserA@
  { }
  :0cE
  UserA/in
 
  :0c
  * ! .*for <UserB(_at_)(_dot_)*>;
  * ! ^TO_UserB@
  { }
  :0cE
  UserB/in
 
}
 
:0h
/dev/null
                

Hi,

I can't figure out how to accomplish something like this,
and I was hoping someone can help.

I need to sort incoming mail into directories,
so, that if a single piece of mail was sent to UserA & UserB, then
a copy would be placed in UserA's directory and UserB's directory.
If the mail was sent to someone other than UserA or UserB,
then the mail would be put in the NoUser directory.

Something like this:

If mailed to UserA then copy to UserA directory;
If mailed to UserB then copy to UserB directory;
If not mailed to any of the above, copy to NoUser directory;

Perhaps try using the 'E' flag.  It works like an 'else if' statement.
(untested, of course!)

:0c:
* ^TO_UserA@
UserA

:0Ec:
* ^TO_UserB@
UserB

:0E:
NoUser
_______________________________________________
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>