| in my .procmailrc, i set an environment variable like
| MYVAR = something
| i want to use it in a condition like
| * TOsomething(_at_)mydoma(_dot_)in
| but
| * TO${MYVAR}
| isn't matched, nor is
| * TO$MYVAR or * TO ${MYVAR}(_at_)doma(_dot_)in
If you want variable expansion on a regexp condition, you need to put an
addition $ in front of it,
like this:
* $ TO$MYVAR
As Andrew Edelstein has pointed out, you probably meant
* $ ^TO$MYVAR
or
* $ ^TO_$MYVAR
in order to use procmail's built-in ^TO or ^TO_ token, but besides that, you
need that introductory dollar sign to get variable and command substitution
done on the condition before it is interpreted as a regexp. Otherwise a
medial or final dollar sign will represent a hard newline included in the
pattern.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail