Reputation: 22577
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?
Upvotes: 0
Views: 750
Reputation: 30394
You should have Exim do this, not PHP. Mail servers are all about forwarding email. There should be a way to add multiple addresses in your .forward file. If you can't figure out how, https://serverfault.com/ is the place to ask.
Upvotes: 1