[GH-ISSUE #54] [Bug] Messages are sorted according to time on the sending machine, not server #51

Closed
opened 2026-03-03 01:19:23 +03:00 by kerem · 3 comments
Owner

Originally created by @Kabouik on GitHub (Sep 16, 2020).
Original GitHub issue: https://github.com/d99kris/nmail/issues/54

Originally assigned to: @d99kris on GitHub.

Or are they?

I just scanned a document on a photocopier that sends an email with the attachment to the user. The email immediately showed up in nmail, but not on top:

ss-2020-09-16_135902

This is the highlighted email here, and it was 13:59 at the time the screenshot was taken (meaning the first message was already there since half an hour). I checked the time on the photocopier: 12:08, which matches surprisingly well the 13:08 for the email it sent. There must be some summer/winter time conversion in place.

Wouldn't it be expected that emails are sorted according to the time on the server they have travelled through, instead of the time on the sending machine? Or is it actually already what nmail does? In that case, this would mean that the issue is in the way the photocopier is set up in my working environment, like perhaps the machine is its own server, but I have no way to checking that so I prefer asking here in case this would be a nmail bug. Else, sorry for the noise!

Originally created by @Kabouik on GitHub (Sep 16, 2020). Original GitHub issue: https://github.com/d99kris/nmail/issues/54 Originally assigned to: @d99kris on GitHub. Or are they? I just scanned a document on a photocopier that sends an email with the attachment to the user. The email immediately showed up in nmail, but not on top: ![ss-2020-09-16_135902](https://user-images.githubusercontent.com/7107523/93334344-4f330700-f814-11ea-86bc-a40bdf9ea8e6.png) This is the highlighted email here, and it was 13:59 at the time the screenshot was taken (meaning the first message was already there since half an hour). I checked the time on the photocopier: 12:08, which matches surprisingly well the 13:08 for the email it sent. There must be some summer/winter time conversion in place. Wouldn't it be expected that emails are sorted according to the time on the server they have travelled through, instead of the time on the sending machine? Or is it actually already what nmail does? In that case, this would mean that the issue is in the way the photocopier is set up in my working environment, like perhaps the machine is its own server, but I have no way to checking that so I prefer asking here in case this would be a nmail bug. Else, sorry for the noise!
kerem closed this issue 2026-03-03 01:19:23 +03:00
Author
Owner

@d99kris commented on GitHub (Sep 16, 2020):

I think nmail currently uses timestamp from the email header itself (i.e. whatever the sending machine/application put in the raw email). It should be possible to use the timestamp determined by the email server instead. Let me do some research into this and update here again.

<!-- gh-comment-id:693470752 --> @d99kris commented on GitHub (Sep 16, 2020): I think nmail currently uses timestamp from the email header itself (i.e. whatever the sending machine/application put in the raw email). It should be possible to use the timestamp determined by the email server instead. Let me do some research into this and update here again.
Author
Owner

@Kabouik commented on GitHub (Sep 16, 2020):

Thanks. I admit I do not know how it should be done and if there is a standard for emails in general, but using the timestamps from the header sounds like an issue if it is determined by the time on the sending machine. One could send emails with time set in the past on purpose, and then claim the email was sent long before, and nmail couldn't prove that wrong.

<!-- gh-comment-id:693481299 --> @Kabouik commented on GitHub (Sep 16, 2020): Thanks. I admit I do not know how it should be done and if there is a standard for emails in general, but using the timestamps from the header sounds like an issue if it is determined by the time on the sending machine. One could send emails with time set in the past on purpose, and then claim the email was sent long before, and nmail couldn't prove that wrong.
Author
Owner

@d99kris commented on GitHub (Jan 12, 2021):

Support for using server-side timestamps has been added in above commit. The functionality is disabled by default, and can be enabled by editing ~/.nmail/main.conf and setting server_timestamps=1.

The reason it is not enabled by default is that it causes messages imported to a server to show the date of import, rather than the message's original (internal) timestamp.

<!-- gh-comment-id:758616225 --> @d99kris commented on GitHub (Jan 12, 2021): Support for using server-side timestamps has been added in above commit. The functionality is disabled by default, and can be enabled by editing `~/.nmail/main.conf` and setting `server_timestamps=1`. The reason it is not enabled by default is that it causes messages imported to a server to show the date of import, rather than the message's original (internal) timestamp.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nmail#51
No description provided.