I have started moving away from gmail and have started exporting my older e-mails via the takeout option. This generates .mbox files. I don’t really use any e-mail clients on my computer and do most of my e-mailing on my phone, so I don’t have a way of viewing/searching those files.

Therefore I was wondering if there is any selfhosted option for some kind of e-mail archive/viewer with decent search function that anyone can recommend? Specifically something capable of handling those .mbox files. I found a few projects that sounded promising, but they seemed either dead, weren’t setup for selfhosting or could only connect directly to the mailboxes. So I thought I’d ask here if anyone has experience with this, maybe some recommendations?

Also open to alternative approaches what to do with those files. I just would like to delete these mails from gmail entirely, but that requires I can search them with as much ease as I can on gmail with a local option.

Thanks!

  • apex32@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    28 days ago

    What worked for me was I installed and ran Thunderbird, then I quit and copied the Google Takeout .mbox file to ~/.thunderbird/xxxxxx.default-esr/Mail/Local Folders. When I re-launched Thunderbird, it took a few minutes and then all my Google Takeout emails were browsable/searchable under Local Folders.

    Screenshot

    Also, I think there was a weird step involved, like I needed Thunderbird to connect to some email account, any email account, in order to get past the welcome screen.

  • Coelacanthus@infosec.pub
    link
    fedilink
    English
    arrow-up
    1
    ·
    28 days ago
    • You can use imapsync to sync all you mails from GMail to your new email provider if you still use email.
    • If you no longer use email, Piler is a bit heavy but well-working solution.
    • Notmuch is much lightweight but has no web UI, but if it require you install a (may be TUI) software, why not just install a mail client like Thunderbird and then just use its local mail feature to index the mbox?
  • diaphragmwp@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    27 days ago

    “GMail takeout files” aren’t a thing. mbox is a standard file format from Unix. Some Unix-likes provide the mail command and on others you have to install s-nail, after which you can do mail -f {path to mbox} to view all mail inside. If there are multiple files, you can literally just concatenate them like so: cat /somedirectory/*.mbox > theultimate.mbox.

    Apart from that, most GUI mail clients allow viewing mbox. When the mbox file updates, the client says you have new mail. For example, in Claws Mail, skip setup, then go to plugins and enable the mbox plugin (while you are there, may as well enable pgp, s/mime, calendar, dillo to handle all formats). Then, go to create new account, and in the “Basics” tab, select “local mbox file” for "Receive protocol ". It will then ask for a file path.

    Also, if your Google account settings allow, you can literally just login to Google from Claws mail. Set protocol to IMAP, then set Authentication method to Oauth2 in both Receive and Send tabs. Proceed with setup as usual and it will open your default web browser to login. After that, it will download your entire history of mail.

  • undefined@lemmy.hogru.ch
    link
    fedilink
    English
    arrow-up
    1
    ·
    28 days ago

    I’d just add both Gmail and another email account to a desktop email client, then simply drag the emails from one provider to the other.