-
Notifications
You must be signed in to change notification settings - Fork 195
Mail and mbox adapter (fixes #89) #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
81f636a
to
e9c5cd4
Compare
e9c5cd4
to
4c64bfc
Compare
Hey. I'm a bit late here but if you would rebase this I would be happy to merge it. Maybe not too easy because adapters are async now.. |
Hi, thanks for the response. I'm actually working on an |
uh good luck with that. i tried writing an mbox parser in Rust a few years ago but apparently the mbox format has different incompatible versions that differ in how the "from " line is escaped and I couldn't even find docs about how the mbox format that Firefox uses works |
ca0191c
to
6ae1fb3
Compare
Oh just splitting on "\nFrom " seems to work for mbox files saved by Thunderbird. I think most mbox variantions forbid "\nFrom " in mail content. |
Seems tree_magic does not know about this format
|
||
let mut content = Vec::new(); | ||
let s = stream! { | ||
inp.read_to_end(&mut content).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reading the whole file into RAM is not good because it may be many gigabytes in size (e.g. firefox mailbox files?)
The new
MboxAdapter
provides the mail content to other extractors (this resolves #89).