Sam wrote,
| This recipe works fine:
|
| :0 c
| |$SENDMAIL sam
|
| But when I try to use formail, it fails:
|
| :0 c
| |/usr/local/bin/formail | $SENDMAIL sam
|
| :0 c
| |(/usr/local/bin/formail) | $SENDMAIL sam
|
| # Even this does not work and /tmp perms are fine
| :0 c
| |cat >> /tmp/out
Here's a thought: the recipe with no characters from $SHELLMETAS works,
but those with characters from $SHELLMETAS do not. So, first question,
what is $SHELL set to? Perhaps to a name (or a relative path) that doesn't
exist?
It's this type of insightful thinking that separates the sharp
sysadmins from the mediocre ones. :-)
Yes, that was exactly the problem. Setting SHELL to /bin/sh made it
work fine. I figured this out shortly after sending the email.
The mailing lists are just aliases and don't run out of a user's
account. So the uid,gid when procmail runs is "daemon", which of
course, doesn't have a shell. On SunOS, the SHELL is conveniently set
to /bin/sh (probably a security risk) for uids w/o shells but NetBSD
sets them to /sbin/nologin (exit). That's why I have to explicitly
set the shell for the procmailrc to work.
Live and learn.
Thanks,
Sam