Tony Jago <tony(_at_)fit(_dot_)qut(_dot_)edu(_dot_)au> writes:
If I call procmail like this:
procmail -m /my/script rcpt1 rcpt2 rcpt3 rcpt4 rcpt5
How can access the whole argument string? After changeing the message, I
want to be able to resent the message using sendmail.
I was thinking something like this might work:
/my/script:
:0
! -oi -f root(_at_)machine $@
but the $@ does not expand. Alternalty I think the SHIFT should work
but I guess I would need some sort of loop to shift though the
arguments.
What version of procmail is this? Arguments don't work with "-m
/etc/procmailrcs" in versions between 3.06 and 3.10 (inclusive).
That's what drove me to upgrade to 3.11pre1 a year ago.
Also, you may need to surround the $@ with double quotes. I see
a note in the 3.11pre4 HISTORY file regarding that, though I'm not
sure what Stephen means:
1995/10/29: v3.11pre4
Changes to procmail:
...
- Regression bug since v3.06, procmail -m /etc/procmailrcs
didn't allow any arguments to be passed, fixed
...
- Fixed parsing of $@' when not doublequoted
Philip Guenther