aboutsummaryrefslogtreecommitdiff
path: root/gui/conf
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-06-23 20:37:53 +0200
committerAdrian Kummerlaender2020-06-23 20:37:53 +0200
commit28fdbbec65ef8128fc577929ee527291cd501a9c (patch)
tree40cf7e9d5f7a9339a51deffb7192935f06be4be4 /gui/conf
parentee7ec60ae48f2cf2f702cbae6e3b8f3692990a03 (diff)
downloadnixos_home-28fdbbec65ef8128fc577929ee527291cd501a9c.tar
nixos_home-28fdbbec65ef8128fc577929ee527291cd501a9c.tar.gz
nixos_home-28fdbbec65ef8128fc577929ee527291cd501a9c.tar.bz2
nixos_home-28fdbbec65ef8128fc577929ee527291cd501a9c.tar.lz
nixos_home-28fdbbec65ef8128fc577929ee527291cd501a9c.tar.xz
nixos_home-28fdbbec65ef8128fc577929ee527291cd501a9c.tar.zst
nixos_home-28fdbbec65ef8128fc577929ee527291cd501a9c.zip
Basic eMail setup using home-manager account system and mu4e
Diffstat (limited to 'gui/conf')
-rw-r--r--gui/conf/init.el39
1 files changed, 39 insertions, 0 deletions
diff --git a/gui/conf/init.el b/gui/conf/init.el
index 206d228..7af778e 100644
--- a/gui/conf/init.el
+++ b/gui/conf/init.el
@@ -73,6 +73,9 @@
(global-evil-leader-mode 1)
(evil-leader/set-leader ","))
+(use-package evil-collection
+ :ensure t)
+
(use-package minions
:ensure t
:config
@@ -345,3 +348,39 @@
(lambda ()
(define-key eshell-mode-map (kbd "<tab>")
(lambda () (interactive) (completion-at-point)))))
+
+(use-package mu4e
+ :config
+ (setq mu4e-maildir "~/mail")
+ (setq mu4e-get-mail-command "mbsync -a")
+ (setq mu4e-use-fancy-chars t)
+ (setq mu4e-change-filenames-when-moving t)
+ (setq sendmail-program "msmtp"
+ send-mail-function 'smtpmail-send-it
+ message-sendmail-f-is-evil t
+ message-send-mail-function 'message-send-mail-with-sendmail)
+ (evil-collection-init 'mu4e))
+
+(setq mu4e-contexts
+ `(,(make-mu4e-context
+ :name "private"
+ :match-func (lambda (msg)
+ (when msg
+ (string-match-p "^/automatix" (mu4e-message-field msg :maildir))))
+ :vars '((user-mail-address . "adrian@kummerlaender.eu")
+ (user-full-name . "Adrian Kummerländer")
+ (mu4e-sent-folder . "/automatix/Sent")
+ (mu4e-drafts-folder . "/automatix/Drafts")
+ (mu4e-trash-folder . "/automatix/Trash")
+ (message-sendmail-extra-arguments . ("--read-envelope-from" "--account=automatix"))))
+ ,(make-mu4e-context
+ :name "KIT"
+ :match-func (lambda (msg)
+ (when msg
+ (string-match-p "^/kit" (mu4e-message-field msg :maildir))))
+ :vars '((user-mail-address . "adrian.kummerlaender@student.kit.edu")
+ (user-full-name . "Adrian Kummerländer")
+ (mu4e-sent-folder . "/kit/Sent")
+ (mu4e-drafts-folder . "/kit/Drafts")
+ (mu4e-trash-folder . "/kit/Trash")
+ (message-sendmail-extra-arguments . ("--read-envelope-from" "--account=kit"))))))