This is a discussion on Malformed Email Date Header within the PHP General forums, part of the PHP Programming Forums category; Hi All, Just a query I have which by the looks of my research into it online, still exists on ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi All,
Just a query I have which by the looks of my research into it online, still exists on various installations around the world. The websites I build for my clients are scattered over several hosting servers, and I've noticed that one of them has an issue with the usage of the mail() function. The sever is running PHP Version 4.4.2 under Windows NT Server 5.2 build 3790. Whenever I use mail() to send an email out via a website, it goes out not a problem, but in the email program, the date received is around 10 hours ahead. This causes my clients much grief, especially those who have shopping carts and large numbers of emails and have the incoming emails listed all out of order because of the future date stamp. After digging into this somewhat, I had a friend of mine on a freebsd box got me to email him from one of the scripts, and his *nix mail filtering software hiccuped on the incoming message complaining that.... X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char B8 hex): Date: Wed, 04 Jul 2007 10:11:39 \2701000\n Now, he sent me the headers of the email that he received, and the "Date: " line in the headers was showing up as the following Date: Wed, 04 Jul 2007 10:11:39 ?1000 With a ? before the 1000, which, but looking at all the other entries for the date in the headers, they all appear with the correct +1000 in place. Has anyone come across this or know of a reason why this is happening on this particular server. I have other hosting accounts on other windows and linux PHP boxes which do not have this issue. Just one this one server. Regards Chris Aitken The Web Hub Designer and Programmer Phone : 02 4648 0808 Mobile : 0411 132 075 ------------------------------------------------- Making The Web Work........ The Web Hub <http://www.thewebhub.com.au/> http://www.thewebhub.com.au/ <mailto:chris@thewebhub.com.au> chris@thewebhub.com.au ------------------------------------------------- Confidentiality Statement: This message is intended only for the use of the Addressee and may contain information that is PRIVILEDGED and CONFIDENTIAL. If you are not the intended recipient, dissemination of this communication is prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. |
|
|||
|
Most likely it's the server's time/date problem. Did you check to make sure
that the time/date is in the correct timezone, etc? I know this isn't really the right way to do it, but you could always just move the server's clock back 10 hours if it's really always 10 hours ahead of time. You alternatively could also always use a different way of sending your mail for that server. If you used PHPMailer http://phpmailer.sourceforge.net/ this allows you to connect to SMTP on a different machine to send email from an account. This one is really tougher than I origionally thought. - Dan ""Chris Aitken"" <chris@thewebhub.com.au> wrote in message news:200707260422.l6Q4McIr003499@mail10.tpgi.com.a u... > Hi All, > > > > Just a query I have which by the looks of my research into it online, > still > exists on various installations around the world. > > > > The websites I build for my clients are scattered over several hosting > servers, and I've noticed that one of them has an issue with the usage of > the mail() function. > > > > The sever is running PHP Version 4.4.2 under Windows NT Server 5.2 build > 3790. > > > > Whenever I use mail() to send an email out via a website, it goes out not > a > problem, but in the email program, the date received is around 10 hours > ahead. This causes my clients much grief, especially those who have > shopping > carts and large numbers of emails and have the incoming emails listed all > out of order because of the future date stamp. > > > > After digging into this somewhat, I had a friend of mine on a freebsd box > got me to email him from one of the scripts, and his *nix mail filtering > software hiccuped on the incoming message complaining that.... > > > > X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char B8 hex): Date: > Wed, > 04 > > Jul 2007 10:11:39 \2701000\n > > > > Now, he sent me the headers of the email that he received, and the "Date: > " > line in the headers was showing up as the following > > > > Date: Wed, 04 Jul 2007 10:11:39 ?1000 > > > > With a ? before the 1000, which, but looking at all the other entries for > the date in the headers, they all appear with the correct +1000 in place. > > > > Has anyone come across this or know of a reason why this is happening on > this particular server. I have other hosting accounts on other windows and > linux PHP boxes which do not have this issue. Just one this one server. > > > > > > > > Regards > > > > > Chris Aitken > The Web Hub Designer and Programmer > Phone : 02 4648 0808 > Mobile : 0411 132 075 > > > > ------------------------------------------------- > > > > Making The Web Work........ The Web Hub > <http://www.thewebhub.com.au/> http://www.thewebhub.com.au/ > <mailto:chris@thewebhub.com.au> chris@thewebhub.com.au > > > > ------------------------------------------------- > > > > Confidentiality Statement: > This message is intended only for the use of the Addressee and may contain > information that is PRIVILEDGED and CONFIDENTIAL. If you are not the > intended recipient, dissemination of this communication is prohibited. > If you have received this communication in error, please erase all > copies of the message and its attachments and notify us immediately. > > > > |
|
|||
|
> Most likely it's the server's time/date problem. Did you check to make > sure that the time/date is in the correct timezone, etc? I know this > isn't really the right way to do it, but you could always just move the > server's clock back 10 hours if it's really always 10 hours ahead of time. > You alternatively could also always use a different way of sending your > mail for that server. If you used PHPMailer > http://phpmailer.sourceforge.net/ this allows you to connect to SMTP on a > different machine to send email from an account. This one is really > tougher than I origionally thought. The time on the machine is correct, and out of all of the date stamps in the headers of the email are formed correctly based on the machines time/date, (ie, everywhere else in the headers it adds the +1000 correctly) except in the 1 main line > Date: Day 00th Jan 2999 01:02:03 ?1000 Email programs (Wintendo based, and *nix based alike) generally have a hard time with this Date header. Outlook and Outlook express just try and interpret and guess what its supposed to mean (seemingly adding an extra 10 hours to the correct timestamp) and the *nix mail filter I came across reported it as being a bad header. Regards Chris Aitken The Web Hub Designer and Programmer Phone : 02 4648 0808 Mobile : 0411 132 075 ------------------------------------------------- Making The Web Work........ The Web Hub http://www.thewebhub.com.au/ chris@thewebhub.com.au ------------------------------------------------- Confidentiality Statement: This message is intended only for the use of the Addressee and may contain information that is PRIVILEDGED and CONFIDENTIAL. If you are not the intended recipient, dissemination of this communication is prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. |
|
|||
|
Looks to me like the \270 is some kinda Unicode character instead of,
like, you know ASCII '+'... Dunno how you managed to convince your mail system that you wanted it to convert + to Unicode \270, mind you, but there it is. On Wed, July 25, 2007 11:22 pm, Chris Aitken wrote: > Hi All, > > > > Just a query I have which by the looks of my research into it online, > still > exists on various installations around the world. > > > > The websites I build for my clients are scattered over several hosting > servers, and I've noticed that one of them has an issue with the usage > of > the mail() function. > > > > The sever is running PHP Version 4.4.2 under Windows NT Server 5.2 > build > 3790. > > > > Whenever I use mail() to send an email out via a website, it goes out > not a > problem, but in the email program, the date received is around 10 > hours > ahead. This causes my clients much grief, especially those who have > shopping > carts and large numbers of emails and have the incoming emails listed > all > out of order because of the future date stamp. > > > > After digging into this somewhat, I had a friend of mine on a freebsd > box > got me to email him from one of the scripts, and his *nix mail > filtering > software hiccuped on the incoming message complaining that.... > > > > X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char B8 hex): Date: > Wed, > 04 > > Jul 2007 10:11:39 \2701000\n > > > > Now, he sent me the headers of the email that he received, and the > "Date: " > line in the headers was showing up as the following > > > > Date: Wed, 04 Jul 2007 10:11:39 ?1000 > > > > With a ? before the 1000, which, but looking at all the other entries > for > the date in the headers, they all appear with the correct +1000 in > place. > > > > Has anyone come across this or know of a reason why this is happening > on > this particular server. I have other hosting accounts on other windows > and > linux PHP boxes which do not have this issue. Just one this one > server. > > > > > > > > Regards > > > > > Chris Aitken > The Web Hub Designer and Programmer > Phone : 02 4648 0808 > Mobile : 0411 132 075 > > > > ------------------------------------------------- > > > > Making The Web Work........ The Web Hub > <http://www.thewebhub.com.au/> http://www.thewebhub.com.au/ > <mailto:chris@thewebhub.com.au> chris@thewebhub.com.au > > > > ------------------------------------------------- > > > > Confidentiality Statement: > This message is intended only for the use of the Addressee and may > contain > information that is PRIVILEDGED and CONFIDENTIAL. If you are not the > intended recipient, dissemination of this communication is prohibited. > If you have received this communication in error, please erase all > copies of the message and its attachments and notify us immediately. > > > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? |
|
|||
|
If the sysadmin told the BIOS that s/he was using UTC, but told the OS
that s/he was not using UTC (or vice versa) and then the clocks are being adjusted, and if it's in time zone -5, then you'd have the 10-hour offset right there, I think... Course, that has zilch to do with the \270 for '+' mind you, so the OP may be looking at 2 bugs at once and assuming they are related when they are not... On Thu, July 26, 2007 4:23 pm, Dan wrote: > Most likely it's the server's time/date problem. Did you check to > make sure > that the time/date is in the correct timezone, etc? I know this isn't > really the right way to do it, but you could always just move the > server's > clock back 10 hours if it's really always 10 hours ahead of time. You > alternatively could also always use a different way of sending your > mail for > that server. If you used PHPMailer http://phpmailer.sourceforge.net/ > this > allows you to connect to SMTP on a different machine to send email > from an > account. This one is really tougher than I origionally thought. > > - Dan > > ""Chris Aitken"" <chris@thewebhub.com.au> wrote in message > news:200707260422.l6Q4McIr003499@mail10.tpgi.com.a u... >> Hi All, >> >> >> >> Just a query I have which by the looks of my research into it >> online, >> still >> exists on various installations around the world. >> >> >> >> The websites I build for my clients are scattered over several >> hosting >> servers, and I've noticed that one of them has an issue with the >> usage of >> the mail() function. >> >> >> >> The sever is running PHP Version 4.4.2 under Windows NT Server 5.2 >> build >> 3790. >> >> >> >> Whenever I use mail() to send an email out via a website, it goes >> out not >> a >> problem, but in the email program, the date received is around 10 >> hours >> ahead. This causes my clients much grief, especially those who have >> shopping >> carts and large numbers of emails and have the incoming emails >> listed all >> out of order because of the future date stamp. >> >> >> >> After digging into this somewhat, I had a friend of mine on a >> freebsd box >> got me to email him from one of the scripts, and his *nix mail >> filtering >> software hiccuped on the incoming message complaining that.... >> >> >> >> X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char B8 hex): >> Date: >> Wed, >> 04 >> >> Jul 2007 10:11:39 \2701000\n >> >> >> >> Now, he sent me the headers of the email that he received, and the >> "Date: >> " >> line in the headers was showing up as the following >> >> >> >> Date: Wed, 04 Jul 2007 10:11:39 ?1000 >> >> >> >> With a ? before the 1000, which, but looking at all the other >> entries for >> the date in the headers, they all appear with the correct +1000 in >> place. >> >> >> >> Has anyone come across this or know of a reason why this is >> happening on >> this particular server. I have other hosting accounts on other >> windows and >> linux PHP boxes which do not have this issue. Just one this one >> server. >> >> >> >> >> >> >> >> Regards >> >> >> >> >> Chris Aitken >> The Web Hub Designer and Programmer >> Phone : 02 4648 0808 >> Mobile : 0411 132 075 >> >> >> >> ------------------------------------------------- >> >> >> >> Making The Web Work........ The Web Hub >> <http://www.thewebhub.com.au/> http://www.thewebhub.com.au/ >> <mailto:chris@thewebhub.com.au> chris@thewebhub.com.au >> >> >> >> ------------------------------------------------- >> >> >> >> Confidentiality Statement: >> This message is intended only for the use of the Addressee and may >> contain >> information that is PRIVILEDGED and CONFIDENTIAL. If you are not >> the >> intended recipient, dissemination of this communication is >> prohibited. >> If you have received this communication in error, please erase all >> copies of the message and its attachments and notify us immediately. >> >> >> >> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? |
|
|||
|
> X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char B8 hex): Date: Wed, > 04 > > Jul 2007 10:11:39 \2701000\n Looks like a problem when you're building the headers. Are you doing this manually (building the headers)? What's the code look like to do this? -- Postgresql & php tutorials http://www.designmagick.com/ |
|
|||
|
> Looks to me like the \270 is some kinda Unicode character instead of,
> like, you know ASCII '+'... > > Dunno how you managed to convince your mail system that you wanted it > to convert + to Unicode \270, mind you, but there it is. > Hi Richard, Odd thing is.... all of the other headers of the email (see below for a snippet of the headers) show the date stamp with the correct + and the actual Date: header shows a ? instead of a + I assumed that the 270 is a corrupted character that was substituted with a ? because it didn't know what else to put there. This error is spread throughout my google searches as some people have had it happen from versions as old as mid 3 version of PHP through to later versions of 4. My only guess is that it seems to be some sort of inbuilt glitch within PHP that reacts with some common denominator (version of IIS, version of operating syetem etc) but noones been able to discover a reason. ------------------------------------------ Received: from storm by lightstorm.com.au (MDaemon PRO v9.5.6) with ESMTP id md50002484423.msg for <peter@magus.net.au>; Wed, 04 Jul 2007 10:11:41 +1000 Date: Wed, 04 Jul 2007 10:11:39 ?1000 ------------------------------------------ Note the above how it puts the correct +1000 on the internal header, but the one that becomes more of an external (or visible) header, has the ?1000 Regards Chris Aitken The Web Hub Designer and Programmer Phone : 02 4648 0808 Mobile : 0411 132 075 ------------------------------------------------- Making The Web Work........ The Web Hub http://www.thewebhub.com.au/ chris@thewebhub.com.au ------------------------------------------------- Confidentiality Statement: This message is intended only for the use of the Addressee and may contain information that is PRIVILEDGED and CONFIDENTIAL. If you are not the intended recipient, dissemination of this communication is prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately. |