diff --git a/.emacs.d/mail.el b/.emacs.d/mail.el index ca7ba8d..138ff9a 100644 --- a/.emacs.d/mail.el +++ b/.emacs.d/mail.el @@ -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)))) diff --git a/Mail.org b/Mail.org index 5999e51..00917ff 100644 --- a/Mail.org +++ b/Mail.org @@ -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.