Sten Drescher <dreschs(_at_)mpd(_dot_)tandem(_dot_)com> wrote:
I'm using the local_procmail mailer in sendmail 8.7.1, which
takes addresses of user+detail and sends the mail to procmail for user
with -a detail. The procmail man page indicates that the argument to -a
is assigned to $1, which is true. My problem is, how can I have a
procmailrc rule to take advantage of this? I've tried
* 1 ?? .+
From the procmailrc man page:
variablename ??
Match the remainder of this condition against the
value of this environment variable (which cannot be a
pseudo variable). A special case is if variablename
$1 is a pseudovariable. So this doesn't work.
* ?[ -n "$1" ]
This line will be given to the shell, which, in turn, will evaluate the $1.
Since the shell is not started with any arguments (procmail was), this
doesn't work either.
and every mail gets filed. How can I create a condition where
_only_ mail with $1 set gets filed?
Try something like:
ARGUMENT=$1
:0:
* ARGUMENT ?? ^^[^/ ]+^^
mail.$1.spool
--
Sincerely,
srb(_at_)cuci(_dot_)nl
Stephen R. van den Berg (AKA BuGless).
"Always look on the bright side of life!"