Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Date header to messages if it's missing #5043

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

plantroon
Copy link

I am fully aware that adding a date header to e-mail is responsibility of the sender's client. However, there is also no reason known to me to not have this header automatically added on recipient's side when it is missing.

Not having date header creates problems in EAS clients like Android's Gmail app - it assigns the date of sync to the e-mails and therefore ordering is wrong. Furthermore, when trying to manipulate such messages (like moving or deleting them) it sometimes crashes the app. Of course, all of this is the app's fault, but Google won't be fixing this for people using 3rd party mail services based on my experience dealing with them.

Received headers should always be available and are the most reliable reference for setting the Date header.

I also believe that Dovecot Sieve is the correct place to handle this, as spam filters before it could increase spam score based on this header missing, which is a legitimate behavior.

In the past, I had very weird problems with EAS clients on my phone and while I did not test this back then, presence of such messages in my inbox might have been the culprit. I did observe Gmail app crashing when manipulating these messages and can reproduce this behavior reliably.

@plantroon plantroon changed the title Add Date header if it's missing Add Date header to messages if it's missing Feb 3, 2023
@milkmaker
Copy link
Collaborator

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@milkmaker milkmaker added the stale Please update the issue with current status, unclear if it's still open/needed. label Apr 4, 2023
@plantroon
Copy link
Author

Please do not close without reason

@milkmaker milkmaker removed the stale Please update the issue with current status, unclear if it's still open/needed. label Apr 4, 2023
@DerLinkman DerLinkman added the investigating Still under investigation label Apr 5, 2023
Copy link

@tomasz-lasko tomasz-lasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I "review" the code change, then for me it generally looks good - so if this code was tested and it works, then I recommend approving it.

Can someone review/approve this PR???

This is so important to have this functionality, that I suspect we can include it like this as soon as possible, and later think about an option (enable/disable toggle) in some config files or even UI.

@plantroon what do you think about adding an option to config files for this?

@tomasz-lasko
Copy link

Anyway regarding the whole use case, the bottom line for me is: Thanks a lot to @plantroon I agree with him.

I've been for years wondering why it is not the default behaviour in many mail servers, I don't see any problem in adding a missing date by the server, as it would make things more clear to the mail recipient who often is a non-tech person, but I suspect that also technical persons mostly wouldn't want a missing date anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating Still under investigation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants