I have a cPanel web hosting account. On this account I have a PHP-based support/trouble ticket system for my customers to use. I'd like to be able to send an email to both my customer and to the ticket system, but have the email that goes to the ticketing system appear to come from my customer, so that the support ticket which gets created appears under their account.
So what I want to do is create some email address
firstname.lastname@example.org which gets piped to a unix command or shell script. This means that when I send an email from
email@example.com and CC
firstname.lastname@example.org, the shell script should be able to resend the email to
email@example.com but resend the email from the To: address of the email.
Is there any way to make a shell script which will accept an email on stdin, rewrite the From: address, and resend the mail to a new address? Can Procmail do anything like that? Or will I have to hand code this myself?