question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Better handling of invalid Date headers

See original GitHub issue

I spotted in some emails a date in the following format:

Date: 06-MAY-2016 19:00:22

I think due to the uppercase month, k-9 mail is unable to handle them, and displays them as they were sent at the time they were received. Can you work around this issue?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
cketticommented, Aug 6, 2021

I have changed my mind on this. I’m no longer opposed to performing all kinds of magic to derive a sensible display date from a message. However, in those cases I want K-9 Mail to display an error banner, letting users know that the email is broken. Ideally users will contact the sender of the message and get them to fix their system so future messages won’t show up in K-9 Mail with an annoying error banner.

1reaction
cketticommented, Aug 7, 2021

I want to show an error banner because silently fixing the situation will take away the little bit of pressure there is to fix the bug causing the problem. Showing a banner is more annoying than showing a wrong date. So ideally users will a) blame the correct party and b) create enough pressure to get the software fixed that generated the broken message.

Adding the “date fixing” first and the error banner later, is a great way to never show an error banner because nobody will ever get around to adding it. And now K-9 Mail is part of the problem (silently fixing the errors of others).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Better handling of invalid Date headers · Issue #1356
I spotted in some emails a date in the following format: Date: 06-MAY-2016 19:00:22 I think due to the uppercase month, k-9 mail...
Read more >
Do invalid date headers on import affect deduplication?
When importing these files with invalid date headers, the Barracuda Message Archiver retains the original source data (.eml format) in its permanent storage....
Read more >
Email with invalid hour in date header throws exception
Here's the workaround I've gone with for now: from email import policy from email import errors from email import _header_value_parser as ...
Read more >
PHP "Invalid Date: header (not RFC 2822)"
SpamAssasin complains that the date format is wrong. 0.4 INVALID_DATE Invalid Date: header (not RFC 2822) Supplied date is: Date: Sat, 30...
Read more >
Invalid Date Format in empty file with a Grand Total row
When an empty file with just headers and a Grand Total row below them is uploaded in a TotalConnect Data Stream the job...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found