From a1f619732042c51a113040ef6b8dec1e1f469bbb Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 2 Aug 2016 13:59:37 +0200 Subject: [PATCH] Add basic Gnus configuration --- emacs/.emacs.d/init.el | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 73848d4..249c8d4 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -288,6 +288,41 @@ This is currently the data directory under the (ensure-library magit) +;;;;; Gnus: + +(eval-when-compile + (require 'gnus) + (require 'mail-source) + (require 'nnfolder)) + +(defvar oni:mail-addresses + (rx (or "tom@ryuslash.org" "ryuslash@ninthfloor.org" "ryuslash@gmail.com")) + "Regular expression of all my email addresses.") + +;;; Store gnus cache in my data dir. +(with-eval-after-load 'gnus + (setq gnus-directory (oni:data-location "News") + gnus-article-save-directory gnus-directory + gnus-cache-directory gnus-directory + gnus-kill-files-directory gnus-directory + mail-source-directory (oni:data-location "Mail") + message-directory mail-source-directory + nnfolder-directory mail-source-directory) + + (setq gnus-select-method + '(nnmaildir "ryuslash" (directory "~/documents/mail/ryuslash/"))) + (setq gnus-secondary-select-methods + '((nnmaildir "gmail" (directory "~/documents/mail/gmail/")) + (nnmaildir "ninthfloor" (directory "~/documents/mail/ninthfloor/")) + (nnmaildir "picturefix" (directory "~/documents/mail/picturefix/"))))) + +;;; Send mail with msmtp +(eval-when-compile (require 'sendmail)) + +(with-eval-after-load 'sendmail + (setq send-mail-function 'sendmail-send-it) + (setq sendmail-program "/usr/bin/msmtp")) + ;;;; Custom: ;; Put the customize settings in a different file so that Emacs