procmail
[Top] [All Lists]

Help running a C program from procmail

1996-02-19 05:02:50
        Ok, here's the deal:

        I'm writing this program that accepts an order form via email.
I dump the ordering message in a folder called Order.  I wrote this C 
program that parses Order and creates a file, Out_Order that is the 
invoice of the selections.
        But, I can't figure out how to get procmail to run this program
after it puts the message in the order folder. This is what I have in
my rc.main file.

:0
* !^From +rbarbaga
* !^Subject:.*Re:
* !^FROM_DAEMON
* ^Subject:.*IVPR_order
Orders
| (formail -r ; ~/IVPR/OrderProcess ~/Mail/Orders; cat ~/IVPR/Out_Order) | 
$SENDMAIL -oi -t


        It's just a half-ass guess since I don't really know what formail
does or the format of the commands.  

        What happens is it puts the message in Order and sends the
default 'Message recieved.' email back to the sender.  It doesn't run
OrderProcess (~/Mail/Orders is the argument...it passes the folder in
as the file).  Out_Order is the file OrderProcess generates.  I want to
mail that back to the user after I run it.  
        So, how does this work?  Is it possible?  I need answers very
soon since I have to have this finished by Tuesday.  OrderProcess
works fine (I've tested it with dummy order forms), so this is the one 
missing link.


-- 
Ralph A. Barbagallo III --- rbarbaga(_at_)cs(_dot_)uml(_dot_)edu --- Only AMIGA 
makes it
***********"Your favorite game sucks."***************    Possible...  *
R.I.P. Jay Miner: June 20th 1994  Father of the 2600, Atari 8bit, Amiga
*Home of the TRON and Starcade shrines*http://www.cs.uml.edu/~rbarbaga*

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