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?
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. ADate
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.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.
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 theDate:
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.