unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Dealing with Missing Date Headers
@ 2022-01-17 21:06 Kevin Foley
  2022-01-18 13:35 ` David Bremner
  2022-01-18 19:16 ` Ralph Seichter
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin Foley @ 2022-01-17 21:06 UTC (permalink / raw)
  To: notmuch

Hi,

Has anyone ever dealt with missing "Date" headers?  My emails from Etrade
in particular are missing them for whatever reason.

My only thought is to possibly use `sed` or something similar to add a
"Date" header based on the dates in one of the "Received" headers but
I'm not crazy about this idea.

I also plan to reach out to Etrade to see if they'll resolve it for
future messages.

Thanks,
Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Dealing with Missing Date Headers
  2022-01-17 21:06 Dealing with Missing Date Headers Kevin Foley
@ 2022-01-18 13:35 ` David Bremner
  2022-01-18 19:16 ` Ralph Seichter
  1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2022-01-18 13:35 UTC (permalink / raw)
  To: Kevin Foley, notmuch

Kevin Foley <kevin@kevinjfoley.me> writes:

> Has anyone ever dealt with missing "Date" headers?  My emails from Etrade
> in particular are missing them for whatever reason.
>
> My only thought is to possibly use `sed` or something similar to add a
> "Date" header based on the dates in one of the "Received" headers but
> I'm not crazy about this idea.
>
> I also plan to reach out to Etrade to see if they'll resolve it for
> future messages.

If you access to .forward style processing on the delivery host (a
relatively uncommon case, but perhaps less so among notmuch users) then
adding time of delivery could be done by piping messages through

formail -a $(date -R)

formail is part of procmail; if that is not available the functionality
could probably be replaced by a short python script, which would likely
be more robust than a sed pipeline.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Dealing with Missing Date Headers
  2022-01-17 21:06 Dealing with Missing Date Headers Kevin Foley
  2022-01-18 13:35 ` David Bremner
@ 2022-01-18 19:16 ` Ralph Seichter
  1 sibling, 0 replies; 3+ messages in thread
From: Ralph Seichter @ 2022-01-18 19:16 UTC (permalink / raw)
  To: notmuch

* Kevin Foley:

> Has anyone ever dealt with missing "Date" headers? My emails from Etrade
> in particular are missing them for whatever reason.

Amazing, and not in a good way. There are only two required email
headers, and Etrade manages to screw this up? Quoting RFC 5322
https://datatracker.ietf.org/doc/html/rfc5322#section-3.6 :

  The only required header fields are the origination date field and the
  originator address field(s). All other header fields are syntactically
  optional.

This is something the message sender has to fix.

-Ralph

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-18 19:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17 21:06 Dealing with Missing Date Headers Kevin Foley
2022-01-18 13:35 ` David Bremner
2022-01-18 19:16 ` Ralph Seichter

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).