Re: qmail-spp - problem when setting env var
Brought to you by:
pavcio
|
From: Pawel F. <pj...@gn...> - 2004-09-21 15:29:55
|
On Tuesday 21 of September 2004 10:24, Derek Sims wrote:
> if [ `env | grep ^RELAYCLIENT` ]; then
Why don't you simply use if [ -n "$RELAYCLIENT" ]; then
> export LOCAL='Y'
Another note: you don't need to do this if you run
> echo "SLOCAL=Y"
just after :)
> fi
> I get the following in the LOGFILE:
> 20040921080755 HELO+xxx.xxx.xxx.xxx, LOCAL set to Y by RELAYCLIENT
> 20040921080755 FROM+xxx.xxx.xxx.xxx, LOCAL:Y
> Z
>
> Can anyone explain why I get an apparent value in $LOCAL of "Y\nZ" ?
Nobody can - it's a bug - thanks for reporting it :P. I'm just about to
release 0.33 version, but please test this first:
Before compilation add line
data.s[data.len - 1] = 0;
just after
case 'S': /* set */
and just after
case 'U': /* unset */
(just after these two lines - twice), finally you should have:
case 'S': /* set */
data.s[data.len - 1] = 0;
if (!env_put(data.s + 1)) die_nomem();
break;
case 'U': /* unset */
data.s[data.len - 1] = 0;
if (!env_unset(data.s + 1)) die_nomem();
there.
Recompile qmail-smtpd and try it - you'll be the first running qmail-spp
0.33 :P.
Thanks once more, cheers!
--
Pawel Foremski
pj...@gn...
http://pjf.dotgeek.org/
|