Hey all - I'm relatively new to working on this, but have been plugging along and learning trial and error here on getting a new home server setup on ClearOS. What I'm stuck on right now is some way to create an archive or backup of old emails from non-active accounts (for example, old Gmail accounts with takeouts) so that they are a) backed up on my server and b) accessible in some format that allows me to remotely search for and retrieve old emails from a desktop or mobile client outside of the LAN so I can have access to always pulling up an old email that is stored on my server only. I want to backup an active ProtonMail account too (ideally in the same place), but that seems easier than this, which I can't figure out the best way to do. Happy to grind through any tutorials out there but didn't find anything from searching around. Thanks!
Share this post:
Accepted AnswerNick HowittOfflineTo back them up to your server, the only obvious way I can think of is to download them to a valid e-mail address/account on your server with imapsync and then use a conventional e-mail program to access these messages. If they are really dead accounts, you could bring them all under one e-mail account in ClearOS by running imapsync on one archive then moving all resulting e-mails into a subfolder. Then run imapsync on your next archive and repeat. I have no idea how to read an archive except with an e-mail program. You could use Roundcubemail if you wanted to search through a web interface.
Accepted AnswerAlex TOfflineThanks Nick for the answer here. What I'm looking at really is more focused on accessing archived emails, not syncing live email accounts (though that too). Basically I'd like to be just remotely access archived emails, ideally not through FTP or something that is a file system, but something that is optimized for searching and accessing emails and their attachments. I'd like to have them all backed up on the server, and then be able to access remotely. Does that help describe more of what I'm trying to figure out how to do? Thanks!
Accepted AnswerNick HowittOfflineSorry for the delay, but notification e-mails of new posts have been failing so yours got stuck under moderation.
I am not sure if this will do what you want or if you want to keep the mails in separate accounts. Anyway, would this work for you:
Set up a user for each mail account (if you want to search each account separately).
Set up the mail retrieval app to retrieve new mails and feed them to the right account.
Use any desktop client to look at the e-mails (or most mobile clients bus searching on mobile clients seems to be a bit a bit limited as they don't go back too far, possibly for bandwidth reasons)
Or you can use Roundcubemail for web access to your files.
To pull down e-mails first time, if the remote accounts support imap, you could possibly use "imapsync" to fetch all the e-mails. For live accounts, if you are using the Mail Retrieval app, you may need to run imapsync, then let the mail retrieval app run, then you may have to run imapsync again with some of the switches to just do an incremental sync and delete any that should not be in there (imapsync will pull down everything and the first time the mail retrieval app runs it may duplicate)
Alternatively, on live accounts, use imapsync to load them, then on the live account, e.g. GMail, set up automatic forwarding to your ClearOS account so you don't need to use the mail retrieval app.
If ultimately you want everything under a single user, especially the dead accounts, try using an e-mail client such as Thunderbird. You can configure it for multiple accounts and use drag and drop to copy the mails between the accounts so everything ends up in some sort of folder tree in your desired account.