[neomutt-users] gmail+imap+oauth

Sven Guckes neomutt-lists at guckes.net
Sun Dec 20 06:17:55 CET 2020

just wondering..
is it really necessary to go through all those hoops
to get to the gmail account with (neo)mutt these days?

disabling "secure apps", downloading a python script,
integrating this into the setup, requesting
additional credentials, generating a token.. wtf?

it might all be so very much secure, but it  sure is not
so easy to teach somebody to using (neo)mutt with gmail. :-(

just what has become of the "host+user+pass" setup?

or is there some workaround like forwarding all mails
to the gmail account to yet another mail address?
(or like "keep a copy, send on a copy"?)




Preliminary OAUTH support for IMAP, POP, and SMTP is provided via external scripts.

At least for Gmail, you can use the oauth2.py script from Google's gmail-oauth2-tools:

You'll need to get your own oauth client credentials for Gmail here:

Then, you'd use oauth2.py with --generate_oauth2_token
to get a refresh token, and configure NeoMutt with:

  set imap_authenticators="oauthbearer"
  set imap_oauth_refresh_command="/path/to/oauth2.py --quiet --user=[email_address]\
      --client_id=[client_id] --client_secret=[client_secret]\

Substitute pop or smtp for imap in the above example to configure for those.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1495 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-users-neomutt.org/attachments/20201220/c5548e21/attachment.sig>

More information about the neomutt-users mailing list