From: Curtis Maurand [mailto:curtis(_at_)maurand(_dot_)com]
Sent: Monday, June 28, 2004 5:32 PM
Sorry for the delayed response. For a faster response,
write the list, not me personally. I don't promise to have
time to reply to all private email derived from list postings.
I tried the following
:0:
* ^TO_<address>
SWITCHRC=${HOME}/${LOGNAME}/.procmailrc
but that still made everyone bypass the file. Does the curly
brace do something special that isn't implied in the procmailrc
man page?
Well, I'm not sure about the "that isn't implied in the . . . man
pages" part, because to me it is implied in the man pages. But I
can understand the confusion, so I will elaborate:
An action line in a recipe can't be a raw assignment[1] of the
standard type
FOO = bar
such assignments can be made inside an rc-file, naturally;
but not as action lines by their "naked" selves. Simply state
assignments on (non-recipe) lines by themselves.
That's why we would need the curly braces here. The action,
then, is to open a nested brace set, which is an allowable
action. Within the nested brace set, we make our assignment,
then exit with the close-brace.
The other thing here is that you don't need to explicitly
state in an /etc/procmailrc file that we should switch to the
user's .procmailrc. That is the standard thing to happen when
we leave an /etc/procmailrc (unless we had a completed
delivery action inside the /etc/procmailrc file).
So just unsetting SWITCHRC will drop us out of /etc/procmailrc
and into $LOGNAME's .procmailrc, if one exists.
That's what I had suggested all along in the post you replied
to.
:0 f l a g s
* conditions
{ SWITCHRC }
Try it and see. Set up a test harness, a.k.a. sandbox, if you
haven't already. (See the archives for many, many posts about
that.)
Usually curly braces only delimit a nesting block. The
switchrc thing isn't documented very well, so I'm unsure
how to use it.
Well, as explained above; and for that matter, as explained
below:
Dallman Ross wrote:
On Fri, Jun 25, 2004 at 10:53:48PM -0400, Curtis Maurand wrote:
I have a couple of users that I need to bypass the
/etc/procmailrc.
[snip]
Two ways I can think of quickly: one, near the top of
/etc/procmailrc,
:0
* LOGNAME ?? ^^(foo|bar|baz)^^
{ SWITCHRC }
(I'd have preferred it if you wouldn't top-quote, for reasons
that might now be more obvious than before.)
Dallman (no fan of top-quotes except in very limited guises)
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail