Skip to content

Instantly share code, notes, and snippets.

@lucmann
Last active May 28, 2024 01:16
Show Gist options
  • Save lucmann/d2406fa22ec3887dfd1dbeaa23f80452 to your computer and use it in GitHub Desktop.
Save lucmann/d2406fa22ec3887dfd1dbeaa23f80452 to your computer and use it in GitHub Desktop.
mutt config
set from="luc@sietium.com"
set realname="Luc Ma"
# ==================== IMAP =============================
set imap_user = "onion0709@gmail.com"
# git-send-email
# set imap_pass = "xxxx xxxx xxxx xxxx"
# App specific password - mutt
set imap_pass = "xxxx xxxx xxxx xxxx"
# Fetch the set of subscribed folders from the server on connection
set imap_check_subscribed = yes
# ==================== SMTP =============================
# no need for port number
set smtp_url = "smtp://onion0709@smtp.gmail.com"
# set smtp_url="smtp://onion0709@smtp.gmail.com:587"
# set smtp_url="smtps://onion0709@smtp.gmail.com:465/"
set smtp_pass = $imap_pass
# seems like the authenticator is plain by default
# set smtp_authenticators = "plain"
# ==================== Remote Gmail Folders =============================
set folder = "imaps://imap.gmail.com"
set spoolfile = "+INBOX"
set postponed = "+[Gmail]/Drafts"
set record = "+[Gmail]/Sent Mail"
set trash = "+[Gmail]/Trash"
# migrate Gmail labels to mutt
mailboxes ="All Mail" ="Sent Mail"
# no idea how these settings alter the behavior of Mutt
# set header_cache="~/.mutt/cache/headers"
# set message_cachedir="~/.mutt/cache/bodies"
# set certificate_file="~/.mutt/certificates"
# ==================== Common =============================
# require all connections with remote servers to be ENCRYPTED
set ssl_force_tls = yes
# no idea what it is for
# set ssl_starttls=yes
# limit the frequency of updates by mutt
set mail_check = 60
# Mutt updates the status of all directories every time an keyboard input
# is received. If no user input is received during the amount of time specified,
# the update operation takes place anyway
set timeout = 10
# By default emails are sorted by date in ASCENDING order, so newer emails
# will be displayed at the bottom
# Let's group emails by conversation/thread
set sort = reverse-threads
set sort_aux = last-date-received
# Sidebar
set sidebar_visible = yes
set sidebar_width = 24
bind index,pager <down> sidebar-next
bind index,pager <up> sidebar-prev
bind index,pager <right> sidebar-open
# will be asked to confirm if we are going to send a message without subject
set abort_nosubject = ask-yes
# ==================== Composition =============================
set editor = "nvim"
set edit_headers = yes
set send_charset = "us-ascii:utf-8"
set charset = UTF-8
set use_from = yes
unset use_domain
# ==================== Key Bindings =============================
# Avoid conflicts with defaults bindings
bind index,pager g noop
# Go to folder
macro index,pager gi "<change-folder>=INBOX<enter>" "open INBOX"
macro index,pager gd "<change-folder>=dri<enter>" "open [Gmail]/dri"
macro index,pager gr "<change-folder>=riscv<enter>" "open [Gmail]/riscv"
macro index,pager gn "<change-folder>=nouveau<enter>" "open [Gmail]/nouveau"
macro index,pager gs "<change-folder>=[Gmail]Starred<enter>" "open [Gmail]/Starred"
# index - where the mails are listed
bind index gg first-entry
bind index G last-entry
# pager - where the contents of the message are displayed
bind pager [ previous-unread
bind pager ] next-unread
bind pager G bottom
bind pager gg top
bind pager k previous-line
bind pager j next-line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment