LinuxQuestions.org
Register a domain and help support LQ
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, 11:16 AM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,004

Rep: Reputation: 67
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, 11:26 AM   #2
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,508

Rep: Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800
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, 03:34 PM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,004

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

-Tristan
 
Old 01-22-2013, 03:42 PM   #4
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,508

Rep: Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800
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, 04:58 PM   #5
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,441

Rep: Reputation: 81
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 05:12 PM.
 
Old 01-24-2013, 12:25 PM   #6
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,004

Original Poster
Rep: Reputation: 67
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, 01:55 PM   #7
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,508

Rep: Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800
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, 04:08 PM   #8
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,004

Original Poster
Rep: Reputation: 67
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, 04:08 PM   #9
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,004

Original Poster
Rep: Reputation: 67
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, 04:11 AM   #10
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,508

Rep: Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:31 AM
delete one day old emails through mutt comnand line chramesh19 Programming 0 12-27-2007 03:30 AM
Mutt stopped sending emails without an error ille.pugil42 Linux - Software 1 06-23-2006 04:45 PM
mutt bouncing replies to emails pbaumgar Linux - Software 0 08-18-2004 10: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 07:35 AM


All times are GMT -5. The time now is 07:38 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration