web-dev-qa-db-ja.com

Gmailを使用したMuttは送信されたメールを保存しません

GmailでMuttを設定しました。 muttからメールを送信すると、Gmailの送信済みメールに保存されません。 Muttからメールを送信すると、Gmail Sent Mailに保存されるようにするにはどうすればよいですか?

私の.muttrc

set imap_user = '[email protected]'
set imap_pass = 'mypass'
set spoolfile = imaps://imap.gmail.com:993/INBOX
set folder = imaps://imap.gmail.com:993
# set record="imaps://imap.gmail.com/[Gmail]/Sent Mail"
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
set message_cachedir="~/.mutt/cache/bodies"
auto_view text/html
set editor = "vim"
set header_cache = ~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies

set smtp_url="smtps://[email protected]@smtp.gmail.com:465/"
set smtp_pass="mypass"
set smtp_authenticators = 'gssapi:login'
set content_type=text/html

set move=no

set sort='reverse-threads'
set sort_aux='last-date-received'
set imap_check_subscribed

ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"

# mutt sidebar settings
# set up the sidebar
set sidebar_width=25
set sidebar_delim='|'
set sidebar_sort=yes

# which mailboxes to list in the sidebar
mailboxes =inbox =ml

macro index,pager <up> "<sidebar-prev>" "previous folder in sidebar"
macro index,pager <down> "<sidebar-next>" "next folder in sidebar"
macro index,pager <right> "<sidebar-open>" "open folder in sidebar"
# b toggles sidebar visibility
set sidebar_visible = no
macro index b '<enter-command>toggle sidebar_visible<enter><refresh>'
macro pager b '<enter-command>toggle sidebar_visible<enter><redraw-screen>'

# Remap bounce-message function to “B”
bind index B bounce-message
# Compose View Options -------------------------------
set realname = "My real name"      # who am i?
set from="mygmail"
set use_from=yes
set envelope_from=yes               # which from?
set edit_headers=yes              # show headers when composing
set askcc=yes                     # ask for CC:
set forward_format = "Fwd: %s"       # format of subject when forwarding
set attribution = "On %d, %n wrote:" # format of quoting header
set include=yes                     # include message in replies
set forward_quote=yes               # include message in forwards

# goobook
set query_command="goobook query '%s'"

# Gmail-style keyboard shortcuts
macro index ga "<change-folder>=[Gmail]/All Mail<enter>" "Go to all mail"
macro index Gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"
macro index gi "<change-folder>=INBOX<enter>" "Go to inbox"
macro index gs "<change-folder>=[Gmail]/Starred<enter>" "Go to starred messages"
macro index gt "<change-folder>=[Gmail]/Trash<enter>" "Go to trash"
macro index,pager d "<save-message>=[Gmail]/Trash<enter><enter>" "Trash"
macro index,pager y "<save-message>=[Gmail]/All Mail<enter><enter>" "Archive"

# For saving attachements to dir
macro attach W <save-entry><kill-line>~/.mutt/attachments/
macro attach E <save-entry><kill-line>~/.mutt/attachments/<enter>

# to see links
macro pager \cb <pipe-entry>'urlview'<enter> 'Follow links with urlview'

# viewing HTML
set mailcap_path  = ~/.mutt/mailcap
# default to text when available and use w3m/lynx only when no text version is availble in the email
alternative_order text/plain text/html

macro attach 'V' "<pipe-entry>cat >~/.cache/mutt/mail.html && $BROWSER ~/.cache/mutt/mail.html && rm ~/.cache/mutt/mail.html<enter>"
1
shinokada

デフォルトでは、muttは送信メッセージのコピーを~/sent、つまりローカルシステムに書き込みます。

recordの設定をコメントアウトしました。これは、デフォルトが使用されることを意味します。その行を有効にして、必要な動作を取得します。

set record="imaps://imap.gmail.com/[Gmail]/Sent Mail"

おそらく:993が必要ですが、folder値でも指定するので、次のようになります。

set record="imaps://imap.gmail.com:993/[Gmail]/Sent Mail"
1
wurtel