I have a feature in my app that handles and parses incoming emails.
The mails come in through the usual method with exim as a .forward file:
| /path/to/php /path/to/mail/handler.php
This sends RFC822 formatted text to my handler, which uses a parser to break it down and hand over to the rest of my app.
New feature needs to be added to forward any mails to [email protected] along to [email protected]
I'm trying to figure out a way to do this the most simple way. The long way is to take the parsed message, modify the To: address and send on as a new mail.
So my question is: What's the simple way to "forward" an RFC822 formatted message? Is there a way of telling exim to forward the mail instead?