procmail
[Top] [All Lists]

Re: $HOME in .forward?

1997-02-19 13:12:06
How can I use $HOME in .forward?
 
In an account that I use only occasionally,
my procmail executable is in $HOME/bin
 
The location of my home directory has sometimes been changed, and so I
would rather specify
 
    "| IFS=' ' && exec $HOME/bin/procmail -f- || exit 75 #ruck"
 
instead of 
 
    "| IFS=' ' && exec /home/summer/ruck/bin/procmail -f- || exit 75 #ruck"
 
because I might not realize that my home directory has been changed
until after email has been lost.
 
But the former won't work, because HOME isn't set when sendmail reads 
.forward.
 
What's a good way to handle this?  Something along the lines of
 
    "| IFS=' ' && exec `csh -cf 'echo ~ruck'`/bin/procmail -f- || exit 75 
#ruck"

This should work (it works for me) assuming you have (static) access to
the Korn shell.  Of course if the Korn shell isn't in "/usr/bin" then
make the appropriate change:

"| IFS=' ' && exec `/usr/bin/ksh -c 'echo ~ruck'`/bin/procmail -f- || exit 75 
#ruck"

Lates!
---------------------------------------------------------------------------
Tim <bodysurf(_at_)pobox(_dot_)com>                          
mailto:bodysurf(_at_)pobox(_dot_)com
Finger bodysurf(_at_)pobox(_dot_)com for my PGP public key (Bits 1024/KeyID 
09DA5C49).
PGP Key FPrint (09/03/94): 4C 97 F1 FA 70 55 68 91  49 D1 AD F2 DD 63 0C 15
---------------------> Please PGP encrypt your email <---------------------

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