My wife works in a workplace filled with drama. She wants to keep an archive of her work emails without forwarding them to herself.
She already has access to her work email (Exchange) from home, and we already know how to archive emails by exporting them from Apple Mail.
I have a Raspberry Pi 4 with Alpine Linux. Is there any command line utility that can connect to the email server as a regular client and manage archiving?
Unless her workplace disabled it, MS Exchange should support POP3/IMAP4 so you should be able to just hook any old client up (i.e. thunderbird) and disable delete syncing.
Just be careful it's legal if she's planning to store work emails on a non work approved repository. My company does not allow this and have checks and / or blocks in place to catch people doing it.
It's always legal to store correspondences. It may be illegal (and probably is with most employee-employer contracts) to distribute correspondences to the public... it may get you in legal trouble if you store such correspondences and they're stolen (that'll be a question on whether the storage is negligent).
But it is always legal to store correspondences for personal private reference and to share them with legal counsel. Such correspondences are often how labor lawsuits move forward and while employers should not delete them they sometimes will so it's never a bad idea to have your own copy.
I’ll have to do more research on this. She’s in good standing with management but for some reason they’re giving her a super difficult time about taking medically necessary time off. We fear they might even try to fire her, so having evidence would be nice.
If you are comfortable with the command line, mbsync / isync allow you to save your mail offline with the ability to search and read it later on. You can use a cron job to fetch the email however often you want it.
I should’ve clarified that the command line is actually my preferred way of doing it. Our personal devices aren’t on 24/7 (laptops) so automating it the traditional Linux/UNIX way™ is preferable.