你的 .muttrc 里有什么?

发布于 2024-10-18 03:49:25 字数 370 浏览 1 评论 0原文

我刚刚开始使用 mutt(一开始是慢慢地剥离自己的 GUI 应用程序,最终我只是被困在终端窗口中),虽然我已经设法从我的 IMAP 服务器获取邮件,但还是有一些问题。我想做的自定义,主要是:

  1. 获取今天的邮件。

  2. 将所有内容保留在服务器上

  3. 不要在本地磁盘上保存任何内容

  4. 不要询问我是否要创建$USER/Mail文件夹。由于我也有常规邮件客户端,因此 mutt 只是从终端检查邮件的一种简单方法。

我不只是在这里问一个问题,我想我应该尝试找出更多关于你们可能拥有的一些很酷的技巧、配色方案和配置设置的信息,我可以在我的中使用它们。

I've just begun using mutt (what started out as slowly stripping myself of GUI applications, ended up with me just being holed inside a terminal window), and while I've managed to fetch my mail from my IMAP server, there are some customizations I'd like to do, mainly:

  1. Fetch today's mail.

  2. Leave everything on server

  3. Don't save anything ever on local disk

  4. Don't ask if I want to create a $USER/Mail folder. Since I also have my regular mail client, mutt is just an easy way to check mail from the terminal.

Instead of just asking a question here, I thought I'd try to find out more about some cool tricks, color schemes, and config settings you guys might have, that I can use in mine.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

零崎曲识 2024-10-25 03:49:25

以下是我对您的自定义的看法:

  1. 不确定如何实现这一目标,如果您切换到 IMAP 中的文件夹,mutt 将获取该文件夹的所有标头。只有当你强硬打开邮件时,它才会获取邮件。
  2. 由于您使用的是 IMAP,mutt 应该默认将所有内容保留在服务器上。仅当您明确要求删除时,它才会删除某些内容。或者也许我误解了你想要实现的目标?
  3. 通过禁用本地缓存应该可以实现这一点。有一个标头和一个消息缓存。请参阅 header-cachemessage-cachedir 了解更多信息。但请注意,禁用缓存会损害性能,因为每次切换目录时,mutt 都必须重新获取所有消息的标头。
  4. 在您的 muttrc 中,确保正确设置您的 folder 变量。如果我没记错的话 $USER/Mail 是默认值。如果您设置正确,mutt 不会在每次启动时要求您创建它。

这里是我的 mutt 配置的一些摘录:

set postpone=ask-no 
set beep_new=yes
set confirmappend=no
set sort=threads
set mail_check=60
set timeout=10
set net_inc=5
set move=no
set sort_alias=alias
set reverse_alias=yes
set alias_file=~/.mail_aliases
set editor='vim + -c "set textwidth=72" -c "set wrap"'
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
auto_view text/html application/pdf application/msword
alternative_order text/plain text text/enriched text/html
mime_lookup application/octet-stream
source $alias_file
set mbox_type=maildir
set ssl_starttls=yes
set folder=imaps://host:port
set spoolfile="+inbox"
set record="+sent/`date +%Y-%m`"
set postponed="+drafts"
ignore *
unignore  Date To Cc Bcc From Subject X-Mailer Organization User-Agent X-PGP-Key List-Id
hdr_order Date From To Cc Bcc Subject X-Mailer User-Agent Organization List-Id X-PGP-Key

以及我的配色方案:

# Default color definitions
color normal     white         default
color hdrdefault green         default
color quoted     green         default
color quoted1    yellow        default
color quoted2    red           default
color signature  cyan          default
color indicator  brightyellow  red 
color error      brightred     default
color status     brightwhite   blue
color tree       brightmagenta default
color tilde      brightblue    default
color attachment brightyellow  magenta
color markers    brightred     default
color message    white         default
color search     brightwhite   magenta
color bold       brightyellow  green

# Color definitions when on a mono screen
mono bold      bold
mono underline underline
mono indicator reverse
mono error     bold

# Colors for items in the reader
color header brightyellow default "^(From|Subject):"
color header brightcyan   default ^To:
color header brightcyan   default ^Cc:
mono  header bold                 "^(From|Subject):"

希望有帮助!

Here's what I can think of re your customizations:

  1. Not sure how you'd be able to achieve that, if you switch to a folder in IMAP mutt will fetch all the headers of that folder. It will only fetch a mail once you open it tough.
  2. Since you are using IMAP, mutt should leave everything on the server by default anyway. It will only delete something if you specifically request deletion. Or maybe I'm misunderstanding what you're trying to achieve?
  3. That should be possible by disabling the local cache. There's a header and a message cache. See header-cache and message-cachedir for more info. But note that disabling the caches will hurt the performance, because every time you switch a directory mutt will have to re-fetch the headers for all your messages.
  4. In your muttrc, make sure to set your folder variable correctly. If I remember correctly $USER/Mail is the default value. If you set it correctly mutt won't ask you to create it every time you start it.

And here are some excerpts from my mutt config:

set postpone=ask-no 
set beep_new=yes
set confirmappend=no
set sort=threads
set mail_check=60
set timeout=10
set net_inc=5
set move=no
set sort_alias=alias
set reverse_alias=yes
set alias_file=~/.mail_aliases
set editor='vim + -c "set textwidth=72" -c "set wrap"'
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
auto_view text/html application/pdf application/msword
alternative_order text/plain text text/enriched text/html
mime_lookup application/octet-stream
source $alias_file
set mbox_type=maildir
set ssl_starttls=yes
set folder=imaps://host:port
set spoolfile="+inbox"
set record="+sent/`date +%Y-%m`"
set postponed="+drafts"
ignore *
unignore  Date To Cc Bcc From Subject X-Mailer Organization User-Agent X-PGP-Key List-Id
hdr_order Date From To Cc Bcc Subject X-Mailer User-Agent Organization List-Id X-PGP-Key

And my color scheme:

# Default color definitions
color normal     white         default
color hdrdefault green         default
color quoted     green         default
color quoted1    yellow        default
color quoted2    red           default
color signature  cyan          default
color indicator  brightyellow  red 
color error      brightred     default
color status     brightwhite   blue
color tree       brightmagenta default
color tilde      brightblue    default
color attachment brightyellow  magenta
color markers    brightred     default
color message    white         default
color search     brightwhite   magenta
color bold       brightyellow  green

# Color definitions when on a mono screen
mono bold      bold
mono underline underline
mono indicator reverse
mono error     bold

# Colors for items in the reader
color header brightyellow default "^(From|Subject):"
color header brightcyan   default ^To:
color header brightcyan   default ^Cc:
mono  header bold                 "^(From|Subject):"

Hope that helps!

内心激荡 2024-10-25 03:49:25

我意识到这现在已经非常旧了,但是请查看Offlineimap 以将本地Maildir 设置后台同步到某处的IMAP 帐户。

http://offlineimap.org/

另外,日光配色方案也相当不错:

http://ethanschoonover.com/solarized

I realize this is super old now but check out offlineimap for background syncing of a local Maildir setup to an IMAP account somewhere.

http://offlineimap.org/

Also, the solarized color schemes are quite nice:

http://ethanschoonover.com/solarized

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文