Gmail configuration

Google passwords cannot be used directly. There is two ways to authenticate yourself:

Using App Passwords

This option is the simplest and the fastest. First, be sure that:

  • IMAP is enabled
  • Two-step authentication is enabled
  • Less secure app access is enabled

First create a dedicated password for Neverest.

[accounts.gmail]
folder.filter.exclude = ["All Mail"]

left.backend.type = "maildir"
left.backend.root-dir = "~/Mail/gmail"

right.backend.type = "imap"
right.backend.host = "imap.gmail.com"
right.backend.port = 993
right.backend.login = "clement.douin@gmail.com"

Running neverest configure -a gmail will ask for your IMAP password, just paste the one generated previously.

See the IMAP section for other way of managing your generated password.

Using OAuth 2.0

This option is the most secure but the hardest to configure. First, you need to get your OAuth 2.0 credentials by following this guide. Once you get your client id and your client secret, you can configure your Neverest account this way:

[accounts.gmail]
folder.filter.exclude = ["All Mail"]

left.backend.type = "maildir"
left.backend.root-dir = "~/Mail/gmail"

right.backend.type = "imap"
right.backend.host = "imap.gmail.com"
right.backend.port = 993
right.backend.login = "clement.douin@gmail.com"
right.backend.oauth2.client-id = "<client-id>"
right.backend.oauth2.auth-url = "https://accounts.google.com/o/oauth2/v2/auth"
right.backend.oauth2.token-url = "https://www.googleapis.com/oauth2/v3/token"
right.backend.oauth2.pkce = true
right.backend.oauth2.scope = "https://mail.google.com/"

Running neverest configure -a gmail will complete your OAuth 2.0 setup and ask for your client secret.