Email Configurations
Setting up with Gmail Account
First, create an App Password for Mutt.
Then edit your .muttrc
with these basic configurations
# User Info
set from = "user@gmail.com"
set realname = "User Name"
# Receive options
set imap_user = "user@gmail.com"
set imap_pass = "Gmail App Password for mutt"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "imaps://imap.gmail.com/INBOX"
set postponed ="+[Gmail]/Drafts"
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates
# Send optionns
set smtp_url = "smtps://user@gmail.com@smtp.gmail.com:465/"
set smtp_pass = "Gmail App Password for mutt"
set move = no
set imap_keepalive = 900
Ref:
- 📄 Check Gmail through other email platforms
- 📄 How to install/setup mutt with Gmail on CentOS and Ubuntu?
- 📺 Email on the terminal with mutt
Encrypting Passwords
GNUpg
For Debian based: sudo apt-get install gnupg gnupg-agent
For RPM based : sudo yum install gnupg gnupg-agent
Generate encryption key. Enter name, email and passphrase.
gpg --gen-key
Create a new file ~/.mutt/.pass
containing the password(s) in this format:
GMail: <password_goes_here>
Encrypt .pass
cd ~/.mutt
gpg --encrypt .pass
Then set imap and smtp password in your muttrc
set imap_pass = `gpg -d ~/.mutt/.pass.gpg | awk '/GMail:/ {print $2}'`
set smpt_pass = `gpg -d ~/.mutt/.pass.gpg | awk '/GMail:/ {print $2}'`
Delete your password footprint
shred ~/.mutt/.pass
rm ~/.mutt/.pass
Done!
Ref:
Resources
- 📄 Create a Gmail App Password
- 📄 Neomutt sample_neomuttrc
- 📄 Mutt-wizard
- 📄 Check Gmail through other email platforms
- 📄 How to install/setup mutt with Gmail on CentOS and Ubuntu?
- 📺 Email on the terminal with mutt
- 📄 Another way of encrypting IMAP/SMPT Passwords
- 📄 MUTT - encrypting password with GNUpg