https://github.com/zhsj/sasl-xoauth2
Use http://www.mutt.org/doc/manual/#oauth instead.
https://github.com/zhsj/sasl-xoauth2
gmail mutt oauth
Last synced: about 1 year ago
JSON representation
Use http://www.mutt.org/doc/manual/#oauth instead.
- Host: GitHub
- URL: https://github.com/zhsj/sasl-xoauth2
- Owner: zhsj
- License: bsd-2-clause
- Archived: true
- Created: 2018-01-24T17:37:41.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-19T18:56:04.000Z (almost 7 years ago)
- Last Synced: 2024-08-02T01:26:29.207Z (almost 2 years ago)
- Topics: gmail, mutt, oauth
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SASL XOAUTH2
## Build
Go https://console.developers.google.com/ (Credentials -> Create credentials -> OAuth client ID).
Then obtain a pair of OAuth2 ID & secret.
Build dependency: `libsasl2-dev`.
```
make build CLIENTID=YOUR_CLIENT_ID CLIENTSECRET=YOUR_CLIENT_SECRET
```
## Install
```
sudo make install
```
## Use
Use [Mutt](http://www.mutt.org/) to login GMail IMAP/SMTP with
[OAuth2](https://developers.google.com/gmail/imap/xoauth2-protocol).
First run `./sasl-xoauth2` to obtain a token, then set it as a password in `muttrc`, like:
```
set folder = "imaps://imap.gmail.com/"
set imap_user = "example@gmail.com"
set imap_pass = "token"
set smtp_url = "smtps://$imap_user:$imap_pass@smtp.gmail.com"
# set imap_authenticators="XOAUTH2"
set smtp_authenticators="XOAUTH2"
```