加速mutt打开文件夹的速度
授权方式:署名,非商业用途,保持一致,转载时请务必以超链接(http://www.fwolf.com/blog/post/306)的形式标明文章原始出处和作者信息及本声明。选择mutt之前,总听别人说mutt如何如何强大,能够管理上千上万封邮件,自己使用之后,的确是强大,也能管理超量的邮件(maildir存储格式),可是每次打开有几千封邮件的文件夹的时候,都要花费时间建立索引、排序,硬盘呼哧呼哧响一阵才打开。mutt难道不会缓存文件夹的信息么?今天查询过才知道,不是不知道,而是我没有发现
在muttrc中添加如下两句:
set maildir_header_cache_verify=no
第一句是设置邮件头缓存文件保存的位置,我指定的是一个目录,这样每个邮件目录都会在这个目录下建立一个缓存文件,也可以直接指定一个独立的文件;第二句是禁止对已缓存内容的校验,因为除了mutt我想我应该不会再用另外一个程序去修改mail目录下的内容。
现在,再次启动mutt,所有的邮件目录浏览一遍,第二次再打开的时候,就能够很快打开了,读取每一封邮件、解析邮件header信息的过程已经被缓存了,mutt只需要对邮件进行排序就可以了。除了缓存邮件header以外,针对imap、pop这些访问可能会比较慢的邮箱,还可以对邮件本身进行缓存,不过我没有测试过。
现在,结合目录层次的搭配,我想mutt管理几万封邮件还是非常轻松的。如果邮件再多些,应该就需要在目录划分等其他措施上进行优化了。
参考:
* The Mutt E-Mail Client - version 1.5.14 (2007-02-12)
* Speed up folder loading in mutt
* Using mutt’s header_cache feature
* maildir / imap header caching for mutt
* 15.1. Header caching(还介绍了缓存文件的默认命名规则)
![[Bloglines]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/bloglines.png)
![[co.mments]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/comments.png)
![[del.icio.us]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/digg.png)
![[diigo]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/diigo.png)
![[Facebook]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/facebook.png)
![[Furl]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/furl.png)
![[Google]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/google.png)
![[MySpace]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/myspace.png)
![[Reddit]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/reddit.png)
![[Rojo]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/rojo.png)
![[Slashdot]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/technorati.png)
![[Windows Live]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/email.png)