summaryrefslogtreecommitdiffstats
path: root/Mail.org
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2022-10-04 18:40:31 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2022-10-04 18:40:31 +0200
commitd4e4f1d4eaddee3c60a5bd963d82c1dcc0083ef5 (patch)
treeca69c6c998777743f8eb10c6f7a24879005876ff /Mail.org
parent4e5222fdb85c0f77bcdfba2866e815cc6afe66da (diff)
downloaddotfiles-d4e4f1d4eaddee3c60a5bd963d82c1dcc0083ef5.tar.gz
dotfiles-d4e4f1d4eaddee3c60a5bd963d82c1dcc0083ef5.zip
Clear dotfiles tree
Diffstat (limited to 'Mail.org')
-rw-r--r--Mail.org120
1 files changed, 120 insertions, 0 deletions
diff --git a/Mail.org b/Mail.org
new file mode 100644
index 0000000..d946108
--- /dev/null
+++ b/Mail.org
@@ -0,0 +1,120 @@
1#+TITLE: MU4E Configuration
2#+PROPERTY: header-args:emacs-lisp :tangle .config/emacs/jd/jd-mu4e.el
3
4* jd-mu4e.el
5#+begin_src emacs-lisp
6
7 (use-package org-msg)
8
9 (use-package mu4e
10 :defer 20
11 :ensure nil
12 :config
13 (require 'org-mu4e)
14
15 (setq mu4e-update-interval (* 10 60))
16 (setq mu4e-get-mail-command "mbsync -a")
17 (setq mu4e-maildir "~/Mail")
18
19 (setq mu4e-completing-read-function #'ivy-completing-read)
20
21 (setq mu4e-change-filenames-when-moving t)
22
23 (setq mu4e-contexts
24 `(,(make-mu4e-context
25 :name "Abaks"
26 :match-func (lambda (msg) (when msg
27 (string-prefix-p "/abaks" (mu4e-message-field msg :maildir))))
28 :vars '(
29 (user-full-name . "Jakub Dlugosz")
30 (user-mail-address . "jakub@abaks.pl")
31 (mu4e-sent-folder . "/abaks/Sent Items")
32 (mu4e-trash-folder . "/abaks/Trash")
33 (mu4e-drafts-folder . "/abaks/Drafts")
34 (mu4e-refile-folder . "/abaks/Archive")
35 (mu4e-sent-messages-behavior . sent)
36 ))
37 ,(make-mu4e-context
38 :name "Gmail"
39 :match-func (lambda (msg) (when msg
40 (string-prefix-p "/gmail" (mu4e-message-field msg :maildir))))
41 :vars '(
42 (user-full-name . "Jakub Dlugosz")
43 (user-mail-address . "jdlugosz963@gmail.pl")
44 (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane")
45 (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz")
46 (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze")
47 (mu4e-refile-folder . "/gmail/Archive")
48 (mu4e-sent-messages-behavior . sent)
49 ))))
50
51 (setq mail-user-agent 'mu4e-user-agent
52 message-send-mail-function 'smtpmail-send-it
53 smtpmail-smtp-server "smtp.abaks.pl"
54 smtpmail-local-domain "pl"
55 smtpmail-smtp-service 465
56 smtpmail-stream-type 'ssl)
57
58 (mu4e t))
59
60 (jd/leader-key-def
61 "m" '(:ignore t :which-key "mail")
62 "mm" 'mu4e
63 "mc" 'mu4e-compose-new)
64
65
66 (provide 'jd-mu4e)
67
68#+end_src
69
70* mbsyncrc
71
72#+begin_src conf :tangle .mbsyncrc
73IMAPStore abaks-remote
74Host imap.abaks.pl
75Port 143
76SSLType None
77AuthMechs LOGIN
78User jakub@abaks.pl
79PassCmd "pass email/jakub@abaks.pl"
80CertificateFile /etc/ssl/certs/ca-certificates.crt
81
82MaildirStore abaks-local
83Path ~/Mail/abaks/
84Inbox ~/Mail/abaks/INBOX
85Subfolders Verbatim
86
87Channel abaks
88Far :abaks-remote:
89Near :abaks-local:
90Patterns INBOX * !Sync*
91Expunge None
92CopyArrivalDate yes
93Sync All
94Create Near
95SyncState *
96
97IMAPStore gmail-remote
98Host imap.gmail.com
99Port 993
100SSLType IMAPS
101AuthMechs LOGIN
102User jdlugosz963@gmail.com
103PassCmd "pass email/jdlugosz963@gmail.com"
104CertificateFile /etc/ssl/certs/ca-certificates.crt
105
106MaildirStore gmail-local
107Path ~/Mail/gmail/
108Inbox ~/Mail/gmail/INBOX
109Subfolders Verbatim
110
111Channel gmail
112Far :gmail-remote:
113Near :gmail-local:
114Patterns INBOX * !Sync*
115Expunge None
116CopyArrivalDate yes
117Sync All
118Create Near
119SyncState *
120#+end_src