I am currently using Postfix to pipe incoming email form our support email address to our WHMCS install to the support department. This has been working great for sometime. Problem is now we have a live chat widget, and when someone sends an offline message it goes to the sales email but it's from Zopim:
From: Zopim «firstname.lastname@example.org»
What I would like to do is filter in Postfix that if an incoming email to the sales address is from that email to send it to another script instead of WHMCS, a PHP script we have written to scrape the email and change sender to the actual sender that Zopim received from on the live chat widget:
From: Visitor xxxxxxx <email@example.com> URL: http://www.domain.com/ Lorim Ipsum ---- Zopim http://www.zopim.com
We are currently doing the piping in the Aliases file
support: "| /usr/bin/php -q /var/www/pipe/pipe.php" abuse: "| /usr/bin/php -q /var/www/pipe/pipe.php" sales: "|/usr/bin/php -q /var/www/pipe/pipe.php"