php problem

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

php problem

Post by westdam » 2007-05-01 11:51

hi guys
i've got a windows server with php . I've set up several webmail but unfortunately i've got some email with date prior to 1/1/1970 so windows and php return an error.

it's possible to fix this?
also thunderbird2 show me that date. the header also doesnt show this date.. i think it's a malformed header..

any helps?

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2007-05-01 12:01

so windows and php return an error
What error does Windows and PHP give you?
also thunderbird2 show me that date. the header also doesnt show this date
Does Thunderbird show you the correct date?
Is there a Date header in the email?

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Post by westdam » 2007-05-01 12:12

here the PHP error on roundcube ( and ilohamail too )
PHP Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970 in E:\Inetpub\wwwroot\westdam.com\roundcube\program\include\main.inc on line 1717


also thunderbird2 doesnt show me the correct date. The header show another date ( the correct one i thought.. ) but on the preview pane i've got 1/1/1970 date .

here the header

Return-Path: <Dezapcos@kinghumble.com>
Received: from m105.windtieup.com ([74.8.110.105]) by westdam.dyndns.org with
hMailServer ; Mon, 9 Apr 2007 22:35:38 +0200
DomainKey-Signature: s=key; d=kinghumble.com; c=nofws; q=dns;
b=BXdicB8C3e3iBjErQil7gcRFHyx9g+VDf8goNTh/0J7vRKVL4n2JoTHMnVHnsbP2vca01t2/UK23P8anP2WywDw3uVQf5bOWxtr/Y9g0jV3aqmO6qxCPCbLWKeDanfIi;
To: "nexus" <nexus@westdam.com>
From: "fourinkjets " <Dezapcos@kinghumble.com>
Reply-to: "fourinkjets " <c347699e-8c97-412e-8202-309839402a2d@kinghumble.com>
Subject: **SPAM** Coupons up to 15% Off Ink & Toner Inside
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Ironport 10
Message-ID: <832426c347699e-8c97-412e-8202-309839402a2d@kinghumble.com>
ENVID: 832426832426832426
X-hMailServer-Spam: YES
X-hMailServer-Reason: Rejected by SURBL

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Post by westdam » 2007-05-01 12:17

i've received this mail with 4.3 253 ( latest i think ) and fetched by 4.4.beta 268

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2007-05-01 12:37

Well there's no Date header in it.. Only workaround is to re-configure PHP so that errors are logged to file, and then ignore it.. (at least as far as I know)

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Post by westdam » 2007-05-01 12:42

ok, this trick is getting bigger everyday.. so it's possible to ADD a date header if missing automatically by hmailserver ? or a condition rules " if Date header " so i can delete mail via rules ?

my php it's STILL configured to log to file and ignore but it still show me.. damned spammer they're make me crazy!!!

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2007-05-01 12:58

or a condition rules " if Date header " so i can delete mail via rules ?
You might be able to set up a rule which checks if the Date header equals an empty string and if so deletes it. Never tried it myself though. An alternative is perhaps to check if the Date header doesn't contain 2007 and if so delete it.
my php it's STILL configured to log to file and ignore but it still show me
Then you're probably not editing the correct php.ini. Or you haven't edited the right settings. :)

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Post by westdam » 2007-05-01 13:06

mmm ok martin i'll try..
for the rules do u mean i have to do with script.. not with the "rules" on the hmailserver administration isn't it?

^DooM^
Site Admin
Posts: 13861
Joined: 2005-07-29 16:18
Location: UK

Post by ^DooM^ » 2007-05-01 13:07

I have been getting quite a few miss dated emails through lately and I agree its extremely annoying. I may play around with this rule myself and see if I can get it working.

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Post by westdam » 2007-05-01 13:09

mmm ok, doom, thanks for the help.
damn i'm in italy and most of them are "re routed" by italian server..

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Post by westdam » 2007-05-01 13:11

mmm martin it's not so easy.. becouse the "date" header most of the time is missing so i need to add or substitute..

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2007-05-01 14:16

When you save a message using a script, a Date header is added if it doesn't already exist. So it should be enough for you to use a script doing the following:

Code: Select all

Sub OnDeliverMessage(oMessage) 
   If oMessage.Date = "" Then
      ' Resave message to ensure that Date header exist.
      oMessage.Save
   End If
End Sub

westdam
Senior user
Senior user
Posts: 728
Joined: 2006-08-01 21:24
Location: Padova, Italy
Contact:

Post by westdam » 2007-05-01 17:06

ok martin..il'll test asap!! thanks

Post Reply