Thanks Glen Elkins for the script below. Hope this will be of use to others aswell. (Still needs a little fine-tuning with HTML messages) [quote] <? // Set some vars $ChangeTo = "changeto@domain.com"; $ForwardTo = "forwardto@domain.com"; // Read the pipe $open_file = fopen("php://stdin","r"); $email = ""; while (!feof($open_file)) { $email .= fread($open_file,1024); } fclose ($open_file); // Take info from emai; $lines = explode("\n",$email); $from = ""; $subject = ""; $message = ""; $to = $ChangeTo; $splittingheaders = true; for ($i=0;$i<count($lines);$i++) { if ($splittingheaders) { if (preg_match("/^From: (.*)/",$lines[$i],$matches)) { if (strpos($lines[$i],"<")) { // The name is before the email $data = explode ("<",$lines[$i]); $from = substr(trim($data[1]),0,-1); } else { $from = $matches[1]; } } if (preg_match("/^Subject: (.*)/",$lines[$i],$matches)) { $subject = $matches[1]; } } else { $message .= $lines[$i]."\n"; } if (trim($lines[$i]=="")) { $splittingheaders = false; } } $message = <<< EOF $message EOF; $headers = "Content-type: text/html\n"; $headers .= "From: $from\n"; $headers .= "Return-Path: $from\n"; //$headers .= "To: $to\n"; mail ($ForwardTo,$subject,$message,$headers); ?> [/quote]