From 5d31b1aa1b34b527f1e80851028486ac6e08d38a Mon Sep 17 00:00:00 2001 From: root Date: Fri, 26 May 2017 13:54:59 -0400 Subject: [PATCH] First crack at incoming project parsing --- redirect.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redirect.php b/redirect.php index 9b48f8f..b1f64a5 100755 --- a/redirect.php +++ b/redirect.php @@ -34,7 +34,7 @@ while (!feof($fd)) { //if this line is the "delivered-to", extract the subaddress, if there is one. if(preg_match("/^delivered-to: (.*)/i", $line, $matches)) { $deliveredTo = $matches[1]; - if(preg_match("/tickets\+(\S*)@/i", $deliveredTo, $matches)) { + if(preg_match("/support\+(\S*)@/i", $deliveredTo, $matches)) { $project = $matches[1]; } } @@ -46,7 +46,7 @@ while (!feof($fd)) { //Alter the Subject if this is a test. $subjectAlterTo = substr($deliveredTo, 1, 12); - if(substr($deliveredTo, 1, 12) == 'tickets-test' && + if(substr($deliveredTo, 1, 12) == 'support-test' && preg_match("/^Subject:(.*)/i", $line)) { $line = $subject = str_replace('Subject: ', 'Subject: [TEST] ', $line); }