procmail
[Top] [All Lists]

need advice on setting and using variables

2003-05-28 16:14:29
Hi all,

I need some advice on piping variable into a script.

Procmail v3.22


What I want to do is as follows: Any mail to a particular address run a 
script that grabs the subject as the first input to the script and the 
body as the second input to the script.

I'm new to procmail, and have seen multiple ways of doing this:

SUBJECT=`formail -x Subect:`
 
for the subject seems to work, but writes the subject to a file!

what I've got so far is:

SHELL=/bin/bash
FORMAIL=/usr/bin/formail
PATH=/bin:/sbin:/usr/bin:/usr/sbin
LOGFILE=/home/scott/procmail/Proctest.log
GETTEXT="[  ]*\/[^  ].*"
:0bcw
* ^To:.*sms
| run my script




I can't seem to get the subject to pipe into my script.

Any pointers are much appreciated.

Scott van Kalken
Unix Administrator
IT Support Centre
The Muir Electrical Company Pty Ltd
ABN 88 004 453 945    ACN 004 453 945
Phone   : (03) 9933 5759
Fax     : (03) 9933 5777
Email   : scottvankalken(_at_)thegoodguys(_dot_)com(_dot_)au
Web:    : www.thegoodguys.com.au



_______________________________________________
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>
  • need advice on setting and using variables, scottvankalken <=