procmail
[Top] [All Lists]

Re: Running user procmailrc

2004-03-23 07:29:56
Roland suggested to Alex,

# Drop to user .procmailrc if user criteria matched
:0
* <some user unique criteria>
{
       DROPPRIVS=yes
       SWITCHRC=$HOME/.procmailrc
}

I don't have admin privileges anywhere, so I can't test what happens in /etc/procmailrc, but my understanding is that if you assign SWITCHRC inside /etc/procmailrc, and procmail gets to the end of the other file without delivery, procmail will act just as it does when it gets to the end of /etc/procmailrc without delivery: (it will drop any privileges it still has and) it will then go to $HOME/.procmailrc.

So if the message would fall off the end of ~/.procmailrc and be delivered to $DEFAULT, instead it will take a second trip through ~/.procmailrc for nothing, and if there have been filtering recipes, perhaps the second pass will give wrong results, because on the second pass the recipes nearer the top of ~/.procmailrc will be looking at the message as modified on the first pass by filters that are farther along.

So I'm under the impression that if you want to bail from /etc/procmailrc and make a bee-line for ~/.procmailrc, this is the way to do it (and DROPPRIVS=yes would happen automatically):

 :0 condition-related flags
 * conditions
 { SWITCHRC }

But again, I have no means to test that.


_______________________________________________
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>