TB 91.10.0: "Received" column in message list showing wrong date
As the headline says:
I have got a bunch of spam messages which I am currently investigating for certain reasons. The spammers have set the "Date:" header far in the future (e.g. 2026-01-04), and the "Date" column in the message list as expected shows these weird dates.
However, the "Received" column in the message list as well shows the same weird dates although the topmost "Received:" header in every message is correct.
Here is an excerpt from the header section of one of those messages which shows the "Date:" header and all "Received:" headers (sorry that I couldn't find out how to format the following passage as code):
Date: Thu, 14 Jan 2026 03:38:55 -0800 Received: from deliver ([unix socket]) by morn (Cyrus 3.0.8-Debian-3.0.8-6+deb10u5) with LMTPA; Fri, 05 Mar 2021 12:17:37 +0100 Received: from pop.example.com [a.b.c.d] by morn.dep01.example.com with POP3 (fetchmail-6.4.0.beta4) for <user@localhost> (single-drop); Fri, 05 Mar 2021 12:17:37 +0100 (CET) Received: from server.spammer.com ([e.f.g.h]) by odysseus.example.com (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTP id 125BHDIJ001425 for <user@example.com>; Fri, 5 Mar 2021 12:17:13 +0100 Received: from imap-director-5.dovecot.xion.foo.bar (i.j.k.l) by imap-backend-28.dovecot.xion.foo.bar with LMTP id [an22] (envelope-from <bounces+XmuZjwsANPH/dOCq73______________3@mail.randomcharactershere.com>) for <to>; Thu, 14 Jan 2026 03:38:55 -0800
Please note that there are other headers between the ones shown above. I have removed these other headers. I did not change the order of the headers shown above.
Of course, I am aware that the last "Received:" header causes the problem. But this at once leads to the question how TB chooses the "Received:" header from which it extracts the date / time to display in the "Received" column.
As far as I know, SMTP servers and other software involved in the transportation of messages must put their own "Received:" header (if any) above all other "Received:" headers, so that we can reproduce how the message hopped through the net by reading all "Received:" headers from bottom to top. That is, the "Received:" header which reflects delivery to the IMAP server my MUA is connected to always must be topmost.
TB obviously does the opposite (consider the bottom-most "Received:" header the most recent one, i.e. the one whose date should be displayed in the "Received:" column), or it is trying to be overly smart (sort the "Received:" headers by their date, consider the "Received:" header with the "highest" date to reflect the last hop, and consequently display that "highest" date in the "Received:" column). Both would be wrong.
Could anybody please show me how to get around that situation? Is there an extension which does it right? Is it correct that (according to the SMTP RFCs) each software component must put its "Received:" header (if any) above all other "Received:" headers as the message flows through the net?
Thank you very much in advance!
P.S. As a bonus, could somebody please explain how to format something as code here?
JustAFrame দ্বারা পরিমিত
সমাধান চয়ন করুন
I've been trawling bugs for this regarding imap accounts and came up with something that may fix this problem.
Look at this:
So I checked to see what I had for the preference they mention.
- In Menu icon > Preferences > General
- Scroll to bottom and click on 'Config Editor' button to open in new tab
- In top search type: dbh
- it should show : mailnews.customDBHeaders
I notice that my mailnews.customDBHeaders has the following: Received x-tagtoolbar-keys x-send-later-at x-send-later-uuid x-send-later-recur x-send-later-args
This is a string where a space is used as the separator. I've obviously been creating some Message Filter settings in the past looking for a filter on 'Received' header and perhaps an addon made the others. It would appear that I had inadvertantly fixed my 'Received' column header without realising it.
- In your 'mailnews.customDBHeaders' - click on the pencil icon to edit
- Type: Received
- The pencil icon will change to a 'tick' icon - click on it to save
- Then restart Thunderbird to ensure those settings are being applied.
All Replies (14)
I altered the computer clock to force it to use a long time as it's short time. I did this so I could see seconds in the Dates as shown when you vie Message Source.
This is what I see.
The 'Date' column: Uses the 'Date' in header
The 'Received' column: uses the top Received date as this is date received on server.
This is under normal circumstances, but as you are aware people can set up computer clock to be whatever they want and so spammers can manipulate time in 'Date' column. It will also depend upon timezones being set correctly as well. However, once it gets to the servers, those times will be correct - taking into consideration the timezone difference.
Edited Example from normal email: Received: from f by g Tue, 07 Jun 2022 07:11:03 +0100; Received: from e by f Tue, 07 Jun 2022 07:11:03 +0100 Received: from d by e Tue, 7 Jun 2022 06:11:03 +0000 (UTC) Received: from c by dTue, 7 Jun 2022 07:11:02 +0100 (BST) Received: from b by c Tue, 7 Jun 2022 07:11:02 +0100 (BST) Received: from a by b Tue, 7 Jun 2022 07:11:01 +0100 (BST)
Date: Tue, 07 Jun 2022 02:48:58 +0200 Date will show when email was created, but not necessarilly when sent. Clearly person had not adjusted for BSM.
in Thunderbird column headers I see. Date column header says Tue, 07 Jun 2022 01:48:58 (note correctly adjusted for BSM ) Received column header says: Tue, 07 Jun 2022 07:11:03
Having done this I'll just go back and reset computer short date to be a true short date :)
Toad-Hall,
thank you very much for your reply. You are describing how TB should work, and I am grateful that you have confirmed that the last (most recent) "Received:" header must be topmost and that TB should use exactly this one to extract the date / time it shows in the "Received:" column.
However, as stated in my first post, TB in my case does not operate that way. Please have a look into the header lines I have posted. Thunderbird in my case uses the bottom-most "Received:" header to extract the date / time it shows in the "Received" column instead of the topmost one, which is wrong behavior.
I am quite confident that you can reproduce the bug the following way:
- In TB, save an arbitrary message you have received (TB save messages as .eml files). - Open the saved file with a text editor. - Identify the bottom-most "Received:" header; this is the one which reflects the first hop of the message. - Set the date of that "Received:" header to somewhere in the future, e.g. by adding 10 years. - Delete the mail message in TB (probably optional, but prevents problems with duplicate message IDs etc.). - Import the changed .eml file back to TB by dragging it from the file manager onto the folder where you want it to appear. - Note that the "Received" column now shows the wrong date / time for that message. That is, it shows the date / time of the bottom-most "Received:" header which you have manipulated in the text editor. But this is wrong because it should show the date / time of the topmost "Received:" header instead.
I hope that this time I managed to clarify the problem :-)
To be absolutely sure, I'll explain with reference to your example. You have posted the following "Received:" headers:
Received: from f by g Tue, 07 Jun 2022 07:11:03 +0100; Received: from e by f Tue, 07 Jun 2022 07:11:03 +0100 Received: from d by e Tue, 7 Jun 2022 06:11:03 +0000 (UTC) Received: from c by dTue, 7 Jun 2022 07:11:02 +0100 (BST) Received: from b by c Tue, 7 Jun 2022 07:11:02 +0100 (BST) Received: from a by b Tue, 7 Jun 2022 07:11:01 +0100 (BST)
Now please manipulate the message (most easily done by saving as .eml, editing the .eml and importing it back to TB as outlined above) so that the "Received:" headers become
Received: from f by g Tue, 07 Jun 2022 07:11:03 +0100; Received: from e by f Tue, 07 Jun 2022 07:11:03 +0100 Received: from d by e Tue, 7 Jun 2022 06:11:03 +0000 (UTC) Received: from c by dTue, 7 Jun 2022 07:11:02 +0100 (BST) Received: from b by c Tue, 7 Jun 2022 07:11:02 +0100 (BST) Received: from a by b Tue, 7 Jun 2026 07:11:01 +0100 (BST)
Note that only the bottom-most header which only reflects the first hop is changed (the year is changed from 2022 to 2030). But TB now shows "2026-06-07 ..." as date in the "Received" column. This is wrong because it should instead show the data from the topmost "Received:" header (which reflects the last hop of the message, i.e. the hop onto your IMAP server) there.
JustAFrame দ্বারা পরিমিত
TESTED: I updated Thunderbird to same version as you. 91.10.0
Selected same junk mail as previously so I could compare and exported as eml. Modified the 'Date' and the bottom 'Received' date by setting year 2042 Saved and imported back.
Result: Received: from f by g Tue, 07 Jun 2022 07:11:03 +0100; Received: from e by f Tue, 07 Jun 2022 07:11:03 +0100 Received: from d by e Tue, 7 Jun 2022 06:11:03 +0000 (UTC) Received: from c by dTue, 7 Jun 2022 07:11:02 +0100 (BST) Received: from b by c Tue, 7 Jun 2022 07:11:02 +0100 (BST) Received: from a by b Tue, 7 Jun 2042 07:11:01 +0100 (BST) Date: Tue, 07 Jun 2042 02:48:58 +0200
'Date' column header says Tue, 07 Jun 2042 01:48:58 (note correctly adjusted for BSM ) 'Received' column header says: Tue, 07 Jun 2022 07:11:03
So, it is still showing correct received date.
I'm using Thunderbird - windows 64bit on Windows 10 OS What OS are you using? Are you using the Thunderbird 64bit or 32bit ?
Storage: I'm using the default mbox. Are you using Maildir ?
Would you be prepared to send 'in the future spam' email to me ? If yes then please attach the email as EML document, so I can save and import and send to: mail at anje dot co dot uk Note email is written phonetically to avoid spam bots, so 'at' means '@'.
Then we can test identical document to see results.
Toad-Hall দ্বারা পরিমিত
Thank you very much for your interest in that subject!
I will send a sample message to you within the next minutes, and it will be very interesting to see how your installation behaves. I will not alter anything in the .eml file.
I am nearly in the same environment as you: TB 91.10.0 x64, Windows 10 Enterprise x64.
Thanks in advance!
OK received email and imported 'sample.eml' into my Local Folders Junk folder. Please see image below as it shows what I see. The Received and Date are correct as expected.
Click on image in forum to enlarge.
I'm testing this in a POP account and Local Folders.
Are you by any chance seeing email in an Imap account ?
Shame on me. I really should have mentioned that. Yes, that's an IMAP account (I don't use local folders since quite a time, because there are multiple PCs and I'd like to have all messages on each of them).
But I have found out something very interesting:
Motivated by your comment, I just the sample message into the Local Folders Trash by dragging-and-dropping it in the TB UI. The situation then was the same. The Received column in the message list of the Local Folders Trash showed year 2026 for that message.
Then I deleted the message and imported it into the Local Folders Trash via the system, as I have described in one of my previous posts. And BANG: The Received column suddenly showed the correct date.
That means that there definitely is a bug in Thunderbird. There is no reason to interpret headers differently, depending on the way the message got in the Local Folders.
I'll repeat that test with an IMAP account tomorrow and report back (I am running out of time right now).
Thank you very much!
Are you downloading full copies or just headers?
Account Settings > Synchronisation & Storage Message synchronising - click on 'Advanced' and check all folders are checked for full download. Is this selected 'Synchronise all messages locally regardless of age'
My imap is behaving and I use the above settings. Many emails seem to have same date/time for both columns, but that is correct in my case. I have a few that show different time/date but that is also correct.
Before posting here, I already had tried everything (in the IMAP account):
- I have repaired that folder. - I have right-clicked that folder, have chosen "Properties", have switched to "Synchronization", have ticked "Choose for offline reading" and have hit "Download now" (please note that my language is German, and this my own translation of the German UI, so the exact wording may differ). - I have right-clicked that folder, have chosen "Properties", have switched to "General", and have ticked "Index messages in this folder for global search". - I even have deleted the whole folder where the synchronized messages of the respective account were stored, have closed Thunderbird and have waited until it had downloaded (synchronized) all messages from scratch. - Then, to be sure, I have selected the respective account, have chosen File -> Offline -> Download now, then have ticked "Email messages", have hit "Choose", and have recursively ticked all folders it offered, the folder in question being among them. Then I closed the dialog via "OK" and waited until it had worked through all folders again; as expected, it seemed that it didn't download new messages because this already had happened as described in the previous paragraph. - I have subscribed to all folders (recursively) in the respective account, the folder in question being among them. - Additionally, I have un-ticked (deactivated) "Show only subscribed folders" in the advanced server settings of the respective account. - I always have enabled "Synchronize all messages in all folders on this computer" in the synchronization settings of the respective account. This is is my standard setting from the beginning on; I never used a different setting. - I always have enabled "Synchronize messages regardless of age". This is my standard setting, and I never have used a different setting. - Although I didn't expect anything from it, and although synchronization for all messages was enabled anyways as describe above, I additionally hit "Advanced" in the account's synchronization settings and recursively chose all folder there.
However, there was no point in time where TB was showing the correct date in the "Received" column. It is always showing 2026 there.
চয়ন করা সমাধান
I've been trawling bugs for this regarding imap accounts and came up with something that may fix this problem.
Look at this:
So I checked to see what I had for the preference they mention.
- In Menu icon > Preferences > General
- Scroll to bottom and click on 'Config Editor' button to open in new tab
- In top search type: dbh
- it should show : mailnews.customDBHeaders
I notice that my mailnews.customDBHeaders has the following: Received x-tagtoolbar-keys x-send-later-at x-send-later-uuid x-send-later-recur x-send-later-args
This is a string where a space is used as the separator. I've obviously been creating some Message Filter settings in the past looking for a filter on 'Received' header and perhaps an addon made the others. It would appear that I had inadvertantly fixed my 'Received' column header without realising it.
- In your 'mailnews.customDBHeaders' - click on the pencil icon to edit
- Type: Received
- The pencil icon will change to a 'tick' icon - click on it to save
- Then restart Thunderbird to ensure those settings are being applied.
Thank you very much - that solved it.
O.K., problem solved, answer accepted and upvoted, but questions left:
I already knew about that setting because I let our mail serves add some custom headers to incoming messages, and I want these headers to be available in TB. Therefore, I already had modified this setting some time ago, adding those headers.
However, I always thought that we need to add only custom or additional headers there, but not the TB "standard" headers. The "Received:" header is a standard header which is available without any extensions (addons), correct? If yes, the question is why TB doesn't handle it correctly without entering it in the setting you mentioned.
Thanks also for your hint that TB must be restarted afterwards. I was impatient, added the header to the setting, let repair the folder and began to curse. Then I read your post again, restarted TB, repaired the folder, and finally got the expected result.
Thanks again, best regards, and have a nice weekend!
JustAFrame দ্বারা পরিমিত
re :The "Received:" header is a standard header which is available without any extensions (addons), correct? If yes, the question is why TB doesn't handle it correctly without entering it in the setting you mentioned
I agree totally, you would have thought the developers would have it set up by default as this is a known problem.
But, it seems there has been a lengthy debate on what people perceive as 'Received'.
Some people think 'Received' is the date/time email was received by server that has the mail account. Others think 'Received' means when it was downloaded - when they actually received it into the mail account. It seems there are those that think 'Date' is the received date.
In reality: Date is what is set when the person creates the email and that date is determined by their computer date/time and timezone which may or may not be accurate. Person may compose and use 'Send Later' - but they send at a different time or even day. If a timezone effects dates, then it is possible to actually send on one day and the recipient server receives it on a different day.
Received is the date/time when server for mail account receives email and that date/time will be accurate. The computer used to display downloaded mail may effect the Date information if their computer is not setup accurately for date/time and timezone for their location.
Most people do have the correct time/date/timezone, but I have come across some people who did need to fix things. Thunderbird date/time settings use the computer date/time settings.
I may have already typed info that you already know, but I added it just in case someone reads this and needs additional info.
Again, thank you very much for your great support!
Yes, I was aware of the meanings of "Date:" and "Received:". Good idea to explain for others :-)
I wouldn't have come to the idea that TB would offer a column for display in the UI whose content it actually does not download, and I never would have come to the idea that this is due to different possible interpretations of "received". Thanks god for the junk messages which made me realize the problem, because that matter is important to us (see below).
As an anecdote, I'd like to shortly explain why the correct function of this column is important; the developers may not have been aware of that:
We are using TB in business environments. In many legislations (including that of our country), if people receive documents which entitle them to make use of a right or which impose duties on them, the exact point in time when the right may be deployed or the duty must be fulfilled may depend on the date of reception of the respective document, not the date the document itself shows (which is usually the date when the document was created by the sender). Of course, it depends on the kind of document, but there is quite a number of situations where the date of reception is relevant.
Given that nowadays companies receive 90% percent of such documents via email, it becomes clear that a correct date / time in the "received" header is very important. That's the reason why I have asked in the first place.
Thanks again for the solution!
JustAFrame দ্বারা পরিমিত