]> git.friedersdorff.com Git - max/dotfiles.git/commitdiff
Use mu4e as MUA
authorMaximilian Friedersdorff <max@friedersdorff.com>
Sun, 6 Nov 2016 17:27:55 +0000 (17:27 +0000)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Sun, 6 Nov 2016 17:27:55 +0000 (17:27 +0000)
emacs/.emacs
offline_mail/.mbsync/aber.mbsync
offline_mail/.mbsync/personal-gmail.mbsync
offline_mail/.mbsync/personal.mbsync

index 96b09e3a9db888f37c7a4704f65480c73d1e5a45..b731c30f1a3def467a7d93bdb0186ae5794280e1 100644 (file)
   :ensure t)
 
 
-(add-hook 'after-init-hook 'global-company-mode)
 (use-package wanderlust
   :ensure t)
 
-
-
+(use-package mu4e
+  :config
+  (setq
+   mu4e-maildir "~/mail"
+   mu4e-get-mail-command
+   (concat "/usr/bin/mbsync -c /home/max/.mbsync/personal.mbsync -a &&"
+          "/usr/bin/mbsync -c /home/max/.mbsync/personal-gmail.mbsync -a &&"
+          "/usr/bin/mbsync -c /home/max/.mbsync/aber.mbsync -a")
+   mu4e-update-interval 60)
+  (setq
+   message-send-mail-function 'smtpmail-send-it
+   smtpmail-default-smtp-server "mail.friedersdorff.com"
+   smtpmail-auth-credentials (expand-file-name "~/.authinfo.gpg"))
+  (setq mu4e-contexts
+       `( , (make-mu4e-context
+             :name "Personal"
+             :enter-func (lambda () (mu4e-message "Switch to Peronal context"))
+             :match-func (lambda (msg)
+                           (when msg
+                             mu4e-message-contact-field-matches msg
+                             :to "max\+?.*@frie(dersdorff)?.com"))
+             :vars '((user-mail-address . "max@friedersdorff.com")
+                     (user-full-name . "Maximilian Friedersdorff")
+                     (mu4e-sent-folder . "/personal/Sent")
+                     (mu4e-drafts-folder . "/personal/Drafts")
+                     (mu4e-trash-folder . "/personal/Trash")
+                     (smtpmail-smtp-server . "mail.friedersdorff.com")
+                     (smtpmail-smtp-service . 587))),
+           (make-mu4e-context
+            :name "Gmail"
+            :enter-func (lambda () (mu4e-message "Switch to Gmail context"))
+            :match-func (lambda (msg)
+                          (when msg
+                            mu4e-message-contact-field-matches msg
+                            :to "maxf130\+?.*@gmail.com"))
+            :vars '((user-mail-address . "maxf130@gmail.com")
+                    (user-full-name . "Maximilian Friedersdorff")
+                    (mu4e-sent-folder . "/personal-gmail/Sent")
+                    (mu4e-sent-messages-behaviour . 'delete)
+                    (mu4e-drafts-folder . "/personal-gmail/Drafts")
+                    (smtpmail-smtp-server . "smtp.gmail.com")
+                    (smtpmail-smtp-service . 587))),
+           (make-mu4e-context
+            :name "Aber"
+            :enter-func (lambda () (mu4e-message "Switch to Aber context"))
+            :match-func (lambda (msg)
+                          (when msg
+                            mu4e-message-contact-field-matches msg
+                            :to "maf54\+?.*@aber.ac.uk"))
+            :vars '((user-mail-address . "maf54@aber.ac.uk")
+                    (user-full-name . "Maximilian Friedersdorff")
+                    (mu4e-sent-folder . "/aber/Sent")
+                    (mu4e-drafts-folder . "/aber/Drafts")
+                    (mu4e-trash-folder . "/aber/Trash")
+                    (smtpmail-smtp-server . "smtp.office365.com")
+                    (smtpmail-smtp-service . 587))))
+
+       mu4e-context-policy 'pick-first))
+
+
+;;;(global-company-mode)
+;;;(add-hook 'after-init-hook 'global-company-mode)
 
 (add-hook 'prog-mode-hook 'electric-pair-mode)
 
index 00d2ace5ca7357a1ff28c8749191c4867a443c1c..5c62c22a1abdfd3d0133ea0c8c337dcbc5d9978f 100644 (file)
@@ -1,7 +1,7 @@
 IMAPAccount aber
 Host outlook.office365.com 
 User maf54@aber.ac.uk 
-PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.mail_pass/aber.gpg"
+PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mail_pass/aber.gpg"
 SSLType STARTTLS
 CertificateFile /etc/ssl/certs/ca-certificates.crt
 
index 63cb2814f12ed7beb0b84d3ea00c9b4a84c8b89c..abc355eb487dfee001d12544cc4f46b343360fa5 100644 (file)
@@ -1,7 +1,7 @@
 IMAPAccount gmail
 Host imap.gmail.com
 User maxf130@gmail.com
-PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.mail_pass/personal-gmail.gpg"
+PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mail_pass/personal-gmail.gpg"
 SSLType IMAPS
 CertificateFile /etc/ssl/certs/ca-certificates.crt
 
index a6d7e20c070f9b0b51332f6dc9fc04989c372871..e2e64724cebf49112276dda33560275873f44449 100644 (file)
@@ -1,7 +1,7 @@
 IMAPAccount personal
 Host mail.friedersdorff.com
 User max
-PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.mail_pass/personal.gpg"
+PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mail_pass/personal.gpg"
 SSLType STARTTLS
 CertificateFile /etc/ssl/certs/ca-certificates.crt