Our organization needs a script, which performs these features:
1. Incoming mail gets piped to the script
2. Script finds out what the recipient of the mail is
3. The script fowards the mail by keeping most headers and the look of the E-Mail intact
Our 600 members are stored in a database. This database has a field with their own private address (e.g. hotmail) and their «corporate» address (i.e. [url removed, login to view]).
The server is sending all e-mail irrespectively of the recipient to the piping script.
The script has to parse the mail and find out the corporate address to which the e-mail has to be sent and then forward it to the private address.
[url removed, login to view] => Server piping => Script => hotmail
The script must be able to handle attachments, plain and formatted content and especially multiple recipients in one e-mail. (Such as: To: user.a, user.b) It must also handle Cc: recipients.
E-Mails sent to non existing users must be returned with a response.
Due to our not-for-profit, low budget operation mode, we are limiting our budget to around 100-150$. Similar solutions have been provided for 60$.