Hi, everyone. Hope someone can help with that one. I've been trying to solve it on my own, but it's becoming a little urgent.
I've been using a couple of scripts to parse all my mail. They capture all mail from php://stdin, parse it, process it, take a few decisions and forward it to another couple of mail accounts accordingly, based on what they find inside each message. The messages are never changed in any way. I just open a process with qmail and write the whole message back into it. Everything works fine. But I've noticed that if I ever try to change anything, like replacing keywords, qmail doesn't like what I feed it and sends me a kind of messed up message.
Now, my problem is: I use dial-up. Sometimes a client will send me a huge file, and I don't want it to go straight to my final destination mailbox. I want the PHP scripts to separate the attachments from the messages, saving them somewhere I can download them from, either with my browser or through FTP, that doesn't matter. Then forward just the message to the final destination mailbox, without the attachment. My problems is that although I can see the contents of a message and take decisions based on it, I have no idea of how I could go about modifying its contents, much less removing attachments. Can anybody give a suggestion of how I can achieve what I want?
Thank you very much,
Luciano ES
Santos, SP - Brasil