logo       

Re: Setting environment variable in maildrop to "" deletes it?: msg#00027

mail.maildrop

Subject: Re: Setting environment variable in maildrop to "" deletes it?

Courier User <courier@xxxxxxxxxx> writes:

> [ Note: I recently posted this message to the courier-users group.
> Clearly, it's pertinent here, as well. ]
>
> In trying to debug some problems in a program that I'm invoking via
> xfilter in maildrop, I have realized that the following construct in
> a maildrop recipe file doesn't do exactly what I expected:
>
> VARIABLE=""
>
> In this case, maildrop completely removes the environment variable
> called "VARIABLE". I was expecting that it would cause that
> variable to exist and to be bound to an empty string.

Attached is a patch to maildrop (in the 0.44.2.20031219 release of
Courier) which implements the following features:

1. VAR=""

No longer unsets the variable, but simply sets it to
an empty string, as does every other variable-setting
language that I know of.

2. unset VAR

A new directive that completely removes the variable.

Sam has already applied this patch to the maildrop that comes with the
latest official Courier release (courier-0.44.2.20040114). I presume
that it will be applied soon to the stand-alone version of maildrop, as
well. But in the mean time, you can use this on your own version.

I've done a small amount of testing, and it seems to work fine.
However, please do your own testing, as well.

Attachment: maildrop.unset.patch
Description: Maildrop unset patch



--
Courier User
courier@xxxxxxxxxx
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise