You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/notes/sysadmin/linux/mailing-lists.md
+3-34Lines changed: 3 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,39 +18,8 @@ This will generate two strings, client_id and client_secret.
18
18
19
19
### Step 2: generate OAuth2 token
20
20
21
-
Use Google’s OAuth2 authentication scripthttps://github.com/google/gmail-oauth2-tools/blob/master/python/oauth2.py to generate an OAuth2 refresh token.
`{user}` is the email address you use to login to Gmail.
26
-
`{client_id}` and `{client_secret}` are the strings you got from Step 1.
27
-
The script will ask you to visit a URL in your browser and follow some directions, and prompt you for a verification code. After visiting the URL and agreeing to various things, you will be provided a verification code (from https://oauth2.dance). Enter this verification code into the script prompt. The script will then print the Refresh Token (in addition two other things that are not needed).
28
-
29
-
### Step 3: configure account in aerc
30
-
31
-
Edit the accounts.conf file in your aerc configuration directory (usually ~/.config/aerc/), and add the following:
{account_name} is whatever you would like to name this account in aerc.
42
-
{user} is the email address you use to login to Gmail (same as in Step 2), except it should be URL-encoded (replace @ with %40).
43
-
{refresh_token} is the refresh token you got from Step 2, except it should be URL-encoded (replace / with %2F).
44
-
{client_id} and {client_secret} are the strings you got from Step 1.
45
-
46
-
!!! tip
47
-
48
-
You need to follow the directions from the oauth2.py script regarding redirect URIs:
49
-
50
-
```
51
-
NOTE: The OAuth2 OOB flow isn't a thing anymore. You will need to set the
52
-
application type to "Web application" and then add
53
-
https://google.github.io/gmail-oauth2-tools/html/oauth2.dance.html as an
54
-
authorised redirect URI. This is necessary for seeing the authorisation code on
55
-
a page in your browser.
56
-
```
25
+
This creates a file at `~/.config/aerc/accounts.conf` with proper credentials. You might need to configure aerc to use this path instead of its default accounts.conf path.
0 commit comments