Found New Email Archiver - Mail-Archiver
I wanted to write a brief post about a new Email Archiving solution I found on r/selfhosted, that looked like it would almost certainly replace my current Postfix/Dovecot/Roundcube journaling setup.
I found a new Email Archiving solution on r/selfhosted called Mail-Archiver Github and I thought I’d download it and give it a go. I’ve been trying to find a decent mail archiving solution for a while and never found anything that I really liked and covered Microsoft 365 mailboxes.
Up until now I’d used a Postfix/Dovecot/Roundcude VM hosted locally, with journaling rules setup in Microsoft Purview to forward all emails to the local mailboxes - but it was a bit cumbersome to setup, but fine once I got there to manage. But it’s features are severely lacking, it’s essentially just a mailbox copy, except with no organisation into folder. Everything, sent and received, inbound and outbound all end up in the same folder in one mailbox. But, this all worked when at a basic level all I wanted was a simple way to search and find an old email, that’s all I really needed at it’s core.
Features that interested me
- Works with Microsoft 365 - I use and have used Microsoft 365 for email for a very long time now, and a lot of the mail archiving solutions I’ve used which are open source are IMAP based which introduces some issues unless the developer has had Exchange in mind. Mail-Archiver allows you to set Microsoft 365 as a provider for a mail account by authenticating with the Graph API with an Application Registration in Entra. Which takes literally five minutes to setup, copy the various IDs and the secret key in Mail-Archiver and you’re good to go. I’ve only seen this in paid Mail Archiving solutions previously.
- Docker - I like that they provide an image and a docker compose file with most of the available options to you so getting setup if you already have Docker setup literally takes less than 5 minutes.
- Regularly updated - seems there are four contributors and you can see from their Github releases page, they’re regularly releasing new updates which is a great sign.
- Simplicity - as it downloads and stores everything in a Postgres database, it’s super easy to lift and shift it to a different host in the future, or to back it up as Postgres has it’s own backup processes you can make use of. For example, for testing I have used a docker volume for the Postgres data storage, but if I continue to use it I will swap it over to a passthrough folder to store it directly on my disks on the host. Then it’s even easier to backup. I’m not sure how I will back it up yet, I like to idea of a scheduled task in Postgres to export everything to .sql and then have a backblaze sync job which just syncs those files up to the cloud. (At that point I’ll have a local copy as well as two copies in the cloud, although one of them is the source…)
Issues I Encountered
I haven’t really encountered any issues so far (17/09/2025), but I’ve barely used it! The only issue I’ve seen is not having enough resources on my docker host (4vcpus + 8GB RAM) when archiving a very large mailbox (20k+ emails, with attachments). It ended up crashing a few times and pulling other containers down along with it.
Potential Ideas for Improvement
To be very clear, the below isn’t meant to be a slight, or a demand. Just ideas I came up with on the first go of using the software. I imagine a lot of the points below have been requested already, or are in the works. I’ve been very happy with the functionality of the software, the ease of setup, and (of course) that fact the instructions include a docker compose file which works (and is documented!).
- Ability to save a Microsoft 365 Provider in the application once and reuse it across multiple mailbox accounts. For example like being able to choose a particular tenant through a drop down.
- Ability to pull discovery a list of potential mailboxes through the Directory and allow the admin to choose multiple accounts so they don’t need to be created manually. Could include some kind of automatic sync of accounts so newly created mailboxes would automatically be added and synced.
- (Really nice to have, but not that important). Tie in authentication so users can authenticate using their Microsoft 365 accounts and only access the mailboxes they already have access to (great for businesses).
- Ability to backup and restore configuration of Mail Archiver (accounts, users, providers) so if you need to rebuild it’s much easier than recreating everything. Although, not as much of an issue if points 1 and 2 above are added.
- Configurable graphs on dashboard page, so you can look at metrics from last year, or last 30 days etc. It currently only shows the last 12 months of email.
Will I continue to use it? And Will I sunset my journaling solution?
I’m going to leave them both running side by side for a while and see how it gets on, but I think it’s very likely I will drop the journaling solution at some point if Mail-Archiver continues to impress, especially if they continue to upgrade and improve the software. I will probably keep the Postfix/Dovecot/Roundcude local setup though, but just use it as a secure SMTP relay for the homelab. Almost everything that uses email in someway doesn’t necessarily play nice with Microsoft 365, especially with MFA being involved. It would be nice to remove the exceptions I have in Legacy Authentication policies in Conditional Access. Mail-Archiver uses Graph API and an SMTP relay can use a specific account which only has the necessary permissions to relay, not access my own mailbox.
I will come back and update this post sometime in the next six months to a year.