procmail
[Top] [All Lists]

Re: Force Bourne shell? Was: Undefined 'term' problem

1996-10-19 11:55:57
Philip Guenther <guenther(_at_)gac(_dot_)edu> wrote:

I've seen enough of these problems where SHELL != /bin/sh, that I
went ahead and put SHELL=/bin/sh in PRESTENV in config.h:

#define PRESTENV        {"IFS","ENV","PWD","SHELL=/bin/sh",DEFPATH,0}

That may someday surprise someone here, but I still think it leads to
the expected behavior in more cases then not.  Does anyone else out there
think that this is a good idea and should be encouraged in the source,
or am I just being a Bourne shell fascist?

I don't think so, and here's why:  I set up procmail from Nancy
McGough's excellent beginner's FAQ, and it worked perfectly-- until I
tried recipies that involved a pipe.  No matter how simple the recipe,
it wouldn't work.  Even when I tried a recipe right from the procmailex
man page, it wouldn't work.

The logfile, however, always indicated that the recipe *had* succeeded,
even though it actually hadn't.  I posted to this list for advice, and
several people generously offered suggestions, but none helped.  I spent
about a zillion hours experimenting with different file permissions, or
recipe syntax, try it with a blank space here, or with one removed
there-- no dice.

But the one experiment I didn't try was to add a SHELL=/bin/sh line to
my .procmailrc.  And why didn't I try it?  Because the procmailrc man
page says:

   Environment variable defaults
       LOGNAME, HOME and SHELL
                             Your (the recipient's) defaults


...and I use the Bourne (actually Bash) shell, so I thought procmail
must already be getting my shell from the environment.

But finally someone posted to the list asking for help, and their
problem sounded just like mine.  And this time one of the wizards (it
was Mr. Guenther, IIRC) said, "Add that SHELL= line", and I knew right
away I'd finally found an answer.  Sure enough, procmail now works for
me as it is supposed to.

So I think SOMETHING should be changed.  If nothing else, maybe just
that part of the procmailrc man page.  It could say, like, "Procmail
will get your SHELL from the environment, but if you have trouble with
recipies involving pipes, try adding 'SHELL=/bin/sh' to your
.procmailrc."


RR

...If this isn't war, why is CNN massing on the border? 

--
in austin, texas                    <live music capital of the world!>
http://www.io.com/~areray                    Festina lente.
 [or finger areray(_at_)io(_dot_)com for PGP public key and kewl .plan!]
"The sun is gonna shine... in our back yard... some day."   :)  :)  :)

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