Volker Kuhlmann wrote,
| (The login shell is tcsh)
(Without setting a value for $SHELL, the rcfile has this recipe:)
| :0 c
| |echo $DEFAULT $ORGMAIL $LOGFILE $PATH >>$HOME/pmtest
| $HOME/pmtest has this content:
|
| /home/users/pg/kuhlmav/Mail/inbox
| /var/mail/kuhlmav
| /home/users/pg/kuhlmav/Mail/etc/procmail.log
| [and here goes my usual shell path - why??????]
| The setting of $DEFAULT is therefore correct, but the setting of $PATH
| is completely ignored.
That part's explicable, at least. Because the command line contains
characters from $SHELLMETAS, procmail invokes a shell to run it. Your login
shell is tcsh, and you haven't overridden that by setting $SHELL. So tcsh
reads your ~/.cshrc or ~/.tcshrc first, which has a different value for
$PATH.
Fix #1: set SHELL=/bin/sh up top in your .procmailrc so that the shell
invoked to handle the redirector won't read a startup file that tells it to
use a different PATH.
Fix #2: instead of telling procmail to echo the variables elsewhere, let it
put them into the logfile, so that no shell will be involved:
LOG="DEFAULT is $DEFAULT,
ORGMAIL is $ORGMAIL,
LOGFILE is $LOGFILE (as you had to know in order to read this), and
PATH is $PATH.
"
Fix #3: put your PATH for interactive logins into your in environment in your
~/.login and get it out of your ~/.cshrc.