LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 01-22-2013, 10:16 AM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 70
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?

-Tristan
 
Old 01-22-2013, 10:26 AM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
You could leave mutt running all the time, I can't see it being much of a CPU hog as long as your machine isn't ancient.
 
Old 01-22-2013, 02:34 PM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
Yea I could do that but I just wanted to see if there was another solution.

-Tristan
 
Old 01-22-2013, 02:42 PM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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.
 
Old 01-22-2013, 03:58 PM   #5
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
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.
 
Old 01-24-2013, 11:25 AM   #6
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
So if I wanted to mount my Maildir to ram I could do
Code:
mkfs -q /dev/ram1 1000000000
mkdir ~/storage
mv ~/Maildir ~/storage
mkdir ~/Maildir
mount /dev/ram1 ~/Maildir
cp -rp ~/storage/Maildir/* ~/Maildir
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?

-Tristan
 
Old 01-24-2013, 12:55 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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?
 
Old 01-24-2013, 03:08 PM   #8
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
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.

-Tristan
 
1 members found this post helpful.
Old 01-24-2013, 03:08 PM   #9
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Original Poster
Rep: Reputation: 70
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.

-Tristan
 
1 members found this post helpful.
Old 01-25-2013, 03:11 AM   #10
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to let MUTT create 10 TXT files of the last Emails? frenchn00b Linux - General 1 03-07-2010 03:31 AM
delete one day old emails through mutt comnand line chramesh19 Programming 0 12-27-2007 02:30 AM
Mutt stopped sending emails without an error ille.pugil42 Linux - Software 1 06-23-2006 03:45 PM
mutt bouncing replies to emails pbaumgar Linux - Software 0 08-18-2004 09:12 PM
How to get emails in my yahoo.com or sina.com by using mutt or mail? whepin Linux - General 2 12-31-2001 06:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration