From: Maximilian Friedersdorff Date: Sun, 6 Nov 2016 17:27:55 +0000 (+0000) Subject: Use mu4e as MUA X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=d0abb2a545eb3507b4d6932825ac62f011273f6b;p=max%2Fdotfiles.git Use mu4e as MUA --- diff --git a/emacs/.emacs b/emacs/.emacs index 96b09e3..b731c30 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -115,12 +115,71 @@ :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) diff --git a/offline_mail/.mbsync/aber.mbsync b/offline_mail/.mbsync/aber.mbsync index 00d2ace..5c62c22 100644 --- a/offline_mail/.mbsync/aber.mbsync +++ b/offline_mail/.mbsync/aber.mbsync @@ -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 diff --git a/offline_mail/.mbsync/personal-gmail.mbsync b/offline_mail/.mbsync/personal-gmail.mbsync index 63cb281..abc355e 100644 --- a/offline_mail/.mbsync/personal-gmail.mbsync +++ b/offline_mail/.mbsync/personal-gmail.mbsync @@ -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 diff --git a/offline_mail/.mbsync/personal.mbsync b/offline_mail/.mbsync/personal.mbsync index a6d7e20..e2e6472 100644 --- a/offline_mail/.mbsync/personal.mbsync +++ b/offline_mail/.mbsync/personal.mbsync @@ -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