Skip to contentSkip to conversation

Guide to setup mutt for Gmail

Outreachy tip Gilbert Adikankwu 3 participants 3 messages Oct 11, 2023

lore
Share & tools
lore
#0 lore raw

Hello,

This is a guide to setup mutt, the recommended text-based email client for the Outreachy Linux community.

If you have not read the newbies tutorial, please read it first to see the steps for the initial setup of mutt. This guide is a follow-up to the initial setup steps decribed in the newbies tutorial.

Here, you will learn how to setup your mutt to access emails in your Gmail inbox and reply to them.

Next, set up the mail client, mutt, with some defaults, by creating a .muttrc file in your /home and add the following lines to it:

set sendmail="/usr/bin/esmtp"
set envelope_from=yes
set from="Your name <[email protected]>"
set use_from=yes
set edit_headers=yes
set editor="vi"
set send_charset="us-ascii:utf-8"
set sort_aux = last-date-received
set sort = reverse-threads

# IMAP settings
set imap_user = "[email protected]"
set imap_pass = "mailbox/app password"

# SMTP settings
set smtp_url = "smtps://[email protected]" set smtp_pass = "mailbox/app password"

# Remote Gmail folders
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set record = "+[Gmail]/Sent Mail"
set trash = "+[Gmail]/Trash"
set postponed = "+[Gmail]/Drafts"

Note: The imap_pass and smtp_pass can be your App password or email password

I hopes this helps

Best wishes
Gilbert

#1 lore raw
Quoted 41 lines · Gilbert Adikankwu

Hello,

This is a guide to setup mutt, the recommended text-based email client for the Outreachy Linux community.

If you have not read the newbies tutorial, please read it first to see the steps for the initial setup of mutt. This guide is a follow-up to the initial setup steps decribed in the newbies tutorial.

Here, you will learn how to setup your mutt to access emails in your Gmail inbox and reply to them.

Next, set up the mail client, mutt, with some defaults, by creating a .muttrc file in your /home and add the following lines to it:

set sendmail="/usr/bin/esmtp"
set envelope_from=yes
set from="Your name <[email protected]>"
set use_from=yes
set edit_headers=yes
set editor="vi"
set send_charset="us-ascii:utf-8"
set sort_aux = last-date-received
set sort = reverse-threads

# IMAP settings
set imap_user = "[email protected]"
set imap_pass = "mailbox/app password"

# SMTP settings
set smtp_url = "smtps://[email protected]" set smtp_pass = "mailbox/app password"

# Remote Gmail folders
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set record = "+[Gmail]/Sent Mail"
set trash = "+[Gmail]/Trash"
set postponed = "+[Gmail]/Drafts"

Quoted 4 lines

Note: The imap_pass and smtp_pass can be your App password or email password

I hopes this helps

Thanks!

julia

#2 lore raw
In reply to Gilbert Adikankwu
Quoted 33 lines · Gilbert Adikankwu

Hello,

This is a guide to setup mutt, the recommended text-based email client for the Outreachy Linux community.

If you have not read the newbies tutorial, please read it first to see the steps for the initial setup of mutt. This guide is a follow-up to the initial setup steps decribed in the newbies tutorial.

Here, you will learn how to setup your mutt to access emails in your Gmail inbox and reply to them.

Next, set up the mail client, mutt, with some defaults, by creating a .muttrc file in your /home and add the following lines to it:

set sendmail="/usr/bin/esmtp"
set envelope_from=yes
set from="Your name <[email protected]>"
set use_from=yes
set edit_headers=yes
set editor="vi"
set send_charset="us-ascii:utf-8"
set sort_aux = last-date-received
set sort = reverse-threads

# IMAP settings
set imap_user = "[email protected]"
set imap_pass = "mailbox/app password"

# SMTP settings
set smtp_url = "smtps://[email protected]" set smtp_pass = "mailbox/app password"

Quoted 7 lines

# Remote Gmail folders
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set record = "+[Gmail]/Sent Mail"
set trash = "+[Gmail]/Trash"
set postponed = "+[Gmail]/Drafts"

Setting up the remote Gmail folders was particularly useful as I was stuck on how I would reach my inboxes from the mutt client. Good stuff Gilbert! Thanks for this tip :-)

Quoted 9 lines

Note: The imap_pass and smtp_pass can be your App password or email password

I hopes this helps

Best wishes
Gilbert