dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit 3d038016f1c0e18529d51edbf749d3e26afa75f9
parent 89c82c02b91116e5ddda1fef3885c3f4fa03527a
Author: Chris Bracken <chris@bracken.jp>
Date:   Mon, 23 Aug 2021 09:10:26 -0700

Use gmail address in mutt, mbsync

This switches the default account for mutt and mbsync, but preserves the
bracken.jp account for sending via msmtp.

Diffstat:
M.config/msmtp/config | 12+++++++++---
M.config/mutt/muttrc | 31++++++++++++++++---------------
M.mbsyncrc | 88+++++++++++++++++++++++++++++++++++++++----------------------------------------
3 files changed, 68 insertions(+), 63 deletions(-)

diff --git a/.config/msmtp/config b/.config/msmtp/config @@ -1,11 +1,17 @@ defaults auth on tls on -#tls_trust_file /etc/ssl/certs/ca-certificates.crt -#tls_trust_file ~/.homebrew/etc/openssl/cert.pem tls_trust_file /usr/local/share/certs/ca-root-nss.crt -# Gmail +# chris.bracken@gmail.com +account gmail +host smtp.gmail.com +port 587 +from chris.bracken@gmail.com +user chris.bracken@gmail.com +passwordeval gpg --batch -d ~/src/cfg/keyring/msmtp.gmail.gpg + +# chris@bracken.jp account bracken_jp host smtp.gmail.com port 587 diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc @@ -14,22 +14,23 @@ set reverse_alias = yes source $alias_file # Account Settings ----------------------------------- -# Default inbox. -set spoolfile = "+chris-bracken.jp/INBOX" +set my_maildir = 'chris.bracken-gmail.com' # Alternate email addresses. alternates chris@bracken.jp +# Core mailboxes. +set spoolfile = "+$my_maildir/INBOX" +set mbox = "+$my_maildir/archive" +set postponed = "+$my_maildir/drafts" +set record = "+$my_maildir/sent" + # Mailboxes to show in the sidebar. -mailboxes +chris-bracken.jp/INBOX \ - +chris-bracken.jp/archive \ - +chris-bracken.jp/sent \ - +chris-bracken.jp/drafts +mailboxes +$my_maildir/INBOX \ + +$my_maildir/archive \ + +$my_maildir/sent \ + +$my_maildir/drafts -# Other special folders. -set mbox = "+chris-bracken.jp/archive" -set postponed = "+chris-bracken.jp/drafts" -set record = "+chris-bracken.jp/sent" # Basic Options -------------------------------------- set wait_key = no # don't prompt for <enter> so much @@ -70,13 +71,13 @@ bind index R group-reply bind index ? search-opposite bind index <space> collapse-thread macro index a "<limit>all\n" "show all messages (undo limit)" -macro index o "<shell-escape>mbsync bracken_jp; notmuch new<enter>" "sync core mailboxes" +macro index o "<shell-escape>mbsync gmail; notmuch new<enter>" "sync core mailboxes" 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" -macro index gi "<change-folder>=chris-bracken.jp/INBOX<enter>" "Go to Inbox" -macro index ga "<change-folder>=chris-bracken.jp/archive<enter>" "Go to All Mail" -macro index gs "<change-folder>=chris-bracken.jp/sent<enter>" "Go to Sent Mail" -macro index gd "<change-folder>=chris-bracken.jp/drafts<enter>" "Go to Drafts" +macro index gi "<change-folder>=$my_maildir/INBOX<enter>" "Go to Inbox" +macro index ga "<change-folder>=$my_maildir/archive<enter>" "Go to All Mail" +macro index gs "<change-folder>=$my_maildir/sent<enter>" "Go to Sent Mail" +macro index gd "<change-folder>=$my_maildir/drafts<enter>" "Go to Drafts" macro index S "<enter-command>unset wait_key<enter><shell-escape>~/.config/mutt/mutt-notmuch-py -G ~/Mail/.tmp/search<enter><change-folder-readonly>+.tmp/search<enter>" "search mail (using notmuch)" # Pager View Options --------------------------------- diff --git a/.mbsyncrc b/.mbsyncrc @@ -10,88 +10,86 @@ # 送信済みメール '[Gmail]/&kAFP4W4IMH8w4TD8MOs-' '[Gmail]/Sent Mail' # スター付き '[Gmail]/&MLkwvzD8TtgwTQ-' '[Gmail]/Starred' # ゴミ箱 '[Gmail]/&MLQw33ux-' '[Gmail]/Bin' -# すべてのメール '[Gmail]/&MFkweTBmMG4w4TD8MOs-' '[Gmail]/All Mail' +# すべてのメール '[Gmail]/&MFkweTBmMG4w4TD8MOs-' '[Gmail]/All mail' # 迷惑メール '[Gmail]/&j,dg0TDhMPww6w-' '[Gmail]/Spam' # 重要 '[Gmail]/&kc2JgQ-' '[Gmail]/Important' ###################################################################### -# chris@bracken.jp +# chris.bracken@gmail.com -IMAPAccount bracken_jp +IMAPAccount gmail Host imap.gmail.com Port 993 -User chris@bracken.jp -PassCmd "gpg -q --batch -d ~/src/cfg/keyring/mbsync.bracken_jp.gpg" +User chris.bracken@gmail.com +PassCmd "gpg -q --batch -d ~/src/cfg/keyring/mbsync.gmail.gpg" AuthMechs LOGIN SSLType IMAPS PipelineDepth 50 -#CertificateFile ~/.homebrew/etc/openssl/cert.pem -#CertificateFile /etc/ssl/certs/ca-certificates.crt CertificateFile /usr/local/share/certs/ca-root-nss.crt -# Create bracken.jp remote -IMAPStore bracken_jp-remote -Account bracken_jp +# Create gmail remote +IMAPStore gmail-remote +Account gmail -# Create bracken.jp local -MaildirStore bracken_jp-local -Path ~/Mail/chris-bracken.jp/ -Inbox ~/Mail/chris-bracken.jp/INBOX +# Create gmail local +MaildirStore gmail-local +Path ~/Mail/chris.bracken-gmail.com/ +Inbox ~/Mail/chris.bracken-gmail.com/INBOX Flatten "." -Channel bracken_jp-default -Master :bracken_jp-remote: -Slave :bracken_jp-local: +Channel gmail-default +Far :gmail-remote: +Near :gmail-local: Patterns "INBOX" -Create Slave +Create Near Expunge Both CopyArrivalDate yes SyncState * -Channel bracken_jp-drafts -Master :bracken_jp-remote:"[Gmail]/Drafts" -Slave :bracken_jp-local:"drafts" -Create Slave +Channel gmail-drafts +Far :gmail-remote:"[Gmail]/Drafts" +Near :gmail-local:"drafts" +Create Near Expunge Both CopyArrivalDate yes SyncState * -Channel bracken_jp-sent -Master :bracken_jp-remote:"[Gmail]/Sent Mail" -Slave :bracken_jp-local:"sent" -Create Slave +Channel gmail-sent +Far :gmail-remote:"[Gmail]/Sent Mail" +Near :gmail-local:"sent" +Create Near Expunge Both CopyArrivalDate yes SyncState * -Channel bracken_jp-starred -Master :bracken_jp-remote:"[Gmail]/Starred" -Slave :bracken_jp-local:"flagged" -Create Slave +Channel gmail-starred +Far :gmail-remote:"[Gmail]/Starred" +Near :gmail-local:"flagged" +Create Near Expunge Both CopyArrivalDate yes SyncState * -Channel bracken_jp-trash -Master :bracken_jp-remote:"[Gmail]/Bin" -Slave :bracken_jp-local:"trash" -Create Slave +Channel gmail-trash +Far :gmail-remote:"[Gmail]/Bin" +Near :gmail-local:"trash" +Create Near Expunge Both CopyArrivalDate yes SyncState * -Channel bracken_jp-archive -Master :bracken_jp-remote:"[Gmail]/All Mail" -Slave :bracken_jp-local:"archive" -Create Slave +Channel gmail-archive +Far :gmail-remote:"[Gmail]/All mail" +Near :gmail-local:"archive" +Create Near Expunge Both CopyArrivalDate yes SyncState * -Group bracken_jp -Channel bracken_jp-default -Channel bracken_jp-drafts -Channel bracken_jp-sent -Channel bracken_jp-starred -Channel bracken_jp-trash -Channel bracken_jp-archive +Group gmail +Channel gmail-default +Channel gmail-drafts +Channel gmail-sent +Channel gmail-starred +Channel gmail-trash +Channel gmail-archive