4 ms·
> I did at one point start to write my own e-mail client and I stored all of my mail in SQLite, using SQL to organize, search, tag, etc. That sounds like a fas
by stevekemp 9y ago
> I did at one point start to write my own e-mail client and I stored all of my mail in SQLite, using SQL to organize, search, tag, etc.
That sounds like a fascinating idea. I wrote my own email client, but it uses Maildirs for storage (with optional IMAP support), and one of the biggest issues is that reading every file in a large directory is slow.
(Well if I'm honest the issue is reading and parsing every file from a given maildir hierarchy.)
Caching headers helps some, but if it were all in a database I'm sure it would significantly simpler. "notmuch" went down that route, and it seems like it pays off in terms of speed. The issue really is importing the mail, and making sure your database doesn't get out of sync with the files on-disk.
If you were really brave of course you'd remove the maildir-contents post-import. But I think I'd be too scared to do that!
- jason_slack 9y ago> If you were really brave of course you'd remove the maildir-contents post-import. But I think I'd be too scared to do that! Oh, I did! I figured why not? It would just mean that I needed to use my client for history if I ever stopped developing it and went back to some other solution. Of course I used a copy of my e-mail while developing and testing, etc.