6.4.1. 基础 MUA — Mutt

按如下所示的自定义 “~/.muttrc“ ,与 vim 结合使用邮件用户代理 (MUA) 软件 mutt

  1. #
  2. # User configuration file to override /etc/Muttrc
  3. #
  4. # spoof source mail address
  5. set use_from
  6. set hostname=example.dom
  7. set from="Name Surname <username@example.dom>"
  8. set signature="~/.signature"
  9. # vim: "gq" to reformat quotes
  10. set editor="vim -c 'set tw=72 et ft=mail'"
  11. # "mutt" goes to Inbox, while "mutt -y" lists mailboxes
  12. set mbox_type=Maildir # use qmail Maildir format for creating mbox
  13. set mbox=~/Mail # keep all mail boxes in $HOME/Mail/
  14. set spoolfile=+Inbox # mail delivered to $HOME/Mail/Inbox
  15. set record=+Outbox # save fcc mail to $HOME/Mail/Outbox
  16. set postponed=+Postponed # keep postponed in $HOME/Mail/postponed
  17. set move=no # do not move Inbox items to mbox
  18. set quit=ask-yes # do not quit by "q" only
  19. set delete=yes # always delete w/o asking while exiting
  20. set fcc_clear # store fcc as non encrypted
  21. # Mailboxes in Maildir (automatic update)
  22. mailboxes `cd ~/Mail; /bin/ls -1|sed -e 's/^/+/' | tr "\n" " "`
  23. unmailboxes Maillog *.ev-summary
  24. ## Default
  25. #set index_format="%4C %Z %{%b %d} %-15.15L (%4l) %s"
  26. ## Thread index with senders (collapse)
  27. set index_format="%4C %Z %{%b %d} %-15.15n %?M?(#%03M)&(%4l)? %s"
  28. ## Default
  29. #set folder_format="%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %f"
  30. ## just folder names
  31. set folder_format="%2C %t %N %f"

增加下面的内容到”/etc/mailcap“ 或 “~/.mailcap“ 来内镶显示 HTML 邮件和微软 Word 附件.

  1. text/html; lynx -force_html %s; needsterminal;
  2. application/msword; /usr/bin/antiword '%s'; copiousoutput; description="Microsoft Word Text"; nametemplate=%s.doc
[提示]提示

Mutt 能够作为 IMAP 客户端和 mailbox 格式转换器.你可以使用”t“, “T“等标识邮件.这些标识的邮件能够使用”;C“在不同的邮箱之间拷贝,并可以使用”;d“ 来一次性删除.