aboutsummaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2016-08-02 13:59:37 +0200
committerGravatar Tom Willemse2016-08-02 13:59:37 +0200
commita1f619732042c51a113040ef6b8dec1e1f469bbb (patch)
tree300f894b0112533c761fe12998b89b89942db35a /emacs
parent0dc7fb56845e67c685756534a6d21a76a5bcc4dd (diff)
downloadnew-dotfiles-a1f619732042c51a113040ef6b8dec1e1f469bbb.tar.gz
new-dotfiles-a1f619732042c51a113040ef6b8dec1e1f469bbb.zip
Add basic Gnus configuration
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.el35
1 files changed, 35 insertions, 0 deletions
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