Probably a better way to do this. Here's what I'm trying to do:
Pass a series of variables to procmail used in a script not associated
with regular mail (i.e. It is a setup that turns Usenet message into
mbox mail format). In my experimental setup there are number of scripts
using a set of variables so I have them read in with the standard
shell notation of `. /path/to/var_file'. Apparently that notation is
ignored by .procmailrc. At least my .log files just says its being
ignored.
So attempting to use the -m flag for that job.
man procmail, in the synopsis shows its usage like this:
procmail [-ptY] -m [parameter=value] ... rcfile
I call it like that (procmail -m "parameter=value" $procrc) and it works as
advertised.
However, I'd like to set quite a few variables here so looking for a
way to read a file with that -m flag (or some other way)
Following up in man procmail and going to the detailed account of -m
usage I find it completely fails to mention any details about the
parameter=value usage.
In fact part of it seems to almost negate the synopsis:
-m Turns procmail into a general purpose mail filter.
In this mode one rcfile must be specified on the com
mand line. After the rcfile, procmail will accept an
unlimited number of arguments. . . . . .
This could mean that the parameter=value pairs could go after the
rcfile. But that isn't what it means and it won't work that way.
No further mention of -m parameter=value is made, there are some
`advanced' examples, but they are quite more complex than
-m parameter=value
Enough complaining about the documentation, I guess I could submit a
patch if I think the wording is confusing.
But to the punchline here... How can I make the procmailrc file read
in values from a file somwhere else on the file system?
Can -m be made to read from a file, or is there some other notation
besides `. /path/var_file' that will work.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail