Thomas Techer Bear <ttb(_at_)kew(_dot_)com> writes:
...
Given tokens passed for the command line as the -a and -d flags in
Mlocal, P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=10/30, R=20/40,$
T=DNS/RFC822/X-Unix,$
A=procmail -Y -a $h -d $u$
How would I match on them in the procmailrc? Clearly they should be
variable names, but the man pages do not make clear what or how.
The username argument(s) ($u) control who is receiving the mail. If a
.procmailrc is unsure whom it is running as, it can always examine
$LOGNAME.
As for the extra argument passed via -a ($h, usually originating in the
+detail of user+detail addresses), that's passed in as $1. You can
match against it by copying it to a real variable and using the "var
??" condition specail:
OPT = $1
:0
* OPT ?? ^^some-value^^
some-folder
The double carets (not carats, karats, or carrots) anchor the regexp to
match the entire value of the variable, not just part of it.
Philip Guenther