procmail
[Top] [All Lists]

procmailrc filter through program mechanism

2007-05-28 11:22:42
How does procmail "write" a mail into a program? I have written a C++ code
that takes mail and extracts the attachments from it. I want to pass the
mail file as argument into this program. Is the script going to be something
like:

:0fw
| /path/to/program/extract $MAILDIR/new/mail

where "mail" is the file where all the mail goes into. Basically, here's the
idea of what I want to do:

1. Receive email
2. Detach attachment (image)
3. Run the attachment through another C program, which modifies the image
and saves it in a specific folder.
4. Take the modified image and attach it to an email that goes back to the
sender.

So far, I have the receive email part, and I've been trying to use the:
formail -s
command to split the parts - (not working)
send the mail file directly into the program - (not working. I get this
error:

procmail: Executing "/path/to program/extract,$MAILDIR/tmp/mail"
procmail: Error while writing to "/path/to/program/extract"
procmail: Rescue of unfiltered data succeeded

Please help.. I've been struggling with this process for 3 weeks :(
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
<Prev in Thread] Current Thread [Next in Thread>