Subject: Re: Environment Variables

From: [email-masked] (Stephen R. van den Berg)
Date: Fri, 10 Dec 1993 13:44:27 +0100

Leo Gestetner wrote:
>Well, when I log in, I set a variable, called both
>$ARCHIVE_DATE, and $archive_date, and I want to import
>one of these variables to procmail.
>They are set using a shell script, which determines
>there value depending on the day of the month.
>A typical value is "1Dec93" or "3Dec93"

>Any ideas on how to import this?

Aha, but then the -p option wouldn't have helped either.

What you could do is something like:

	Put the following in your .procmailrc file:

		INCLUDERC=$HOME/.extra

And, in your login script, something like:

	echo "ARCHIVE_DATE=$ARCHIVE_DATE" >$HOME/.extra.tmp
	mv -f $HOME/.extra.tmp $HOME/.extra

Alternatively, you can run the commands that determine the
value of ARCHIVE_DATE in your .procmailrc directly.  This will involve
slightly more overhead on every mail arrival.  That would look something
like:
	ARCHIVE_DATE=`command_that_outputs_the_desired_value`

-- 
Sincerely,                                  [email-masked]
           Stephen R. van den Berg (AKA BuGless).

"Always look on the bright side of life!"