postalsys/postal-mime

Small iso-8859-1 discrepancy

Closed this issue · 1 comments

Great work on this parser. I've tested postal-mime's results against stalwart's mail-parser and postal-mime does an excellent job even with some really non-standard email. I did come across a couple small discrepancies from what mail-parser returns vs. what postal-mime returns.

One example is here: https://github.com/stalwartlabs/mail-parser/blob/main/resources/eml/legacy/016.eml

mail-parser

To Name: Jürgen Schmürgen
Subject: Die Hasen und die Frösche

postal-mime

To Name: J�rgen Schm�rgen
Subject: Die Hasen und die Fr�sche

Similar issues can be seen with these emls: 018, 023, 024, 025, 026, 050, 051.

Just wanted to bring that to your attention. Thanks for the great work!

All these examples use invalid MIME encode-word formatting and are very old. I'm not sure if fixing it (and "fixing" in this context would mean allowing and handling invalid structures) would give any actual value. If you want to process legacy email archives, then yes, Postal Mime should know how to handle this non-standard edge case. If you want to process "normal" mail, then there is no difference at all, as no sane email system generates such invalid encoded-word structures anymore.