BOM Issue

At least one stored message in ~/.email3.mail.gdbm begins with a UTF-8 BOM (0xEFBBBF).

Effect

Feeding BOM-prefixed bytes to email.message_from_bytes causes the parser to behave oddly — headers appear missing/None because the BOM bytes appear before the RFC 5322 header section.

Implication

Any future Message-ID indexing must normalize input bytes first (strip BOM if present) before parsing headers. This is a small but important correctness requirement.

version1