Open jonhoo opened 6 years ago
My reading of the spec is different at least for in_reply_to
and message_id
. In the paragraph you quote, it says that the relevant headers, if present must have non-empty content, and it continues to state that the envelope members can not be the empty string, but NIL
is still allowed here.
As for the others, I worry that servers might not correctly implement some of these things, leading the parser to choke on things that could still usefully be returned to the caller. I'll see if I can check this against my personal mail archive, at least.
Ah, yes, I think you're right about in_reply_to
and message_id
.
Yeah, that's probably a good idea as a sanity check. We could of course implement the fallback inside imap-proto
since it's from the spec...
@djc did you have a chance to try to run against your mail archive?
Nope, not yet -- ran into some problems getting my mailsync code to run with the latest compiler/dependencies and it's been very busy. 😞
RFC 3501 section 7.4.2 has a lot to say about envelopes that would be handy to include in the docs for
Envelope
. Beyond that though, there are some observations there that I think affectEnvelope
's types. Specifically:Implies that
Envelope::date
should not be anOption
.Implies the same for
Envelope::in_reply_to
andEnvelope::message_id
.Implies the same for
Envelope::from
,Envelope::sender
, andEnvelope::reply_to
.