From 9f511fecac8be1354732eb58b5b18892e8580fb6 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 25 May 2017 19:57:53 -0400 Subject: [PATCH] Make it Megaphone-friendly --- redirect.php | 182 +-------------------------------------------------- 1 file changed, 3 insertions(+), 179 deletions(-) mode change 100644 => 100755 redirect.php diff --git a/redirect.php b/redirect.php old mode 100644 new mode 100755 index cc43641..9b48f8f --- a/redirect.php +++ b/redirect.php @@ -13,8 +13,8 @@ if($debugMode) { // initialize. $deliveredTo = $from = $project = $email = $subject = NULL; $params = array( - 'url' => 'https://hq.palantetech.coop', - 'key' => 'ddGq1iMK1aGMluHVxQu2', + 'url' => 'https://hq.megaphonetech.com', + 'key' => '4kaq0ZLsWDndWEKN8O3D', 'unknown-user' => 'create', 'allow-override' => 'tracker,priority,category,status,project,assigned_to,start_date,due_date,estimated_hours,done_ratio', 'project' => 'catch', @@ -152,7 +152,7 @@ function SendToMailHandler($input, $params) { $log = "Redmine redirect error: $errorMessage"; syslog(LOG_ERR, $log); - $to = "team@lists.palantetech.coop"; + $to = "info@megaphonetech.com"; $subject = "Redmine email routing failure"; $message = $log . "\n\n"; $message .= $input; @@ -174,26 +174,7 @@ function ParseSenderEmail($from) { case "ezra.berkley.nepon@gmail.com ": $project = "astraea"; break; - case "larryg601@gmail.com": - $project = "nwu"; - break; - case "director.npap@nlg.org": - $project = "npap"; - break; - case "jgazis@legalmomentum.org": - $project = "lm"; - break; - case "stephenrshalom@gmail.com": - $project = "newpolitics-web"; - break; - case "ari.gardeningmatters@gmail.com": - case "mallory.gardeningmatters@gmail.com": - case "susan.gardeningmatters@gmail.com": - case "heimsteadlenief@gmail.com": - $project = "gm-civi"; - break; //the following emails will not go into Redmine, and will cause an NDR to go to the sender. - case "postmaster@urbanjustice.org": case "billing@linode.com": echo "dying"; die; @@ -210,165 +191,8 @@ function ParseSenderDomain($email) { case "legalmomentum.org": $project = "lm-tech"; break; - case "nlg.org": - $project = "nlg"; - break; - case "furee.org": - $project = "furee"; - break; - case "opencenter.org": - $project = "opencenter-tech"; - break; - case "vocal-ny.org": - $project = "vocal"; - break; - case "rffny.org": - $project = "rff"; - break; - case "domesticworkersunited.org": - $project = "dwu-tech"; - break; - case "thirdwavefoundation.org": - $project = "twf-tech"; - break; - case "picturethehomeless.org": - $project = "pth"; - break; - case "changethenypd.org": - $project = "cpr"; - break; - case "neweconomynyc.org": - $project = "nedap-tech"; - break; - case "cpehn.org": - $project = "cpehn-civi"; - break; - case "streetwiseandsafe.org": - $project = "sas-tech"; - break; - case "nwu.org": - $project = "nwu-civi"; - break; - case "tandn.org": - $project = "tan"; - break; - case "foodlabdetroit.com": - $project = "foodlab"; - break; - case "urbanjustice.org": - $project = "ujc"; - break; - case "healthcare-now.org": - $project = "hcn-civi"; - break; - case "global-action.org": - $project = "gap"; - break; - case "aclusandiego.org": - $project = "aclusdic-civi"; - break; - case "madre.org": - $project = "madre-tech"; - break; - case "goles.org": - $project = "goles-tech"; - break; - case "srlp.org": - $project = "srlp"; - break; - case "ppnorcal.org": - $project = "ppsp"; - break; - case "caeny.org": - $project = "cae-tech"; - break; - case "ccrjustice.org": - $project = "ccr-civi"; - break; - case "rainforestfund.org": - $project = "rfu-tech"; - break; - case "nlgsf.org": - $project = "nlgsf-civi"; - break; - case "warresisters.org": - $project = "wrl"; - break; - case "gender.town": - $project = "msp"; - break; - case "gsanetwork.org": - $project = "gsa"; - break; - case "culturestrike.org": - $project = "cs-dmp"; - break; - case "lawyerscommittee.org": - $project = "lccr-civi"; - break; - case "ppnyc.org": - $project = "ppnyc"; - break; - case "lavabrooklyn.org": - $project = "lava-civi"; - break; - case "soex.org": - $project = "soex"; - break; - case "woolman.org": - $project = "woolman"; - break; - case "bikesnotbombs.org": - $project = "bnb"; - break; - case "labornotes.org": - $project = "labor-notes"; - break; - case "cbadley.com": - $project = "sm"; - break; - case "lamama.org": - $project = "lamama-tech"; - break; - case "populardemocracy.org": - $project = "cpd"; - break; - case "searac.org": - $project = "searac-d6"; - break; - case "pprm.org": - $project = "pprm-adap"; - break; - case "africans.us": - $project = "act"; - break; - case "campaignlegalcenter.org": - $project = "clc"; - break; - case "advancingjustice-aajc.org": - $project = "aajc-drupal-support"; - break; - case "bikeeastbay.org": - $project = "beb-dcvmp"; - break; - case "movetoamend.org": - $project = "mta-drupal"; - break; - case "raceforward.org": - $project = "race-forward-drupal-support"; - break; - case "gardeningmatters.org": - $project = "gm-civi"; - break; - case "eastbaymeditation.org": - $project = "ebmc-cvwmp"; - break; - case "aorta.coop": - $project = "aorta-tech"; - break; //put spam domain entries here case "allverbia.xyz": - case "tandn.org": echo "dying"; die; }