首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >多个帐户

多个帐户
EN

Unix & Linux用户
提问于 2013-08-13 14:17:32
回答 1查看 3.4K关注 0票数 3

我在这个网站上的第一个问题,我很快就来了。

我喜欢命令行工具和基于文本的应用程序。我用tmux和一个极简贴图wm是定量的,我不能改变环境。我是一个开发人员,我主要使用Python和Perl。

我的第一个问题是关于一个伟大的客户。我使用侧栏来显示邮箱。我在google帐户中使用了imap,下面是我的配置:

代码语言:javascript
复制
account-hook . 'unset preconnect imap_user imap_authenticators'

#First account
account-hook 'imaps://hobbestigrou@domain.com@imap.gmail.com:993/' \
   ' set imap_user = "hobbestigrou@domain.com" \
     imap_pass = "password" '

folder-hook 'imaps://hobbestigrou@domain.com@imap.gmail.com:993/INBOX' \
    ' set imap_user = "hobbestigrou@domain.com" \
      imap_pass = "1password" \
      smtp_url = "smtp://hobbestigrou@domain.com@smtp.gmail.com:587/" \
      smtp_pass = "password" \
      from = "hobbestigrou@domain.com" \
      realname = "Natal Ngétal" \
      folder = "imaps://hobbestigrou@domain.com@imap.gmail.com:993" \
      spoolfile = "+INBOX" \
      postponed="+[Gmail]/Drafts" \
      mail_check=60 \
      imap_keepalive=300 '

#Second account
account-hook 'imaps://hobbestigrou@domain2.com@imap.gmail.com:993/' \
    ' set imap_user = "hobbestigrou@domain2.com" \
      imap_pass = "password" '

folder-hook 'imaps://hobbestigrou@domain2.com@imap.gmail.com:993/INBOX' \
    ' set imap_user = "hobbestigrou@domain2.com" \
      imap_pass = "password" \
      smtp_url = "smtp://hobbestigrou@domain2.com@smtp.gmail.com:587/" \
      smtp_pass = "password" \
      from = "hobbestigrou@domain2.com" \
      realname = "Natal Ngétal" \
      folder = "imaps://hobbestigrou@domain2.com@imap.gmail.com:993" \
      spoolfile = "+INBOX" \
      postponed="+[Gmail]/Drafts" \
      mail_check=60 \
      imap_keepalive=300 '

mailboxes + 'imaps://hobbestigrou@domain.com@imap.gmail.com:993/INBOX' \
          + 'imaps://hobbestigrou@dmain2.com@imap.gmail.com:993/INBOX' \
          + 'imaps://hobbestigrou@domain.com@imap.gmail.com:993/[Gmail]/Messages envoyés' \
          + 'imaps://hobbestigrou@domain2.com@imap.gmail.com:993/[Gmail]/Messages envoyés' \
          + 'imaps://hobbestigrou@domain.com@imap.gmail.com:993/[Gmail]/Spam' \
          + 'imaps://hobbestigrou@domain2.com@imap.gmail.com:993/[Gmail]/Spam' \
          + 'imaps://hobbestigrou@domain.com@imap.gmail.com:993/Divers' \
          + 'imaps://hobbestigrou@domain2.com@imap.gmail.com:993/Divers' \
          + 'imaps://hobbestigrou@domain.com@imap.gmail.com:993/[Gmail]/Tous les messages' \
          + 'imaps://hobbestigrou@domain2.com@imap.gmail.com:993/[Gmail]/Tous les messages'

# Where to put the stuff
set header_cache = "~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file = "~/.mutt/certificates"


set mail_check = 30
set move = no
set imap_keepalive = 900
set editor = "vim"

set date_format = "%D %R"
set index_format = "[%Z]  %D  %-20.20F  %s"
set sort = threads                         # like gmail
set sort_aux = reverse-last-date-received  # like gmail
set uncollapse_jump                        # don't collapse on an unread message
set sort_re                                # thread based on regex
set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"

bind index gg       first-entry
bind index G        last-entry

bind index R        group-reply
bind index <tab>    sync-mailbox
bind index <space>  collapse-thread

# Ctrl-R to mark all as read
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mar

# Saner copy/move dialogs
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"

bind index \CP sidebar-prev
bind index \CN sidebar-next
bind index \CO sidebar-open
bind pager \CP sidebar-prev
bind pager \CN sidebar-next
bind pager \CO sidebar-open

set pager_index_lines = 10 # number of index lines to show
set pager_context = 3      # number of context lines to show
set pager_stop             # don't go to next message automatically
set menu_scroll            # scroll in menus
set tilde                  # show tildes like in vim
unset markers              # no ugly plus signs

bind pager k  previous-line
bind pager j  next-line
bind pager gg top
bind pager G  bottom

bind pager R  group-reply

set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
auto_view text/html                                      # view html automatically
alternative_order text/plain text/enriched text/html

set sidebar_delim   = '│'
set sidebar_visible = yes
set sidebar_width   = 24

set status_chars  = " *%A"
set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postpone

set beep_new             # bell on new mails
unset mark_old           # read/new is good enough for me

color normal    white black
color attachment brightyellow black
color hdrdefault cyan black
color indicator black cyan
color markers    brightred black
color quoted    green black
color signature cyan black
color status    brightgreen blue
color tilde    blue black
color tree    red black

color index    red black ~D
color index    magenta black ~T


set signature="~/.signature"

因此,它的工作很好,我可以看到我的收件箱和当有新的帖子在其中。但是当我打开它第一次打开一个本地的盒子,我不明白为什么,并且看到新的帖子在其他收件箱,我必须首先移动在其中的每一个。也许这是正常的,但如何让狗狗打开domain.com,例如,首先,而不是一个不存在的本地的。

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2013-08-13 14:59:19

很难看出您正在尝试做什么,但是您是否有可能在全局上下文中寻找$spoolfile变量/配置设置?

我不知道它如何与Mutt的IMAP支持交互,但它允许您设置默认情况下启动Mutt时将打开的文件夹。

看起来您在帐户文件夹钩子中设置了它,但是您需要在这些钩子之外设置它,以便在输入文件夹钩子文件夹之前应用它。

尝试将以下内容添加到~/..muttrc的末尾,看看是否有帮助:

代码语言:javascript
复制
set spoolfile="imaps://hobbestigrou@domain.com@imap.gmail.com:993/INBOX"
票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/86583

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档