1

Just to be clear, the question is not about accessing archives of emails, but finding email related files mixed into a file archive "randomly" with lots and lots of other files; which is to say, right now my focus is on finding the files, then I'll figure out what to do with them.

Ways I've thought of so far are:

  • Searching the ascii text of a file for "from", then manually review the results,
  • Create a list of all possible email clients during the date range of files present, then create a list of known extension for those clients, search for those extensions, and manually review the results,
  • I don't know, seems like there might be a much easier way to do this, which is why I'm asking.
blunders
  • 887

1 Answers1

1

You can grep for all files containing the words To:, From: and Subject: at the beginning of a line, which should cover pretty much all emails:

find . -type f -print0 \
  | xargs -0    grep -l '^To:'          \
  | xargs -I{}  grep -l '^From:'    '{}' \
  | xargs -I{}  grep -l '^Subject:' '{}'

This outputs a list of files recursively, starting from the current directory.

Marco
  • 4,444