Skip to content

Instantly share code, notes, and snippets.

@villeheilala
Last active November 2, 2023 12:24
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save villeheilala/91398dcf3f8ffa1bc6f34595836f921b to your computer and use it in GitHub Desktop.
Save villeheilala/91398dcf3f8ffa1bc6f34595836f921b to your computer and use it in GitHub Desktop.
Minimal configuration for Neomutt/Mutt and Gmail/G Suite
# A minimal configuration for Neomutt/Mutt and Gmail/G Suite
# For more information, see:
# https://heilala.medium.com/command-line-email-with-neomutt-and-gmail-d558864ac3c8?source=friends_link&sk=4dbd90b6b7aebca3bce8d94c9a053168
# Decrypts passwords quietly
# see: https://wiki.archlinux.org/index.php/Mutt#Passwords_management
source "gpg -dq $HOME/.my-pwds.gpg |"
# Username and password for your Gmail/G Suite account
set imap_user = "john.snow@winterfell.ext"
# Password assigned from decrypted file
set imap_pass = $my_pass
# Specifies the default location of your mailboxes
set folder = "imaps://imap.gmail.com:993"
# Configure Simple Mail Transfer Protocol for sending mail
# for Gmail
set smtp_url = "smtps://yourusername@smtp.gmail.com:587"
# for G Suite with own domain
#set smtp_url = "smtps://yourusername@yourdomain.ext@smtp.gmail.com:587"
set smtp_pass = $my_pass
# Location of inbox
set spoolfile = "+INBOX"
# Location of drafts
set postponed = "+[GMail]/Drafts"
# Activate caching, as it can greatly improve speed
set header_cache = "~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
# Disable saving outgoing mail since Gmail saves them by default.
set record = ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment