duesee / imap-codec

Rock-solid and complete codec for IMAP
Apache License 2.0
35 stars 13 forks source link

question: Validation of list in ID command #400

Open duesee opened 7 months ago

duesee commented 7 months ago

RFC 2971 tells us that ...

... and that ...

I'm not sure what to do with this information, really. Sure, we could enforce all of this. But... does that mean we reject longer, dulicate, or too much fields?

I'm leaning towards not doing anything of this until there is a good reason. Resource exhaustion probably needs to be handled more generically, anyway?

If we want to do this, we probably should use a wrapper struct that holds a hash-map.

Dovecot (out of curiosity)

A ID ("012345678901234567890123456789" "")
* ID ("name" "Dovecot")
A OK ID completed.
A ID ("012345678901234567890123456789X" "")
A BAD Invalid ID parameters

A ID ("name" "A" "name2" "B")
* ID ("name" "Dovecot")
A OK ID completed.
A ID ("name" "A" "name" "B")
* ID ("name" "Dovecot")
A OK ID completed.