Hi,
I write the following simple RCFILE:
ARG1=$1
ARG2=$2
ARG3=$3
:0
*
| ( echo ARG1=$ARG1 ;\
echo ARG2=$ARG2 ;\
echo ARG3=$ARG3 ;\
echo UID=$UID; \
echo DEFAULT=$DEFAULT \
) >/dev/console
I put it as /etc/procmailrcs/test
I chown it to user test, group users and permisions -rw-------
Directory /etc/procmailrcs belongs to root.root with permisions drwx------
Then, running as root, if I execute:
cd /etc/procmailrcs
echo "" | procmail -m test one two three
it writes to the console:
ARG1=one
ARG2=two
ARG3=three
UID=0
DEFAULT=/var/spool/mail/root
This is correct, as described by the manual.
But executing:
echo "" | procmail -m /etc/procmailrcs/test one two three
writes to the console:
ARG1=
ARG2=
ARG3=
UID=521
DEFAULT=/var/spool/mail/test
The DEFAULT and UID are the expected, but the arguments are lost.
Can anyone explain me whay?