Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In the typical email setup when an end user views the date of an email, is that supplied by the sending server or the receiving server?

Every once in a while I'll get complaints that the date on an email originating from our servers is wrong (usually something like 1900, or 1969 indicating that it's just displaying a default date). All the dates on our system are correct and it definitely does not happen all the time. I've always just assumed the problem is with the receiving end.

Can anyone shed some light on what would cause this to happen?

share|improve this question

3 Answers 3

up vote 7 down vote accepted

In a typical email setup the Date: header is set by the mail client sending the message: It's the date on the machine where the email was composed. A Date header may be added by a server along the way if it's missing (and I suppose it's possible that server presumes the epoch for email with no date).

The Received: headers are always added by each server the mail passes through -- Verify the dates on those to demonstrate that your servers have the correct date/time.

share|improve this answer
    
So why in a message addressed to two outside recipients would it happen for one and not the other? –  matthew Jan 31 '11 at 17:34
    
@matthew that depends on the mail client (and servers) handling the message (Some might grab the first "Received:" date and call it that, others may just assume the epoch, and it's possible some just assign the date they first saw the message). Short answer, as with all email questions, is "Email Sucks." :-) –  voretaq7 Jan 31 '11 at 17:53

I think @vorateq7 has nailed the answer, but on a related note, I wrote up exactly why the date shows up as 1969 if there is no date header. Short answer: The default is January 1, 1970, but since that's UTC, those of use behind UTC end up back in 1969.

share|improve this answer

Technically, it is the responsibility of the originating mail client which is sending the message to ensure that a proper Date: header is created. If some messages from your mail server include the header and others don't, it is because they are being originated by different clients and one is leaving out the Date: header.

Example: You have a contact form on a web site which uses PHP to originate a message by connecting to your MTA through SMTP. If it doesn't include the Date: header, your MTA probably doesn't add it (For example, qmail doesn't fix broken headers it is relaying because it encourages the practice of sending broken messages and introduces potential security holes for spammers.).

Check the originating sources of your messages which which ones are leaving the Date: header off. Apparently, many Microsoft mail apps have also been known to do this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.