procmail
[Top] [All Lists]

Re: assigning pipes and commands to Variables

2001-09-03 21:57:41
On Tue, Sep 04, 2001 at 11:27:54AM +1200, Brian wrote:
:0
* ^Subject:.*Test
| /usr/local/bin/dmail +Test

I want to set a variable with the action.  I expected it to be something
like this:
TEST_MAIL="| /usr/local/bin/dmail +Test"

However, procmail always interprets this as a mailbox name and delivers mail
to the mailbox "|".  I have tried many different ways of quoting and
escaping character but procmail always interprets the contents of the
variable as a mailbox to deliver to.

Is there a way to assign a variable so that procmail will pipe to the dmail
program? 

Try this instead:

TEST_MAIL="dmail +Test" # See Philip's earlier statement on using full paths \
v. adding the dir to $PATH

:0:
* ^Subject:.*Test
| $TEST_MAIL

-- 
Andrew Edelstein        -       andrew(_at_)pure-chaos(_dot_)com
http://andrew.pure-chaos.com
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>