@talundbl I have some thoughts, which may (or may not) be helpful.
Firstly, there are some apps that have the capability to archive and/or store emails. The two that come to mind are DevonThink and EagleFiler, both of which do have email importing capabilities. If you are interested/willing to store your information in either app, this might be a quick solution.
I tried both, but did not stick with them in part because I was looking more for a solution that stored emails in my file system, and not in a separate app. I tend to go back and forth on whether I want to commit to DT or not.
Mail.app has the ability to export an email to a PDF, and it does generate a nicely formatted PDF. Attachments, however, are displayed either inline in the PDF (for short PDFs, for instance) or as icons. You can save attachments separately.
It is feasible to “automate” this process, saving the email as a PDF (or in raw email format) via UI scripting (for the PDF) or AppleScript (for an .eml file). I found the UI scripting (either in AppleScript or via KeyboardMaestro) to be flakey and unreliably and gave up on that eventually as well. However, if you are willing to do this as a more manual process, that might solve your problem.
I built my own system which I am, so far, reasonably satisfied with. The basis is a macro in KM to save any emails selected in Mail.app. The macro, in a macro group that is only active with Mail.app is the active application, simply runs through all selected emails and saves the raw email to a file on the Desktop, with a .eml extension. Interestingly, if you QuickLook such a file it will display in a readable and reasonable format, and of course having it as what is a plain text file with email headers does make it searchable via tools like grep and so forth. The filename contains both the message ID from Mail.app and the account the email was sent to for initial identification and to keep filenames unique when multiple messages have been put on the desktop.
The next step is a Hazel rule that runs after the file has been on the Desktop for some period of time (giving me a time interval in which to delete the .eml file, move it, or whatever, if I don’t want it to proceed down the automated process).
The Hazel rule picks up .eml files on the Desktop that have been there for the specified period of time, and runs my custom script (written in Python) which does the following: 1) renames the .eml file to a more useful filename formatted as YYYY-MMDD-HHMMSS_.eml and 2) pulls out all attachments and saves them in filenames of the format YYYY-MMDD-HHMMSS__.
The script has the capability to insert into the filename either a UUID or a SHA-256 hash of the raw message if desired, but I decided not to use that in production as it makes the filenames overly long, and was designed to avoid filename collisions which has not actually turned out to be a problem for me.
Special characters that don’t play well in filenames are removed, and spaces changed to underscores (which work much better in the shell).
The script also tags the attachments with a tag “attachment” and tags the renamed raw email file with “email” and if there are attachments, with “hasattachments.”
Since the script is in Python, the tagging is done with my own utility called Tagger, written in Swift.
In addition, the email file and attachments are tagged based on the email address to which they were addressed, pulled out of the email headers, and if that does not work, then from the filename, which has the account that Mail had assigned the email to. There is a dictionary in the Python code that specifies the tag to assigned based on the email account.
After all of this is done, Hazel will eventually pick up any files tagged email or attachment (again there is a delay in case I want to move or copy these files somewhere else, like a project folder) and will move them to my EmailArchive folder, where another Hazel rule will use the tag that was based on the recipient account to move them to a subfolder.
In the end, I can quickly save one or more emails from Mail.app using two keystrokes (one to pull up the conflict menu for Mail.app and a second to trigger the save macro) and eventually the files will wind up in my email archive folder. If I want, I can move or copy the files from the Desktop during the process if needed.
It’s a big convoluted, and there is some kludginess, but it does work.
One thing I would have liked would have been to render the email into a pdf file for easier viewing and printing at a later date but that provided very difficult. Scripting Mail.app to generate the PDF wound up being unreliable and slow, and so I finally decided to fall back to another approach: if I double click the .eml file, it will open in Mail.app where I can save to PDF or print, so if/when I need that functionality I can use that approach. I wish there was a more easily scriptable way to get Mail to output a message to a PDF, but there is not, and I decided that I did not want to put in what would be a fair amount of effort to write that code - I really don’t want to take on the complexity of parsing email to that level of detail, essentially replicating the development of a mail application. If I learn that one of the other popular Mac email apps supports this functionality via scripting, that may well push me to change!
Hope this far_to_long reply is useful. If you have interest, I am happy to share my code.