Is there a way to have mutt keep your emails in memory...
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there a way to have mutt keep your emails in memory...
I leave my computer on all the time. I notice if I haven't run mutt in a day or so it loads up all the emails in my mailbox when I fire up mutt. Yet if I close mutt and execute mutt again it already has those emails loaded up in memory. Is there a way to keep those emails in memory so that I don't have to wait for mutt to load up all 1000 emails if I haven't run mutt for a few days?
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Since it's mutt loading them into memory it's mutt's memory that they're been loaded into. Once you close mutt you effectively wipe the memory.
If you have a fair bit of RAM you could copy your mail folder to a RAM disk and open it with mutt?
Otherwise, unless somebody knows something really tricky, I think it would mean rewriting mutt and/or the kernel.
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495
Rep:
Anything you put under /dev/shm should get stored in ram. For me, tmpfs is mounted at /run. Anything put there also gets stored in ram but is limited to using a certain percentage of the total ram.
Last edited by fakie_flip; 01-22-2013 at 04:12 PM.
Then of course before I poweroff my computer, which I never do, I copy the Maildir contents back to disk since RAM is volatile memory and erases without power. Or perhaps I could set a cron job to do it once an hour in case of a power outage. That sound about right?
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
That's the kind of thing I was thinking of, yes. If you're using IMAP and you leave message on the server you could even forget about copying back to disk at all, I suppose?
Otherwise a cron job sounds like a good idea, perhaps using rsync or that could be overkill?
Yea rsync would be a better solution or maybe just lsync it if I wanted to be paranoid. Yea gotta write to disk, otherwise when you reboot you will lose all your mail.
Yea rsync would be a better solution or maybe just lsync it if I wanted to be paranoid. Yea gotta write to disk, otherwise when you reboot you will lose all your mail.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
I feel embarrassed now having not heard of lsync before. I'll have to take a look at that myself for a couple of directories I'd like on multiple drives/machines.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.