Skip to content

Commit

Permalink
Support OAuth2 to Mew
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Sep 4, 2024
1 parent d103680 commit 715f2b8
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 152 deletions.
2 changes: 1 addition & 1 deletion .emacs.d/.mew.d/.mew.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
(setq mew-addrbook-for-summary 'name)

;; マスターパスワード
(setq mew-use-master-passwd t)
(setq mew-use-master-passwd nil)

;; draft mode は auto-save しない
(setq mew-draft-mode-auto-save -1)
Expand Down
23 changes: 21 additions & 2 deletions .emacs.d/.mew.d/mew-config.el.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@
'("User <user@example.com>"
"User <user@example.jp>"
"User <user@example.net>"))

(setopt mew-oauth2-client-id "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com")
(setopt mew-oauth2-client-secret "xxxxxxxxxxxxxxxxxxxxxxxx")
(setopt mew-oauth2-redirect-url "http://localhost:8080")
(setopt mew-oauth2-redirect-port 8080)
(setopt mew-auth-oauth2-client-id mew-oauth2-client-id)
(setopt mew-auth-oauth2-client-secret mew-oauth2-client-secret)
(setopt mew-auth-oauth2-redirect-url mew-oauth2-redirect-url)
(setopt mew-auth-oauth2-redirect-port mew-oauth2-redirect-port)
(setq plstore-cache-passphrase-for-symmetric-encryption t)
(setq epa-file-cache-passphrase-for-symmetric-encryption t)
(setq epa-pinentry-mode 'loopback)
(setq mew-config-alist
'((Exchange
(name "User")
Expand All @@ -24,13 +34,22 @@
(imap-size 0)
(imap-header-only t))
(Gmail
("oauth2-client-id" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com")
("oauth2-client-secret" "xxxxxxxxxxxxxxxxxxxxxxxx")
("oauth2-auth-url" "https://accounts.google.com/o/oauth2/auth")
("oauth2-token-url" "https://accounts.google.com/o/oauth2/token")
("oauth2-resource-url" "https://mail.google.com/")
("oauth2-redirect-url" "http://localhost:8080")
("oauth2-redirect-port" 8080)
("imap-auth-list" ("XOAUTH2"))
("smtp-auth-list" ("XOAUTH2"))
(name "User")
(user "user")
(mail-domain "example.jp")
(smtp-server "smtp.gmail.com")
(smtp-auth t)
(smtp-ssl t)
(smtp-ssl-port 465)
(smtp-ssl-port 587)
(smtp-user "user@example.jp")
(imap-user "user@example.net")
(imap-server "imap.gmail.com")
Expand Down
3 changes: 0 additions & 3 deletions .emacs.d/.mew.d/oauth2/README.md

This file was deleted.

26 changes: 0 additions & 26 deletions .emacs.d/.mew.d/oauth2/delegate-auth.php

This file was deleted.

33 changes: 0 additions & 33 deletions .emacs.d/.mew.d/oauth2/get-auth.php

This file was deleted.

62 changes: 0 additions & 62 deletions .emacs.d/.mew.d/oauth2/main.tf

This file was deleted.

22 changes: 0 additions & 22 deletions .emacs.d/.mew.d/oauth2/request_auth.php

This file was deleted.

2 changes: 1 addition & 1 deletion .emacs.d/el-get.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
(auto-save-buffers-enhanced :checksum "461e8c816c1b7c650be5f209078b381fe55da8c6")
(popwin :checksum "f4bf2e4cbda328359b06d89e233c951cba30363e")
(twittering-mode :checksum "114891e8fdb4f06b1326a6cf795e49c205cf9e29")
(mew :checksum "f46b06dba0c7f0aa371be30d704b6d9ba30a8321")
(mew :checksum "70b57878d5f7f9f81ff125b7ce52785ccbe8b46b")
(dockerfile-mode :checksum "39a012a27fcf6fb629c447d13b6974baf906714c")
(lsp-haskell :checksum "485c1148ce4d27030bb95b21c7289809294e7d31")
(haskell-mode :checksum "d23ec34788286405f377ce485d2a17e302d94a4f")
Expand Down
5 changes: 3 additions & 2 deletions .emacs.d/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -1035,11 +1035,12 @@
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation))

(el-get-bundle dockerfile-mode)

(el-get-bundle oauth2
:type github
:pkgname "emacsmirror/oauth2")
(add-to-list 'load-path (concat user-emacs-directory ".mew.d"))
(load "mew-config" t t)
(setq mew-rc-file ".mew")

(el-get-bundle mew
:type github
:pkgname "kazu-yamamoto/Mew"
Expand Down

0 comments on commit 715f2b8

Please sign in to comment.