trico Posted March 27, 2012 Posted March 27, 2012 I have a php script written to receive and process emails sent to a certain address. For right now it's just a test script I copied from someone else that just grabs the message from the email and resends it to one of my gmail addresses. This is a script that person tested and used himself so it works, I only edited the email address it forwards to. I have the script saved to /home/trico/scripts/emailtest.php and I set up the email forwarder in cPanel to forward emails sent to emailtest@trico.heliohost.org to |/home/trico/scripts/emailtest.php. I tested it by sending an email to emailtest@trico.heliohost.org through Outlook, and I immediately got the following "Message delivery failed" response: This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/home/trico/scripts/emailtest.php generated by emailtest@trico.heliohost.org local delivery failed ------ This is a copy of the message, including all the headers. ------ Return-path: <admin@tricocopier.comcastbiz.net>Received: from qmta01.westchester.pa.hmc1.comcast.net ([76.96.53.8]) by johnny.heliohost.org with esmtp (Exim 4.69) (envelope-from <admin@tricocopier.comcastbiz.net>) id 1SCcLl-00064s-Nl for emailtest@trico.heliohost.org; Tue, 27 Mar 2012 12:46:37 -0700Received: from omta02.westchester.pa.hmc1.comcast.net ([76.96.53.7]) by qmta01.westchester.pa.hmc1.comcast.net with comcast id qcM01i00L09Ku2s01jmbbG; Tue, 27 Mar 2012 19:46:35 +0000Received: from hmc1.comcast.net ([76.96.48.62]) by omta02.westchester.pa.hmc1.comcast.net with bizsmtp id qjmE1i0031LWMcC01jmEFw; Tue, 27 Mar 2012 19:46:14 +0000Received: from P1EC2EVS01.HMC1.COMCAST.NET ([76.96.48.26]) by P1HUB04.HMC1.COMCAST.NET ([76.96.48.62]) with mapi; Tue, 27 Mar 2012 15:46:35 -0400From: Jason Vance <admin@tricocopier.comcastbiz.net>To: "emailtest@trico.heliohost.org" <emailtest@trico.heliohost.org>Date: Tue, 27 Mar 2012 15:46:34 -0400Subject: Test subject 3Thread-Topic: Test subject 3Thread-Index: Ac0MUlC9Is+OPaAbTV2xWGUQqaaioQ==Message-ID: <3EFF71210ED88F4BA91ECB526A686183018DC690ACE0@P1EC2EVS01.HMC1.COMCAST.NET>Accept-Language: en-USContent-Language: en-USX-MS-Has-Attach:X-MS-TNEF-Correlator:acceptlanguage: en-USContent-Type: multipart/alternative; boundary="_000_3EFF71210ED88F4BA91ECB526A686183018DC690ACE0P1EC2EVS01H_"MIME-Version: 1.0 --_000_3EFF71210ED88F4BA91ECB526A686183018DC690ACE0P1EC2EVS01H_Content-Type: text/plain; charset="us-ascii"Content-Transfer-Encoding: quoted-printable Body of message test 3 --_000_3EFF71210ED88F4BA91ECB526A686183018DC690ACE0P1EC2EVS01H_Content-Type: text/html; charset="us-ascii"Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV=3D"Content-Type" CONTENT= =3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros= oft Word 12 (filtered medium)"><style><!--/* Font Definitions */@font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;}/* Style Definitions */p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";}a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;}span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri","sans-serif"; color:windowtext;}.MsoChpDefault {mso-style-type:export-only;}@page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;}div.WordSection1 {page:WordSection1;}--></style><!--[if gte mso 9]><xml><o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli= nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Body of message = test 3<o:p></o:p></p></div></body></html>= --_000_3EFF71210ED88F4BA91ECB526A686183018DC690ACE0P1EC2EVS01H_-- I did not receive the email that my script was supposed to forward to my gmail account either, so the script must not have received the email and fire off (since I got this delivery failure notice I'm assuming it's a problem with the email being delivered to the script and not a problem with what my script is doing). The hashbang at the top of my script is #!/usr/bin/php so am I using the right hashbang? Would that even be the problem? I could also post my script if necessary but it just seemed to me like it's a problem with the email being routed correctly. Thanks for any assistance given.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now