I would like to REALLY archive some older e-mail-folders. Archive seems not to be the right word, because i work with empty inboxes, so every completed or answered e-mail is still archived in a folder (with the name of the year), but i use IMAP so all archived emails are still on the server.

Now i want to EXPORT the years 2018-2019 to my selfhosted-backup-server so that i can delete the emails on the mail-server.

a) Which format make most sense? EML? mbox? Another one? Would be nice if i can search the archived stuff without too many effort. b) Should i export directly from the UI of my mailprovider (if possible) or is exporting from thunderbird-client ok.

  • nakal@kbin.social
    link
    fedilink
    arrow-up
    10
    ·
    1 year ago

    93000 mails since 2008 are just 2,1 GB. I have an archive on my home server where I also host my main IMAP server. I just move them from the inbox to Archives.YEAR.

  • FigMcLargeHuge@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    Commenting because I too am interested in this. I also would like to see if anyone has solved the issue with Thunderbird and Yahoo email where only 10,000 emails are kept. I have an inbox with about 20+years of emails, and with the 10k cap, I realized Thunderbird was literally deleting the oldest ones. Since I wisely told it not to delete them on the server when it copied them, I didn’t lose them, but with that volume of emails, I really don’t want to have to manually move them into folders. Guess this turned into a ramble, but it would be nice to have a backup since you never know when one day you will wake up to be told service x is shutting down.

  • brianorca@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    1 year ago

    MBOX is a standard format, which is text based, (like the emails themselves are) and should be compatible across multiple email clients. It can contain entire folders.

    EML is also a standard text format, but usually contains a single email in each file.

    In the worst case, you can just open up either one in a text editor if you need to find something.

  • mellitiger@iusearchlinux.fyi
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    Hi,

    i do a simple 1:1 backup with offlineimap, which saves the mails in plain text files (similar what you get when look at the source in thunderbird).

    These files are backed up regularily with restic.

    Both backups are running automatic, and on multiple machines…

    • moddy@feddit.deOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      I think that is the way I want to go! Thunderbird on my PC is the „central mail client“, so I just have to draw the archived years (imap) to a local folder. The advantages: If I look for an older mail, I do not have to search in seperate archived files (mbox/eml). And with backing up thunderbird, I have a backup of all my settings AND mails!

  • tvcvt@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    I’ve been meaning for years to set up a solid archiving system that I don’t have to manually babysit. I’ve had my eye on mailpiler (https://www.mailpiler.org/), but haven’t found the time to get up to speed on it. I’m the meantime, I drag messages to a local folder like a barbarian.

  • Psy-Q@feddit.ch
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    I’ve been using imap-backup for many years without issue, it backs up to mbox files that it can restore onto any IMAP server because it also stores IMAP metadata on the side. I then backup the dir itself using borg. It deduplicates and compresses so the backup archives themselves are extremely small.

  • moddy@feddit.deOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I think that is the way I want to go! Thunderbird on my PC is the „central mail client“, so I just have to draw the archived years (imap) to a local folder. The advantages: If I look for an older mail, I do not have to search in seperate archived files (mbox/eml). And with backing up thunderbird, I have a backup of all my settings AND mails!

  • calzone8915@lemmynsfw.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    It doesn’t really matter, you should do it however the mail archive software wants it. Apparently there is a pretty big difference between eml and maildir, so you possibly need to try both ways to see what works with your software and workflow.

    • Shertson@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      What email archive software do you use? I’ve often thought about spinning up an IMAP server locally that doesn’t send/receive but allows me to copy all my old mail to it. I have a dozen or more email accounts across different providers and would want each kept separate in the archive. They also span 15+ years.

    • conrad82@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      That’s me! I got dovecot in docker working for email archive, and moved all my old emails there. I access them through thunderbird on pc and k-9 mail on phone. Works great!

      It took a bit of time to set up the passwords, and understanding the configuration. I used the lets encrypt certs from caddy.

      I had to look at some different examples of the dovecot config file to get it right

  • i_lost_my_bagel@seriously.iamincredibly.gay
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    copy and paste it into a text file and stick it in a folder. I encounter an email that is worth archiving approximately once every year or so. Most just get deleted once they serve their purpose.

  • Shdwdrgn@mander.xyz
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    An interesting question, and something I never really thought about because I host my own mail server which has daily backups.

    Do you actually have an option to export folders from Thunderbird? I couldn’t find anything so maybe you’re using a plugin to perform that function?

    As for format, I think the .eml files are more universally recognized if you want to transfer your message to another client. I have avoided mbox for years because it packs everything into a single large file – handy if you want to copy it somewhere else, but a pain to work with if you’re trying to find a specific message and the more emails you have stored, the slower it gets. Another option which you didn’t mention, but maybe you have available (this is what I use on my mail server), is the maildir format. This stores every email as individual files in their named folders, and in plaintext format so you can open them up in a text editor or search through the files with command line tools. Since there is no compression it takes up a lot of space but I find it worth the storage.

    If you have mbox or maildir file backups, one option would be to spin up a local mailserver of your own that acts as a relay to your email provider (or even multiple providers or mailboxes). This option might also work to download a copy of all your folders without having to do a full backup from your client, but that probably depends on how the server is configured. The point, however, is that if you have a local mail server running with a full copy of all your emails, then you would now have the option to simply back up the server files as a whole. You can even do recursive backups from a daily script so the task is completely automated and then you don’t have to remember to perform the task on a regular basis.

    Anyway, just some things to think about.

  • dalz@fedi.alsd.eu
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    You could use mbsync to automate this. You can configure it so that it downloads new mail with IMAP, but keeps them even if they are deleted from the server.

    Then you will have a Maildir that you can manage with any mail client, index with notmutch, etc.