Philip Guenther is heard to have said:
To quote the procmail(1) manpage:
-a argument
This will set $1 to be equal to argument. It can be
used to pass meta information along to procmail. This
is typically done by passing along the $(_at_)x information
from the sendmail mailer rule.
Thus:
RECIP = $1
should do it. As for $@, to quote the procmailrc(5) manpage's BUGS
section:
... When the -a or -m options are
used, "$@" will expand to respectively the specified argu-
ment (list); but only when passed as in the argument list to
a program.
How are you using $(_at_)? Are you quoting it?
Herein lies the key.
I was trying to use $@ because that's what the man page suggested. I had
started using $1, but it wasn't doing what I wanted it to do. I had set up
a simple recipe:
:0
|echo $1 >> ~/test
This got me null lines.
I tried:
LOG="This is the recipient '$1'"
That didn't get me the desired result. Thru a whole series of iterations
and pulling my hair out for the last couple of hours, I ended up with the
following, and it was the "RECIP=$1" that gave it to me! :)
-------------------------------------------------------------------------
RECIPIENT = $1
# To send mail to a new userid, copy these lines and remove the #
# Change the "userid" to be the local user to receive mail, such as
# mail for "webmaster". Change <user(_at_)isp(_dot_)domain(_dot_)tld> to the
mailbox
# you want the mail forwarded to.
#:0
#* RECIPIENT ?? <userid>@
#! <user(_at_)isp(_dot_)domain(_dot_)tld>
-------------------------------------------------------------------------
Appearantly it doesn't recognise the form:
* 1 ?? <userid>@
as being equivalent to the above.
The short answer though is my problems' all nice and solved. Thanks Phil!
Mike was here...