From: Samir Benmendil Date: Mon, 19 Mar 2018 09:28:06 +0000 (+0000) Subject: mutt: support switching between accounts X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/858fddc133c9da4bd095c33f45eafa66c37f0488 mutt: support switching between accounts --- diff --git a/mutt/accounts/chakra b/mutt/accounts/chakra index c6a69f4..caa05d4 100644 --- a/mutt/accounts/chakra +++ b/mutt/accounts/chakra @@ -1,3 +1,4 @@ # vim: ft=muttrc +source gmail set realname = "Ram-Z" set from = "ram-z@chakralinux.org" diff --git a/mutt/accounts/gmail b/mutt/accounts/gmail index 9925c35..69458e0 100644 --- a/mutt/accounts/gmail +++ b/mutt/accounts/gmail @@ -1,3 +1,23 @@ # vim: ft=muttrc set realname = "Samir Benmendil" set from = "me@rmz.io" +my_hdr Bcc: sent@rmz.io +set sendmail = "msmtp -a gmail" + +set spoolfile = "+gmail/inbox" # set inbox +set postponed = "+gmail/drafts" # drafts folder +unset record # do not move sent msgs to a folder, gmail does that +unset move # do not move read msgs, gmail does that + +mailboxes "+gmail/inbox" +mailboxes "+gmail/sent" +mailboxes "+gmail/youtube" +mailboxes "+gmail/archive" +mailboxes "+gmail/drafts" +mailboxes "+gmail/spam" +mailboxes "+gmail/bin" + +macro index,pager gi "=gmail/inbox" "go to inbox" +macro index,pager gy "=gmail/youtube" "go to youtube" +macro index,pager ga "=gmail/archive" "go to archive" +macro index,pager gs "=gmail/spam" "go to spam" diff --git a/mutt/accounts/office365 b/mutt/accounts/office365 index b90ae5c..553b7e5 100644 --- a/mutt/accounts/office365 +++ b/mutt/accounts/office365 @@ -2,3 +2,20 @@ set realname = "Samir Benmendil" set from = "samir.benmendil@ultrahaptics.com" my_hdr Bcc: samir.benmendil@ultrahaptics.com +set sendmail = "msmtp -a office365" + +set spoolfile = "+office365/inbox" # set inbox +set postponed = "+office365/drafts" # drafts folder +unset record # do not move sent msgs to a folder, gmail does that +unset move # do not move read msgs, gmail does that + +mailboxes "+office365/inbox" +mailboxes "+office365/sent" +mailboxes "+office365/archive" +mailboxes "+office365/drafts" +mailboxes "+office365/spam" +mailboxes "+office365/bin" + +macro index,pager gi "=office365/inbox" "go to inbox" +macro index,pager ga "=office365/archive" "go to archive" +macro index,pager gs "=office365/spam" "go to spam" diff --git a/mutt/bindings b/mutt/bindings index fcbad23..617e933 100644 --- a/mutt/bindings +++ b/mutt/bindings @@ -14,11 +14,6 @@ bind pager g noop bind pager gg top bind pager G bottom -macro index,pager gi "=gmail/inbox" "go to inbox" -macro index,pager gy "=gmail/youtube" "go to youtube" -macro index,pager ga "=gmail/archive" "go to archive" -macro index,pager gs "=gmail/spam" "go to spam" - bind index q noop bind index,pager Q noop bind index,pager x noop @@ -53,3 +48,6 @@ bind attach view-mailcap # add sender to goobook macro index,pager a "goobook add" "add the sender address to goobook" + +macro index,pager 'source $my_config_dir/accounts/gmail!' +macro index,pager 'source $my_config_dir/accounts/office365!' diff --git a/mutt/muttrc b/mutt/muttrc index 0d89878..090021a 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -78,12 +78,8 @@ set mailcap_path = $my_config_dir/mailcap auto_view text/html # view html automatically alternative_order text/plain text/enriched text/html # save html for last -# IMAP: offlineimap +# IMAP: mbsync set folder = "$MAILDIR" # mail folder -set spoolfile = "+gmail/inbox" # set inbox -unset record # do not move sent msgs to a folder, gmail does that -unset move # do not move read msgs, gmail does that -set postponed = "+gmail/drafts" # drafts folder set header_cache = "~/.cache/mutt" # cache headers for speedss source mailboxes # source mailboxes generetated by offlineimap