feat(mail): PGP

This commit is contained in:
Pavel Korytov 2021-07-14 21:57:17 +03:00
parent 82d66af51b
commit 2615f584d2
2 changed files with 29 additions and 0 deletions

View file

@ -13,6 +13,7 @@
(setq notmuch-always-prompt-for-sender t)
(setq sendmail-program (executable-find "msmtp"))
(setq send-mail-function #'sendmail-send-it)
(setq mml-secure-openpgp-sign-with-sender t)
(add-hook 'notmuch-hello-mode-hook
(lambda () (display-line-numbers-mode 0)))
(setq notmuch-saved-searches
@ -27,3 +28,15 @@
(:name "drafts" :query "tag:draft")))
(custom-set-faces
`(notmuch-wash-cited-text ((t (:foreground ,(doom-color 'yellow)))))))
(with-eval-after-load 'notmuch
(add-hook 'message-setup-hook 'mml-secure-sign-pgpmime))
(setq mml-secure-key-preferences
'((OpenPGP
(sign
("thexcloud@gmail.com" "914472A1FD6775C166F96EBEED739ADF81C78160"))
(encrypt))
(CMS
(sign)
(encrypt))))

View file

@ -192,6 +192,7 @@ And the proper notmuch settings:
(setq notmuch-always-prompt-for-sender t)
(setq sendmail-program (executable-find "msmtp"))
(setq send-mail-function #'sendmail-send-it)
(setq mml-secure-openpgp-sign-with-sender t)
(add-hook 'notmuch-hello-mode-hook
(lambda () (display-line-numbers-mode 0)))
(setq notmuch-saved-searches
@ -209,6 +210,21 @@ And the proper notmuch settings:
#+end_src
The file to which this is tangled is read in the init.el.
** Signing messages
#+begin_src emacs-lisp
(with-eval-after-load 'notmuch
(add-hook 'message-setup-hook 'mml-secure-sign-pgpmime))
(setq mml-secure-key-preferences
'((OpenPGP
(sign
("thexcloud@gmail.com" "914472A1FD6775C166F96EBEED739ADF81C78160"))
(encrypt))
(CMS
(sign)
(encrypt))))
#+end_src
* mailcap
mailcap file is a file which defines how to read to different MIME types. Notmuch also uses it, so why not keep it here.