procmail
[Top] [All Lists]

Re: changing MAILDIR in recipes

1997-01-05 20:43:26
Timothy J Luoma <luomat(_at_)nerc(_dot_)com> writes:
If I change MAILDIR in a receipe, do I have to change it back or  
will it be reset automatically after that receipe exits?

You have to change it back yourself.  Just put

OLDMAILDIR = $MAILDIR
MAILDIR = wherever...

at the top of the recipe, and

MAILDIR = $OLDMAILDIR

at the bottom.  Now if a procmailrc called via INCLUDERC wants to call
itself recursively, then this won't work, but that's rare enough and
can be worked around.  If anyone needs lexical variables in procmail,
they should break that part out into a separate program, then get a
life...

Philip Guenther

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