commit 9846330d3b7d3625620dfbbacaf8824fb2e443c3 (tree)
parent eb9c7b9d75f9c51b624d1fc287b7adbda64fbaa4
Author: Motiejus Jakštys <motiejus@uber.com>
Date: Wed, 28 Oct 2020 09:05:42 +0200
mutt and mbsync
Diffstat:
5 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -7,3 +7,5 @@
/vim/.vim/spell/*.spl
/vim/.vim/tags
/vim/.vim/view/
+
+/mail/.cache/mutt/
diff --git a/mail/.cache/.gitkeep b/mail/.cache/.gitkeep
diff --git a/mail/.mbsyncrc b/mail/.mbsyncrc
@@ -5,10 +5,7 @@ User desired.mta@gmail.com
PassCmd "cat .email.txt"
# Use SSL
SSLType IMAPS
-# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section.
CertificateFile /etc/ssl/certs/ca-certificates.crt
-#CertificateFile ~/.cert/imap.gmail.com.pem
-#CertificateFile ~/.cert/Equifax_Secure_CA.pem
IMAPStore gmail-remote
Account desired.mta_gmail
@@ -23,7 +20,7 @@ Channel desired_mta.gmail
Master :gmail-remote:
Slave :gmail-local:
# Exclude everything under the internal [Gmail] folder, except the interesting folders
-Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"
+Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred"
# Or include everything
#Patterns *
# Automatically create missing mailboxes, both locally and on the server
diff --git a/mail/.mutt/mailcap b/mail/.mutt/mailcap
@@ -1 +1,3 @@
text/html; elinks -dump ; copiousoutput;
+application/*; xdg-open %s &> /dev/null &;
+image/*; xdg-open %s &> /dev/null &;
diff --git a/mail/.muttrc b/mail/.muttrc
@@ -1,8 +1,12 @@
set mbox_type=Maildir
-set folder=~/.mail/desired.mta_gmail
-set spoolfile=+/
-set header_cache=~/.cache/mutt
-set postponed = +[Gmail]/Drafts
+set spoolfile="~/.mail/desired.mta_gmail/Inbox"
+set folder="~/.mail/desired.mta_gmail"
+set mask=".*"
+set header_cache=~/.cache/mutt/hdr_cache
+set postponed="+[Gmail]/Drafts"
+
+mailboxes +Inbox +Debian +Trash +chgf +wireguard "+[Gmail]/Sent Mail" "+[Gmail]/Starred"
+
set mailcap_path = ~/.mutt/mailcap
auto_view text/html
alternative_order text/plain text/html
@@ -10,12 +14,12 @@ macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt/mail.html<
unset record
set send_charset="utf-8"
macro pager \cb <pipe-entry>'urlview'<enter> 'Follow links with urlview'
-set sort=threads
+set sort_browser=date
+set sort=reverse-threads
set sort_aux=last-date-received
-set sidebar_visible = yes
-bind pager j next-line
-bind pager k previous-line
+bind pager \Ce next-line
+bind pager \Cy previous-line
bind attach,index,pager \CD next-page
bind attach,index,pager \CU previous-page
bind pager g top
@@ -23,3 +27,14 @@ bind pager G bottom
bind attach,index g first-entry
bind attach,index G last-entry
bind index,pager B sidebar-toggle-visible
+
+set sidebar_visible = yes
+set sidebar_width = 20
+# Move the highlight to the previous mailbox
+bind index,pager \Cp sidebar-prev
+# Move the highlight to the next mailbox
+bind index,pager \Cn sidebar-next
+# Open the highlighted mailbox
+bind index,pager \Co sidebar-open
+# Toggle the visibility of the Sidebar.
+bind index,pager B sidebar-toggle-visible