I have an account on an SMTP server. The server has a storage quota. I’d like the delete stuff from the server but keep it locally in case I need it. Just in case.

I’d like to be able to access the mail somehow on other computers and hopefully mobile devices on my network so that it can be searched when needed. I’m not sure what the best interface for that would be. A webmail client?

One option would be to use Thunderbird or another client to download the mail once in a while but disable deleting local messages when they are removed from the server. Would Thunderbird store the messages in a format I can use readily with other applications? Or should I use something else to download the mail?

What about situations where messages are moved from one folder to another on the server? Would I get a duplicate locally of the message appearing in both locations? Not sure how the storage and metadata actually are.

Also, is it possible in such a situation to put a message back on the server if I realize it was deleted in error?

Any idea would be welcome. I am a bit stuck.

I can use the command line comfortably but ideally I’d have a solution that doesn’t rely on the terminal to find find messages and such. I don’t really like terminal mail clients.

13 points

I’d say run a local imap server rather than dealing with the weirdness of storage shares across multiple OS’s.

permalink
report
reply
12 points

I still have every email I’ve ever received, going back now more than 20 years. My solution isn’t terribly fancy, but it gets the job done.

I have a Synology here at home running a mail server. You don’t need a Synology specifically, just a simple mail server with access to a lot of disk space. The server isn’t on the Open web or anything and doesn’t support SMTP. It’s just running IMAP to serve the local mail around the house.

I connect to it from Thunderbird on my various machines. I also use Thunderbird to connect to my actual mail servers to do my day-to-day mail stuff.

Every six months or so, I move old mail messages from my actual mail servers over to the archival one. Generally, I keep the mail on the archival server in folders; one per year, that keeps the loading time to a minimum. For example, come January 1st 2024, I’ll be moving mail from January 2023 - June 2023 to the /2023 folder on the archive.

Searching is done via Thunderbird just like you search any mail account, and on my desktop machine, I let Thunderbird keep copies of the mail locally for quick searching. On my laptop though, I ask it to not keep copies to save disk space.

permalink
report
reply
7 points
*

@danielquinn @crank That’s pretty cool. How much storage does 20 years of personal emails actually take up?

permalink
report
parent
reply
9 points
*

It’s actually not as crazy as you might think:

$ du -sh .Maildir/
13G	.Maildir/

That’s going back to 2000 1995, both sent & received. The first email I have in there is from a friend of mine offering to send me an MP3 she downloaded.

permalink
report
parent
reply
2 points

@danielquinn Is that just for text or also for images & attachments? Either way, yeah, 13G is a tiny amount of space when you consider how much info is in there! I wish I had done something similar.

permalink
report
parent
reply
2 points

You were downloading and sharing mp3s in 1995?? Didn’t the file extension only come out in 1995?

permalink
report
parent
reply
6 points

In looking up suggestions made already I found 2 other projects that might be useful. Does anyone have comments about these? I have just looked at them a little bit.

OfflineIMAP

OfflineIMAP is software that downloads your email mailbox(es) as local Maildirs. OfflineIMAP will synchronize both sides via IMAP.

There are a few different overlapping projects by same developer(s). It is a bit messy.

imapsync

Imapsync is an IMAP transfer tool. The purpose of imapsync is to migrate IMAP accounts or to backup IMAP accounts.

Imapsync is a command-line tool that allows incremental and recursive IMAP transfers from one mailbox to another, both anywhere on the internet or in your local network. Imapsync runs on Windows, Linux, Mac OS X. “Incremental” means you can stop the transfer at any time and restart it later efficiently, without generating duplicates.

permalink
report
reply
6 points

So I think the way I would want to do this is with something like mailpiler (https://www.mailpiler.org/). It’s been on my long list of things to dive into for a while.

permalink
report
reply
3 points
*

Well it is literally exactly what I was asking for. :) But as you allude to the setup is not trivial and would be a bit of a project. It is useful to know about because it could help find a somewhat simpler alternative. And I will add it to my own list in case I find none.

edit:

Led me to polo2ro/imapbox: Dump imap inbox to a local folder in a regular backupable format: html, json and attachements. Which is a different take on the same problem. I am not sure if I like the email all being converted to html like this. It could be a really nice addition but somehow I feel that keeping more original-formatted emails would be wise too. It does also create for each message “A gziped version of the email in .eml format” alongside the html but I would have to look more into what can be done with that.

permalink
report
parent
reply
2 points

Yeah, I started working on it once a couple years ago and getting it spun up was a chore. Life got busy and I never finished.

That imapbox looks pretty interesting. Thanks for tracking that one down.

permalink
report
parent
reply
1 point

If you didnt already, see rest of comments on this thread.

permalink
report
parent
reply
2 points

I am currently working on this. Finally got the Docker working and am importing my 15GB mbox as we speak! I’ll post back here about how it works out.

permalink
report
parent
reply
2 points

That’s awesome, I’ll definitely be interested to see how it all works out.

permalink
report
parent
reply
1 point

Did it work?

permalink
report
parent
reply
1 point

Alas, no! Things seemed to be going well: I got >90k messages imported from my Google Takeout mbox file before the import was interrupted (not mailpiler’s fault). At this point, I logged into the “auditor” account and was able to see my emails and search them. But, then I resumed the import. By the end of today, the import was finished (~150k messages total). When I logged in with the auditor account, I got some error “No search results” and nothing I could do about it. This is actually what happened last time I tried mailpiler, too, now that I recall. All seemed fine, but, it seems, the database got corrupted or something along the way… So, now it’s useless. I might try it one more time over the next few days. I’ll keep y’all posted.

permalink
report
parent
reply
5 points

It is the POP3 workflow, not IMAP. Maybe setup your client to use POP3 and remove mails from server after receiving? However I don’t recommend Thunderbird, its POP3 support was very buggy when I used it (many years ago). Try Sylpheed or Claws Mail, for example.

permalink
report
reply
4 points

Thunderbird has actual funding now, so please test before advising against software

permalink
report
parent
reply
1 point

It is not the question of funding. Thunderbird has always had a number of long standing bugs. Speaking about such rare use cases, I don’t think someone care about them. Anyway, I recommend using software that I know it worked correctly, not that worked incorrectly and could be fixed but requires further testing.

permalink
report
parent
reply
1 point

I want to keep mail on the server at about 80-90% of quota. Because when I am outside of my home, that will continue to be what I have access to. So the local copy will only be as a backup in case I delete something that I later realize I need to refer to. Since most emails are very small individually I should be able to keep the majority of them on the server. I will selectively delete either very large emails, or emails which there are so, so many of like notifications, which I will probably never need to look at.

I have used Sylpheed a bit in the past. I prefer it and a very similar project called Interlink to tbird. I just said tbird because I figured everyone would know it. But also I thought all of those were forks of tbird and wouldn’t differ much in how they work. Do they have much different internals?

permalink
report
parent
reply
2 points

You are wrong, there are no widely used forks of Thunderbird AFAIK. Thunderbird is based on Mozilla and has a huge codebase that is very hard to maintain. All other popular email clients have totally different code and based on other libraries. They can be similar in how they appear, but not in what bugs they have.

permalink
report
parent
reply
1 point

Now that I look, I see I am wrong.

A while ago I was trying out betterbird which actually is a TB fork and I guess I kinda just generalized from that. But looking through a list of linux email clients it is clear that only a couple are related to TB.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 9.8K

    Monthly active users

  • 6.1K

    Posts

  • 170K

    Comments