go full boomer and take a picture of your monitor displaying the emails?
Digital Forensics
A community focused on all things digital forensics.
In my admittedly limited experience, courts don't want to look at raw HTML unless something in the headers or something is relevant to the case. Then, they want the important bits to be highlighted by experts.
I actually wrote some Python scripts about 3 months ago to parse MBOX files so that specific emails could be entered into evidence in a lawsuit. I don't know if my scripts would help you, but I'd be happy to send them to you.
My python knowledge is quite rough but if not much hacking is needed it could be useful. I’ve seen others asking for a similar tool. I thought about creating one over the years but keep passing on it thinking I won’t need it often enough and every situation can bring different requirements as well. Which is why I settled on pasting into a LaTeX template. I do things like use a tiny font on signature blocks that are so big they would spill over to another page.
Does python have a standard library for HTML rendering? Or do you call a browser of some kind?
I'm on my phone right now. When I get home I'll dig them up.
I might be able to get by without the script. I just found that I can render the body in Firefox well enough (that often fails but it works with the particular emails I’m dealing with), fiddle with the paper format and scale to exactly fit a page, and then import it into LaTeX, rescale, and attach a header. If you’ve already got the script ready then I would be happy to take it anyway and compare the script output to what I’m manually rigging up. But if you’ve not started then no worries. Thanks!
(edit)
fwiw to anyone with the same need, I found this project: https://github.com/nickrussler/email-to-pdf-converter It looks a bit messy to install on my distro and I’m not sure of EML / Mbox differences, so I’m not planning to use it myself.
I'd kind of forgotten how I'd done it.
This script searches an MBOX file for emails from or too lawyer1 and lawyer2, that contain the names or email addresses in target_names. It exports each email to a txt file, and saves any attachments in their original format.
Then I used this bash script to export the txt files to PDF, using pandoc (https://pandoc.org/)
In my case, we needed to export like 7,000 emails from over a 6 year period from like a 45 GB GMail MBOX export. The lawyers seemed happy with the result, but it was a lot of data.
Thanks! I grabbed it in case it comes in handy. I wonder if the first script which searches for messages might have been simplified by using grepmail. Grepmail is slow but powerful.
This is slow too.