djc / tokio-imap

Tokio-based IMAP implementation
Apache License 2.0
122 stars 42 forks source link

Missing references attribute in Envelope struct #129

Closed TornaxO7 closed 3 years ago

TornaxO7 commented 3 years ago

Hello, according to the RFC5322 there should be a References: field but it doesn't exist in the envelope struct. Adding this field would also fix this issue.

TornaxO7 commented 3 years ago

I can try to create a pull request for this "problem".

djc commented 3 years ago

Please first find the reference in the IMAP RFC, rather than the MIME-related RFCs.

TornaxO7 commented 3 years ago

Do you man this?

TornaxO7 commented 3 years ago

Ok wait, I'm sorry, I'm often too hectic. I'll spent some time about the RFC to get a better understanding it because I don't think that I'm really aware of how to read the RFCs.

djc commented 3 years ago

No, 2822 is also about MIME. You're confusing MIME messages with IMAP. They're both about email, but otherwise very different things.

TornaxO7 commented 3 years ago

Ok, so I hope that I (with the help of my friends) found it out now. So RFC3501 should be a RFC for IMAP and if I'm seeing it right, it's one of the "latest" ones (at least the envelope struct isn't updated anywhere else nor is there another reference to an updated version of RFC3501). It says in section 2.3.5:

A parsed representation of the [RFC-2822] header of the message. Note that the IMAP Envelope structure is not the same as an [SMTP] envelope.

And the section 3.6.4 of RFC-2822 says that there should be a References: field. The latest RFC 5322, which makes the RFC 2822 obsolete, says, that there should be a References: field (or section 3.6.4) as well.

Am I on the wrong path again? o.O

djc commented 3 years ago

If you look at the formal syntax section of 3501, you can see that the envelope definition there does not contain references.

TornaxO7 commented 3 years ago

That's strange, than why did they said in the envelope section that it should be the same as the envelope form RFC 2822/5322?

TornaxO7 commented 3 years ago

Anyway I'm closing this issue now, since you're right, that the envelope definition doesn't contain the References: field.