uchicago-library / attachment-converter

Attachment Converter: tool for batch converting attachments in an email mailbox
GNU General Public License v2.0
8 stars 3 forks source link

Parsing Messages using OCamlnet #57

Open nmmull opened 1 year ago

nmmull commented 1 year ago

One of the benefits of using mrmime over ocamlnet is that mrmime handles messages. To handle messages with ocamlnet, we basically have to:

Note that this has to be done for both the `Body case and the `Parts case, as they are handled slightly differently.

Also note that there are multiple subtypes for the message mime type. The only one that is pertinent here is rfc822. Dealing with the other two subtypes should probably go on the docket, but perhaps a bit further in the future.

waclena commented 1 year ago

Nathan Mull @.***> writes:

Also note that there are multiple subtypes for the message mime type. The only one that is pertinent here is rfc822. Dealing with the other two subtypes should probably go on the docket, but perhaps a bit further in the future.

I forgot about that. I used to use the partial type a lot, back in the day when it was common for MTA's to reject "big" messages -- like, more than 512K[1]! Gnus would ask if it should split a message bigger than that, and if you said yes, it would send maybe three partial emails! And it would also let you mark a set of partials in your inbox and it would reassemble them. I don't think many MUAs actually did that (and I'd be impressed if any modern ones even bother with the partial subtype), but it definitely worked sending emails between me and Peggy.

Footnotes: [1] I forget the exact number...